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

Re: How to troubleshoot conffile files problems



On Tue, Dec 7, 2021 at 10:41 AM Andrey Rahmatullin wrote:
>
> On Sun, Dec 05, 2021 at 10:19:44AM -0500, wrote:

> > > > How to do that please?
> > > The correct way, it seems, would be to follow the suggestion in the
> > > original bug report and fix the "rm -f /etc/dnsmasq.d/dbab.*" line in
> > > the 1.3.3-1 postrm.
> >
> > I still don't quite understand what you actually mean,
> I just mean the original bug report already had a suggestion that seems
> correct to me.

Can you give me a simple example package showing how it should be done please?

It is not that I didn't try my best but the case is I've already tried
my best to guess what the above means but it seems I guessed wrong
each time. Thus I need detailed help, those few words only get me
going around the circles.

OK, let's start from the beginning:

> > How to properly handle conffile files in such a case?

> You should remove them manually in postrm, but only on
> purge.

That's actually what I've been doing, removing them manually in postrm
and on purge --

https://salsa.debian.org/debian/dbab/-/commit/0acfe617f064c5907f999707e37be12c7b9f8328

But I was told to "using rm_conffile directive from .maintscript file"

So I did, see --
https://salsa.debian.org/debian/dbab/-/commit/eca5bf35dc20843907b3eb0078a7926117bdf0e8

But it is causing the above problem with my conffile files, see
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=995769

I.e.,

----
grep: /etc/dbab/dbab.list-: No such file or directory
cat: /etc/dbab/dbab.addr: No such file or directory
----

They should be there but they are not during upgrade.

And the fix I got was:

> fix the "rm -f /etc/dnsmasq.d/dbab.*" line in
> > > the 1.3.3-1 postrm.

and that's what I did, instead removing them manually in postrm with
`rm`, I used
`dpkg-maintscript-helper rm_conffile` instead.

And now I'm at

W: maintainer-script-should-not-use-dpkg-maintscript-helper

I.e., I've gone through a full circle.

Someone give detailed help please. thx


Reply to: