tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Disable pkg_install output during upgrade
Hi,
This is a patch I've pushed to my binary package repositories, and while
I don't intend to propose it for inclusion into pkgsrc just yet, it may
be useful for others to include in their repositories.
Our upgrade process is effectively pkg_delete && pkg_add, and this means
that any package that is either upgraded or refreshed will print both
install and deinstall script messages, as well as output MESSAGE files,
on every update.
At best this is annoying (users get spammed with the same messages
telling them things they've already acted upon when first installing the
packages), and at worst can end up with a broken system. Consider the
output a user sees when pkgin is updated:
===========================================================================
The following files are no longer being used by pkgin-22.10.0nb1,
and they can be removed if no other packages are using them:
/opt/local/etc/pkgin/repositories.conf
The following directories are no longer being used by pkgin-22.10.0nb1,
and they can be removed if no other packages are using them:
/opt/local/etc/pkgin
/var/db/pkgin
===========================================================================
While many of us will know simply to ignore these messages, for newer
users who aren't familiar with how things work they may legitimately
think that these files and directories are no longer used (perhaps the
package switched to a different directory and these are the obsolete
locations?) They act on what they are told, and now they have a broken
system.
This patch turns off pkg_install stdout for any upgrades:
https://github.com/TritonDataCenter/pkgsrc/commit/f4a4b80160f083abc2eb82c60bbc353b49f7e7d2
Explicit package installs or removals will continue to output INSTALL
and DEINSTALL script messages, as well as show MESSAGE files, but for
the general "pkgin upgrade" case this results in much cleaner output
where errors will be significantly more visible.
Obviously it would be better to have proper upgrade handling in
pkg_install, but that is a much larger project.
--
Jonathan Perkin - mnx.io - pkgsrc.smartos.org
Open Source Complete Cloud www.tritondatacenter.com
Home |
Main Index |
Thread Index |
Old Index