On Mon, 23 Nov 2015 16:31:35 +0100 Marc Espie <[email protected]> wrote:

> On Mon, Nov 23, 2015 at 05:20:54PM +0200, [email protected] wrote:
> > Hi misc@ readers, Marc,
> > 
> > Interactive removal of a package with pkg_delete $pkg_name also asks
> > the removal of dependent packages (cool).
> > 
> > This works OK and logs the removal of the package $pkg_name in messages
> > at the end of the procedure.  But does not seem to log the removal of
> > the packages that also depend on the removed bits (and got removed).  I
> > may be looking at the wrong place or something, but expected this to be
> > the same place.
> > 
> > Would it be a good idea to also log removal of the dependent packages
> > while removing a package, for the sake of operator awareness?
> > 
> > P.S. Running pkg_delete -a manually afterwards logs fine removed
> > packages (fallout) just fine.  The removed dependants of $pkg_name
> > however are not logged in messages log.  The result is, some details
> > are missed in the messages, while others comparative details are there.
> > 
> > I'm asking because a python 2.7 upgrade from packages fails on a i386
> > older machine here, and have to remove it to upgrade my packages.  I
> > really don't care much about the python bit, just asking for the
> > logging case as explained above.
> 
> /var/log/messages has all the info, actually.
> 

Thanks for looking into this, Marc.  Here is what happened:

$ sudo pkg_delete python
can't delete python-2.7.10 without deleting glib2-2.46.1p0
Delete them as well ? [y/N/a] y
can't delete glib2-2.46.1p0 without deleting desktop-file-utils-0.22p0 
irssi-0.8.16p0 irssi-xmpp-0.52p2 loudmouth-1.4.3p6 mcabber-0.10.3
Delete them as well ? [y/N/a] y
desktop-file-utils-0.22p0:mcabber-0.10.3: ok
desktop-file-utils-0.22p0: ok
loudmouth-1.4.3p6:irssi-xmpp-0.52p2: ok
loudmouth-1.4.3p6: ok
can't delete irssi-0.8.16p0 without deleting irssi-icb-0.14p10 irssi-otr-1.0.1
Delete them as well ? [y/N/a] y
irssi-otr-1.0.1: ok
irssi-icb-0.14p10: ok
irssi-0.8.16p0: ok
glib2-2.46.1p0: ok
python-2.7.10: ok
Read shared items: ok
--- -python-2.7.10 -------------------
Don't forget to remove /usr/local/bin/python,
/usr/local/bin/2to3, /usr/local/bin/python-config and/or
/usr/local/bin/pydoc if they were symlinks to
/usr/local/bin/python2.7, /usr/local/bin/python2.7-2to3,
/usr/local/bin/python2.7-config or to /usr/local/bin/pydoc2.7.
Error deleting directory /usr/local/include/python2.7: Directory not empty

$ sudo pkg_delete -a
nghttp2-1.4.0:gpgme-1.5.1p1: ok
nghttp2-1.4.0:gnupg-1.4.19p0: ok
libelf-0.8.13p3: ok
partial-python-2.7.10: ok
libassuan-2.1.1: ok
libotr-4.1.0: ok
libgpg-error-1.20:libgcrypt-1.6.4: ok
libgpg-error-1.20: ok
bzip2-1.0.6p7: ok
libffi-3.2.1: ok
Read shared items: ok

This got logged in /var/log/messages

Nov 23 16:00:57 fire pkg_delete: Removed python-2.7.10
Nov 23 16:01:18 fire pkg_delete: Removed gpgme-1.5.1p1
Nov 23 16:01:22 fire pkg_delete: Removed gnupg-1.4.19p0
Nov 23 16:01:23 fire pkg_delete: Removed libelf-0.8.13p3
Nov 23 16:01:23 fire pkg_delete: Removed partial-python-2.7.10
Nov 23 16:01:26 fire pkg_delete: Removed libassuan-2.1.1
Nov 23 16:01:28 fire pkg_delete: Removed libotr-4.1.0
Nov 23 16:01:30 fire pkg_delete: Removed libgcrypt-1.6.4
Nov 23 16:01:32 fire pkg_delete: Removed libgpg-error-1.20
Nov 23 16:01:34 fire pkg_delete: Removed bzip2-1.0.6p7
Nov 23 16:01:35 fire pkg_delete: Removed libffi-3.2.1

I'm missing notion of removed "delete them as well" packages, or should
I expect these to be logged at all?

Regards,
Anton

Reply via email to