Opened 2 years ago

Last modified 2 years ago

#66510 new defect

Uninstall warning: add portname to warning prompt. Makes it more clear which port is triggering the warning if multiple ports are specified on the uninstall line.

Reported by: esbugz Owned by:
Priority: Normal Milestone:
Component: base Version: 2.8.0
Keywords: Cc:
Port:

Description

I'd assume that passing N or n or hitting enter (since 'N' implies it's the default) would abort uninstallation, but instead all of these result in the warning being ignored

$sudo port uninstall libunistring brotli
Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
The following ports will break:
 libidn2 @2.3.4_0
 libpsl @0.21.1-20220513_1
Continue? [y/N]: N
--->  Cleaning libunistring
--->  Deactivating brotli @1.0.9_2
--->  Cleaning brotli
--->  Uninstalling brotli @1.0.9_2
--->  Cleaning brotli

Change History (5)

comment:1 Changed 2 years ago by kencu (Ken)

libunistring was not uninstalled, as you commanded when you responded "N".

librotli was uninstalled, as you asked, as there were no issues with uninstalling it.

So the warning was not ignored, it was obeyed.

however, when you put multiple port uninstalls on one line like that, it would be more clear perhaps if there was a port named that was the responsible port at each prompt, eg:

$sudo port uninstall libunistring brotli
Note: when uninstalling libunistring, dependent ports will break.
Note: It is not recommended to uninstall/deactivate a port that has dependents as it breaks the dependents.
The following ports will break:
 libidn2 @2.3.4_0
 libpsl @0.21.1-20220513_1
Continue? [y/N]: N
--->  Cleaning libunistring
--->  Deactivating brotli @1.0.9_2
--->  Cleaning brotli
--->  Uninstalling brotli @1.0.9_2
--->  Cleaning brotli

That is a pretty niche request, but it can be left as a request for someone to look at someday.

comment:2 Changed 2 years ago by kencu (Ken)

Summary: Uninstall warning: 'continue' ignores 'N'Uninstall warning: add portname to warning prompt. Makes it more clear which port is triggering the warning if multiple ports are specified on the uninstall line.

comment:3 Changed 2 years ago by kencu (Ken)

This looks like it would be a pretty simple 5-minute project to add that line to base, if the admins feel it would make things less confusing for users.

comment:4 Changed 2 years ago by esbugz

Oh, I see, thanks for clarification. Another source of confusion is Cleaning libunistring, can this operation be removed as well? And I'd suggest a shorter message and a more explicit 'Continue uninstalling':

Note: uninstalling 'libunistring' will break the following dependent ports:
 libidn2 @2.3.4_0
 libpsl @0.21.1-20220513_1
Continue uninstalling? [y/N]: N

comment:5 Changed 2 years ago by kencu (Ken)

I agree, I don't know why the "cleaning" message is there exactly, and it is somewhat confusing as it it not clear what it is cleaning.

Note: See TracTickets for help on using tickets.