Index | Thread | Search

From:
Florian Obser <florian@openbsd.org>
Subject:
Re: tweak pkg_* footgun messages
To:
Peter Hessler <phessler@theapt.org>
Cc:
ports@openbsd.org
Date:
Sat, 13 Jan 2024 19:17:04 +0100

Download raw body.

Thread
On 2024-01-13 18:16 +01, Peter Hessler <phessler@theapt.org> wrote:
> This change doesn't make a difference.  End-Users aren't going to care
> about the difference between "should" and "may".  They're just going to
> run it regardless.

I don't think so. People don't read, we know this.

RFC 6919 seems relevant though:

6.  MAY WISH TO

   The phrase "MAY WISH TO" indicates a behavior that might seem
   appealing to some people, but which is regarded as ridiculous or
   unnecessary by others.

>
> The problem is that they are being printed during upgrades, when the
> messages are only useful when the package is removed.
>
>
>
> On 2024 Jan 13 (Sat) at 17:06:18 +0000 (+0000), Klemens Nanni wrote:
> :	syncthing-1.27.1->1.27.2: ok
> :	Read shared items: ok
> :	--- -syncthing-1.27.1 -------------------
> :	You should also run rm -rf /var/syncthing/{.,}*
> :
> :I shall certainly not wipe that directory...
> :
> :Apparently fixing this for good is more involved, but rewording is easy,
> :so perhaps this reads better?
> :
> :	You may also run rm -rf /var/syncthing/{.,}*
> :
> :It's not great, but relaxing 'must' into 'may' feels more appropiate.
> :
> :Thoughts?
> :
> :Index: OpenBSD/Delete.pm
> :===================================================================
> :RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/Delete.pm,v
> :diff -u -p -r1.169 Delete.pm
> :--- OpenBSD/Delete.pm	11 Oct 2023 13:54:43 -0000	1.169
> :+++ OpenBSD/Delete.pm	13 Jan 2024 16:57:26 -0000
> :@@ -527,7 +527,7 @@ sub delete($self, $state)
> : 	if ($state->{quick} && $state->{quick} >= 2) {
> : 		unless ($state->{extra}) {
> : 			$self->mark_dir($state);
> :-			$state->log("You should also #1 #2", $action, $realname );
> :+			$state->log("You may also #1 #2", $action, $realname );
> : 			return;
> : 		}
> : 	} else {
> :@@ -537,7 +537,7 @@ sub delete($self, $state)
> : 		} else {
> : 			unless ($state->{extra}) {
> : 				$self->mark_dir($state);
> :-				$state->log("You should also #1 #2 (which was modified)", $action, $realname);
> :+				$state->log("You may also #1 #2 (which was modified)", $action, $realname);
> : 				return;
> : 			}
> : 		}
> :@@ -607,7 +607,7 @@ sub delete($self, $state)
> : 		unlink($realname) or
> : 		    $state->say("problem deleting extra file #1: #2", $realname, $!);
> : 	} else {
> :-		$state->log("You should also remove #1", $realname);
> :+		$state->log("You may also remove #1", $realname);
> : 		$self->mark_dir($state);
> : 	}
> : }
> :@@ -622,7 +622,7 @@ sub delete($self, $state)
> : 	if ($state->{extra}) {
> : 		$self->SUPER::delete($state);
> : 	} else {
> :-		$state->log("You should also remove the directory #1", $realname);
> :+		$state->log("You may also remove the directory #1", $realname);
> : 		$self->mark_dir($state);
> : 	}
> : }
> :@@ -634,7 +634,7 @@ sub delete($self, $state)
> : 	if ($state->{extra}) {
> : 		$self->run($state);
> : 	} else {
> :-		$state->log("You should also run #1", $self->{expanded});
> :+		$state->log("You may also run #1", $self->{expanded});
> : 	}
> : }
> : 
> :Index: OpenBSD/SharedItems.pm
> :===================================================================
> :RCS file: /cvs/src/usr.sbin/pkg_add/OpenBSD/SharedItems.pm,v
> :diff -u -p -r1.34 SharedItems.pm
> :--- OpenBSD/SharedItems.pm	13 Jun 2023 09:07:17 -0000	1.34
> :+++ OpenBSD/SharedItems.pm	13 Jan 2024 16:58:03 -0000
> :@@ -110,7 +110,7 @@ sub cleanup($recorder, $state)
> : 			    $user);
> : 		} else {
> : 			$state->log->set_context('-'.$pkgname);
> :-			$state->log("You should also run /usr/sbin/userdel #1", $user);
> :+			$state->log("You may also run /usr/sbin/userdel #1", $user);
> : 		}
> : 		$done++;
> : 	}
> :@@ -122,7 +122,7 @@ sub cleanup($recorder, $state)
> : 			    $group);
> : 		} else {
> : 			$state->log->set_context('-'.$pkgname);
> :-			$state->log("You should also run /usr/sbin/groupdel #1", $group);
> :+			$state->log("You may also run /usr/sbin/groupdel #1", $group);
> : 		}
> : 		$done++;
> : 	}
> :
>
> -- 
> At no time is freedom of speech more precious than when a man hits his
> thumb with a hammer.
> 		-- Marshall Lumsden
>

-- 
In my defence, I have been left unsupervised.