[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 1:06 PM Andrey Rahmatullin wrote:
>
> On Tue, Dec 07, 2021 at 12:57:37PM -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.
> Sorry, I'm not going to make an upload a package for this.
> Here are the instructions I meant and I don't know what can be clearer
> than that short of an actual debdiff:
>
> """
> I see the postrm has
>
>     /etc/dnsmasq.d/dbab.*
>
> which I take it would have to be dbab-map.*
> """

That the 1.3.3-1 postrm, and now the package is at 1.5.7, many
versions after that. I.e., it was fixed a long time ago, and I presume
that I don't need to do anything for that.

> > 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 #958900 was about files that were not affected by that.

No, you're right, #958900 is fixes afterward, not in that specific commit.

> > But I was told to "using rm_conffile directive from .maintscript file"
> This is wrong. rm_conffile is only for cases when a conffile is no longer
> shipped. This is explained in dpkg-maintscript-helper(1). But
> /etc/dnsmasq.d/dbab.*, or /etc/dnsmasq.d/dbab, or
> /etc/dnsmasq.d/dbab-map.*, are not even conffiles, as far as I can see (as
> they are not shipped in the package, as far as I can see).

So you are saying that the correct way to do it is this --
https://salsa.debian.org/debian/dbab/-/blob/master/debian/dbab.postrm
right?

> > So I did, see --
> > https://salsa.debian.org/debian/dbab/-/commit/eca5bf35dc20843907b3eb0078a7926117bdf0e8
> Yup, this is wrong. And /etc/dbab is a dir, so that line is doubly wrong.

what's the correct way for the fix then?

remove the dbab.maintscript file, i.e.,
https://salsa.debian.org/debian/dbab/-/blob/master/debian/dbab.maintscript,
right?

> > 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.
> That's not even a circle, these are multiple separate problems, some of
> them unrelated.

Thanks for your help.
Sorry for being dense.


Reply to: