[Aptitude-devel] Bug#887421: Bug#887421: dpkg: warning: unable to delete old directory '/usr/share/man/gl/man8': Directory not empty

Axel Beckert abe at debian.org
Tue Jan 16 16:34:33 UTC 2018


積丹尼 Dan Jacobson wrote:
> Users will still freak out if any errors are printed like this

No. This is a warning message, not an error message.

> so maybe also print a one-time soothing message that will appear in
> the apt output.

I don't think that's helpful at all. These warnings are there because
there's something fishy with these directories, either due to
non-packaged files in there or because dpkg is handling even the
warnings differently if such file movings miss the Replaces header.

> If there is no way to do that then that should be a bug in itself.

I currently see two possibilities where these warnings could come from:

* There are update-alternatives generated symlinks in these
  directories. Those are likely recognized as non-packaged files by

* The missing Replaces headers.

In both cases, I'm quite sure the warnings came only for these three
directory because of this fact:

$ apt-file search /usr/share/man/gl/man8
aptitude: /usr/share/man/gl/man8/aptitude-curses.8.gz
aptitude-common: /usr/share/man/gl/man8/aptitude-curses.8.gz
kde-l10n-gl: /usr/share/man/gl/man8/kbuildsycoca4.8.gz
kde-l10n-gl: /usr/share/man/gl/man8/kcookiejar4.8.gz
kde-l10n-gl: /usr/share/man/gl/man8/kded4.8.gz
kde-l10n-gl: /usr/share/man/gl/man8/kdeinit4.8.gz
kde-l10n-gl: /usr/share/man/gl/man8/meinproc4.8.gz
$ apt-file search /usr/share/man/fi/man8
aptitude: /usr/share/man/fi/man8/aptitude-curses.8.gz
aptitude-common: /usr/share/man/fi/man8/aptitude-curses.8.gz

(And for /usr/share/man/gl/ in general, I only see GUI tools having
files in there, so chances are high that no other packages has files
in there, too. So I focus on the other two for the following details.)

They only appear for /usr/share/man/{gl,fi}/man8/ because
with the exception of kde-l10n-gl (which likely only native speakers
of that language will install), aptitude/aptitude-common is the only
package which ships man pages in section 8 for Finnish and Galician.

All other directories for which manual pages were moved around have
other (installed) packages with files in there, i.e. no warning.

So dpkg wants to remove that directory, but can't and warns about it.

If it's the update-alternatives case, we probably can't do much about
it. I only see a vague chance to move around the update-alternatives
call within the maintainer scripts. But from a first glance the
current locations for that call look sane and normal and just simply
moving them around might break other things.

		Regards, Axel
 ,''`.  |  Axel Beckert <abe at debian.org>, https://people.debian.org/~abe/
: :' :  |  Debian Developer, ftp.ch.debian.org Admin
`. `'   |  4096R: 2517 B724 C5F6 CA99 5329  6E61 2FF9 CD59 6126 16B5
  `-    |  1024D: F067 EA27 26B9 C3FC 1486  202E C09E 1D89 9593 0EDE

More information about the Aptitude-devel mailing list