Hi!

On Sun, 2013-06-16 at 17:25:31 +0200, Michael Biebl wrote:
> I encoutered a similar issue:
> gnome-keyring no longer ships /etc/pkcs11/modules/gnome-keyring.module.
> So I used rm_conffile (via $pkg.maintscript) to remove the obsolete
> conffile.
> Basically the same thing happens:

[…]
> $ sudo dpkg -i
> ../upload/gnome-keyring_3.8.2-2_amd64.deb 
[…]
> Moving obsolete conffile /etc/pkcs11/modules/gnome-keyring.module out of the 
> way...
> Unpacking replacement gnome-keyring ...
> dpkg: warning: unable to delete old directory '/etc/pkcs11/modules': 
> Directory not empty
> dpkg: warning: unable to delete old directory '/etc/pkcs11': Directory not 
> empty
[…]

This is just another case of dpkg being unable to do the correct thing
due to untracked system files (filed in another bug report).

> But there is another package [1] shipping an empty /etc/pkcs11. Which
> means the directory is potentially owned by another package, so I can't
> just remove it in postinst.
> And messing around with dpkg -S in postinst is starting to get ugly.
> 
> If dpkg-maintscript-helper would move the file outside of /etc, this
> issue would be solved.
> Raphael, What's the reason you don't consider this a good idea?

I think officializing dpkg-maintscript-helper was a mistake to begin
with, and that's why I've never wasted time in what to me is a dead
end. Instead, for 1.17.x I'm planning to finish up the conffiledb
support and tracking of external files in dpkg proper.

> As for my case (gnome-keyring), I currently see three options:
> a/ don't bother cleaning up /etc/pkcs11
> b/ don't use dpkg-maintscripts-helpers, clean up the obsolete conffiles
> in preinst (using [2]) and let dpkg remove the empty dir
> c/ use dpkg-maintscript-helpers and remove the directory in postinst,
> while guarding the rmdir with a dpkg -S check
> 
> Do you have another, better idea? What would be your recommendation?

Personally I don't use dpkg-maintscripts-helpers in any of my
packages, I find it too ugly for my taste. But given that your package
is already using it probably c/ is good enough for now.

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to