On Fri, Nov 25, 2016 at 06:09:02PM +0100, Guillem Jover wrote: > Hi! > > On Fri, 2016-11-25 at 12:32:18 +0100, Axel Beckert wrote: > > Package: devscripts > > Version: 2.16.9 > > File: /usr/bin/debuild > > > since the recent slimming of debuild, DEBUILD_LINTIAN_HOOK no more works > > for me. > > > > I've set > > > > DEBUILD_LINTIAN_HOOK="if [ -d %p-%u ]; then cd %p-%u; duck; elif [ -d %p > > ]; then cd %p; duck; else exit 1; fi; true" > > > > This now leads to error messages like this one: > > > > dpkg-buildpackage: error: if [ -d aiccu-20070115 ]; then cd > > aiccu-20070115; duck; elif [ -d aiccu ]; then cd aiccu; duck; else exit 1; > > fi; true gave error exit status 1 > > > > This happens despite the directory is named "aiccu". > > > > I suspect that while classic debuild passed the string in > > $DEBUILD_LINTIAN_HOOK to "sh -c" to interpret shell meta characters, the > > slimmed debuild (or dpkg-buildpackage's --hook-check) no more does. > > The problem actually seems to be that dpkg-buildpackage always runs > the hooks from inside the source tree, but debuild used to run some > hooks from inside the tree and some from one level up.
Yes, that does seem to be the issue. - dpkg-buildpackage hook, in tree - clean hook, in tree - dpkg-source hook, in tree - build hook, in tree - binary hook, in tree - dpkg-genchanges hook, in tree - final-clean hook, in tree - lintian hook, parent - signing hook, parent - post-dpkg-buildpackage, parent > I think > starting after the changes generation? But I've not dug very deep. > I also notice this is not documented neither in debuild nor > dpkg-buildpackage man pages. I'll fix that on the dpkg side. I'll add some documentation about the debuild hooks, as well. > I'm not sure how we should handle this, w/o breaking both interfaces. > Perhaps it would not be that "onerous" (ehem) to prepend a "cd ..;" for > the hooks that debuild expects to run a level up (yeah I know… :). The debuild hooks should probably start being deprecated in Buster so this confusion isn't permanent. In the meantime, "cd ..;" seems like the least intrusive option. Cheers, -- James GPG Key: 4096R/91BF BF4D 6956 BD5D F7B7 2D23 DFE6 91AE 331B A3DB _______________________________________________ devscripts-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/devscripts-devel
