[config-package-dev] unhiding in prerm doesn't work if/because file with the same name still exists

Kernc kerncece at gmail.com
Thu Jun 19 17:02:14 EDT 2014


The attachment can serve as an example: the xy-test-pkg-config file
hides /etc/test-pkg.conf and also symlinks into this location its
replacement from /usr/share. Don't know about APT, but dpkg seems to
devour both easily. But at removal of the config package, the
diversion is not removed (because of the said condition in prerm
script — thanks for correcting me there).

How else do you recommend I go about diverting bash's
/etc/skel/.bashrc and provide my customization?

Couldn't unhide be done in postrm or, alternatively,
undisplace_unlink_displace() contain some similar logic to the ominous
warning, namely checking if the existing symlink or file endpoint is
the one created by this same package? Seems like debhelper uses this
kind of magic all over the place. :)

> > Firstly, kudos on this neat and handy piece of middleware!
>
> Thanks — we’re always glad to hear of others using it.

AFAICT, it's pretty much the canonical way to do this. ;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-pkg+config.tar.gz
Type: application/x-gzip
Size: 1176 bytes
Desc: not available
Url : http://mailman.mit.edu/pipermail/config-package-dev/attachments/20140619/f3e27fc2/attachment.bin


More information about the config-package-dev mailing list