Hi,

Quoting Sebastian Ramacher (2024-12-23 16:35:03)
> I am using a sbuild+schroot setup (unmodified schroot config, sbuild has
> purge_build_directory set to "successful"). That means that
> /var/lib/sbuild/build is mounted as persistent /build. Consequently,
> when you do:
> 
> $ dpkg-buildpackage -S
> $ sbuild $dsc
> 
> and repeat this step without changing the version number and a build
> fails, sbuild will continue building the failing version even if the dsc
> changed. dpkg-source fails to unpack the new source packages as the
> target path already exists:
> 
> $ dpkg-source -x libmpc_0.1\~r495-3.dsc
> dpkg-source: warning: extracting unsigned source package 
> (libmpc_0.1~r495-3.dsc)
> dpkg-source: info: extracting libmpc in libmpc-0.1~r495
> dpkg-source: error: unpack target exists: libmpc-0.1~r495
> 
> But sbuild does not seem to check the exit code of dpkg-source and
> continues with the build.
> 
> Let me know if you need any more information.

thank you for your bug report and sorry for having created this situation in
the first place. I wonder what the best way forward is. I can think of multiple
things that sbuild can do but I am surprised that sbuild does not seem to check
the exit code of dpkg-source. It should be checked here:

https://sources.debian.org/src/sbuild/0.88.1/lib/Sbuild/Build.pm/#L2264

But then you should never run into this code path in the first place because
sbuild checks if $dscdir already exists and only extracts the source if it does
not. Could you try finding out what is going on with some printf debugging?

That being said, unless we decide that sbuild should *remove* any existing
unpacked source package, your setup sounds incompatible with having a static
build path as it is used on the buildds. How would you prefer to see this
resolved? Should sbuild bail out early with a better error message?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to