[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to use remove-on-upgrade to remove a configuration file?



Hello Niels,

Le 08/08/2021 à 09:09, Niels Thykier a écrit :
Ludovic Rousseau:
Hello,

I am fixing Debian bug #990154.

After some work I am able to remove the obsolete conf file using:
rm_conffile /etc/reader.conf.d/0comments 1.9.3-2~ pcscd
in debian/pcscd.maintscript

Nice.
Now I would like to use the method documented in deb-conffiles
https://manpages.debian.org/unstable/dpkg-dev/deb-conffiles.5.en.html

I would need to add in the DEBIAN/conffiles of the pcscd package the line:
remove-on-upgrade /etc/reader.conf.d/0comments

But how do I generate a .deb package with this extra line?
What is the magic dh command or file to do that?
Where is it documented?

I tried to use a file debian/pcscd.conffiles but this file is no more
used with debhelper version 12
https://manpages.debian.org/buster/debhelper/dh_installdeb.1.en.html

I searched for occurrences of "remove-on-upgrade" in
https://codesearch.debian.net/ but I only find references to dpkg source
code.
No Debian package is using or has used "remove-on-upgrade"?

Thanks


Hi Ludovic,

You cannot use that feature yet as it would break during upgrade. The
dpkg version in stable does not support the feature.  Which is also why
there is no debhelper feature to support it yet.

OK. I was searching for something that does not (yet) exist :-)

My plan was to upload the package in Bullseye +1 so after the (soon) release of Bullseye.
Bullseye will then be the new stable and will have dpkg 1.20.9. So that should work. No?

Thanks

--
Dr. Ludovic Rousseau


Reply to: