[debhelper-devel] Bug#894549: debhelper: dh_usrlocal may remove a direct subdirectory of /usr/local
Niels Thykier
niels at thykier.net
Wed Apr 4 18:52:00 UTC 2018
On Wed, 04 Apr 2018 18:29:00 +0000 Niels Thykier <niels at thykier.net> wrote:
> On Mon, 2 Apr 2018 16:53:52 +0200 Nicolas Boulenguez
> <nicolas at debian.org> wrote:
> > Package: debhelper
> > Followup-For: Bug #894549
> >
> > Hello.
> >
> > This new diff should fix the same issues in dh_usrlocal.
> > The result is more readable in my opinion, hopefully preventing
> > similar errors in the future.
> >
> > It should also be a bit more efficient: instead of sorting two huge
> > lists of paths all starting with "/usr/share/", it sorts once simple
> > names in each directory.
> >
> > When a normal file is encountered, it displays an error instead of a
> > warning. This does not change much, as rmdir would fail with a less
> > explicit message when attempting to remove the containing directory.
>
> Hi Nicolas,
>
> Thanks for your finding and the patch.
>
> While we are at the subject of making it more readable, perhaps I could
> ask you convert dh_usrlocal to use the "hashref" based autoscript? That
> should avoid the need for the "\\\\\\\\\\\\\\\"-mess we currently have.
>
> Also, many thanks for the other bugs you have filed recently. I am very
> grateful that you have included patches in them. :)
>
> Thanks,
> ~Niels
>
>
Just double checked this one: I think there is a bug in your proposed
patch. The "justdirs" is supposed to be in "opposite" order of "dirs"
("justdirs" are in "removal order" while "dirs" are in "creation order")
but as far as I can see that ordering is not preserved in the patch.
I think dh_usrlocal might be ready for some test cases to avoid future
breakage. If you want to have a look at that, it would be appreciated
as well - otherwise, I will probably look at it when I review your
updated patch.
Thanks,
~Niels
More information about the debhelper-devel
mailing list