[SOLVED] Three confusing messages after a big OpenBSD package update
*BSDThis forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Three confusing messages after a big OpenBSD package update
Yesterday I upgraded my OpenBSD base system from 6.5 to 6.6. That went very smoothly. Today I carried out the package update. At the end of the update were three instructions that I find confusing:
Code:
--- -dbus-1.12.12p0v0 -------------------
Remember to update /etc/machine-id
--- -dconf-0.30.1p1 -------------------
You should also run rm -rf /etc/dconf/db/*
You should also run rm -rf /etc/dconf/profile/*
--- -libxml-2.9.8p1 -------------------
Remember to update /var/db/xmlcatalog
Does the first message mean that I should run dbus-uuidgen and direct the output into /etc/machine-id? I'm a bit loth to do that as the man page says you should not change machine_ids on a running system.
The second message seems to be irrelevant as I don't actually have any files in these two directories. Should I have any?
I do have a /var/db/xmlcatalog file. So should I run xmlcatalog and direct the results into this file to overwrite what is there?
A package update (pkg_add -u or -r) removes the old package and replaces it with the new. So you'll get these sorts of post-delete-cleanup messages that you can safely ignore.
You mean those operations were actually carried out by the install scripts?
No, I think what he's saying is that the messages are additional steps one needs to take when removing something, but that the package tools aren't smart enough to differentiate the remove phase of an upgrade from an actual remove and spam you with irrelevant messages.
The pkg_* tools are very simple and yes they do output those "clean up" notes as others have suggested, even when just upgrading a package.
OpenBSD does not have a package manager with the sophistication, features and added complexity of FreeBSD's pkg (pkgng). The latter being very much an implementation of a Linux style package manager.
And from a cultural / social point-of-view, if you dislike something about OpenBSD -- such as seeing these messages appear during an update -- the Project will gladly review user-submitted patches to eliminate them, and will either ignore or disparage entreaties to have someone else do the work to eliminate them.
Most of the Project's developers started on the road to being developers by first submitting patches to address things that annoyed them.
That's not as easy as it sounds! Out of curiosity, I followed the invocation sequence: pkg_delete-> PkgDelete->Delete. It's all perl scripts and I don't speak perl. But the message about updating the file definitely comes from Delete.pm.
Code:
sub delete
{
my ($self, $state) = @_;
my $realname = $self->realname($state);
if ($state->verbose >= 2 && $state->{extra}) {
$state->say("deleting extra file: #1", $realname);
}
return if $state->{not};
return unless -e $realname or -l $realname;
if ($state->replacing) {
$state->log("Remember to update #1", $realname);
$self->mark_dir($state);
} elsif ($state->{extra}) {
unlink($realname) or
$state->say("problem deleting extra file #1: #2", $realname, $!);
} else {
$state->log("You should also remove #1", $realname);
$self->mark_dir($state);
}
}
I can't understand much of this but it looks like if there is a file defined in the package as extra (and /etc/machine-id is so defined in the dbus package) and there exists such a file or a link to it, and you are replacing the package, you print that message. If you're not replacing, you just delete it.
Which suggests that this is not a message printed by accident because the script couldn't distinguish between deleting and replacing. It does seem to distinguish and this message is definitely intended for users doing a replacement.
"Remember to update" is possibly valid, but you also received extraneous messages to "rm -rf" two dconf structures. Those came from the @extraunexec entries in ports/devel/dconf/pkg/PLIST.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.