Hi, Quoting Felipe Sateler (2021-11-12 16:37:01) > On Thu, Nov 11, 2021, 11:45 Johannes Schauer Marin Rodrigues > <jo...@debian.org> wrote: > > if desired, I can greatly reduce the size of the patch by removing the > > assertdpkgroot() and assertnotdpkgroot() functions. I used those to make > > sure > > that the paths as they are passed around in deb-systemd-helper are having > > DPKG_ROOT prepended only if desired and if yes, only once. Since our tests > > did > > not trigger any errors and produces bit-by-bit identical results, I assume > > that > > it works correctly and theoretically the two assert functions could be > > removed, > > thus reducing the size of the patch significantly. > > > > > My concern is more the non-DRYness of it. What if a new path is added? Do I > need to check dpkgroot or not? I think some abstraction is missing in the > tools (that is, am I operating on the target or the host?)
do you have some concrete ideas of how you'd like me to rewrite my patch so that it addresses your concern? > > For normal installations, the value of $DPKG_ROOT is the empty string. I > > think it's easy to see that in the normal case, the behaviour of the script > > would not change. > > > > This is the test I'd like. More precisely, that the tools are doing what they > are supposed to do. I see that the test suite is using an unpackaged Perl module and requires root to execute. I can rewrite the testsuite to be runnable without root and to not require that unpackaged Perl module. Would you like me to do that? Then I'd first file a merge request for the improved test suite and then rebase my DPKG_ROOT patch on top of that once you are satisfied with the testsuite improvements. Thanks! cheers, josch
signature.asc
Description: signature