Hi Guido,

On Thu, May 26, 2022 at 08:52:03PM +0200, Guido Günther wrote:
> Hi Julian,
> On Sun, Oct 24, 2021 at 09:48:04PM +0100, Julian Gilbey wrote:
> > Package: git-buildpackage
> > Version: 0.9.22
> > Severity: normal
> > 
> > I ran the following command:
> > 
> > gbp buildpackage --git-builder=sbuild -A -v -d unstable
> > 
> > and received the following error in the postbuild hook, which runs
> > lintian:
> > 
> > gbp:info: Running Postbuild hook
> > /home/jdg/debian/spyder-packages/pyxdameraulevenshtein/build-area/pyxdameraulevenshtein_1.7.0-1_all.changes
> >  is not a readable file
> > gbp:error: Postbuild-hook 'lintian $GBP_CHANGES_FILE' failed: it exited 
> > with 2
> > 
> > The changes file in this case is called ..._amd64.changes.
> > 
> > Running the build with --verbose resulted in the attached log file.
> > 
> > It seems that for sbuild, "-A" does not stop the Architecture: any
> > packages from being built, which is different from the "-A" option for
> > dpkg-buildpackage.
> 
> So would we rather check for `--no-arch-any` in the sbuild case?
> changes_file_suffix() would allow for that but I'd be great if an
> sbuild user would come up with a patch so I don't mess up any corner
> cases.
> Worst case we'd just ignore `-A` with sbuild for the moment.

I've just been looking at sbuild's documentation, and it decides how
to call dpkg-buildpackage (which itself determines the name of the
.changes file) using a mixture of commandline arguments, configuration
files and environment variables.  So it seems too much to try to work
out what the changes file will be called.

One possible option might be to try these in turn:

<pkg>_<version>_<arch>.changes
<pkg>_<version>_all.changes
<pkg>_<version>_source.changes

and check whether they exist and their timestamp is reasonable (say:
between the start of the sbuild call and the current time) before
using it.

Best wishes,

   Julian

Reply via email to