Johannes Schauer Marin Rodrigues <[email protected]> writes:

> Hi,
>
> Quoting Xiyue Deng (2025-11-12 19:09:40)
>> > the problem is not the -S. The problem is that you call dpkg-buildpackage.
>> > The options you pass to it (and that includes but is not limited to -S) 
>> > will
>> > not take into account with which options you run sbuild.
>> >
>> > What is the purpose of running that command in the first place?
>> 
>> This is to check whether the package can be built twice-in-a-row without
>> leaving any residual files.  I think this is not enforced yet, but still
>> good to have.
>> 
>> > I would remove it completely. There is no way to run this command reliably
>> > (with or without -S) unless you know that you will never use sbuild with
>> > exactly the same options all the time.
>> 
>> I'm not sure whether there is a better way to do this in sbuild.  I
>> think pbuilder has `--twice' for this purpose.
>
> There currently is good way to do this in sbuild in a well-behaving manner.
> If you want this feature in sbuild instead of relying on, for example, salsa 
> CI
> you could contribute a patch.
>

Not sure I have the required skill set yet, but will try.

> The sbuild command which Lucas used to test whether packages build twice in a
> row was:
>
> sbuild -n -A -s --force-orig-source --apt-update -d unstable -v 
> --no-run-lintian \
> --starting-build-commands="cd %SBUILD_PKGBUILD_DIR && runuser -u $(id -un) -- 
> dpkg-buildpackage --sanitize-env -us -uc -rfakeroot" \
> --finished-build-commands="cd %SBUILD_PKGBUILD_DIR && runuser -u $(id -un) -- 
> dpkg-buildpackage --sanitize-env -us -uc -rfakeroot -S" \
>
> This is what I meant above with "unless you know that you will never use 
> sbuild
> with exactly the same options all the time." In Lucas setup, the sbuild 
> options
> were always the same, so adding this custom command is not a problem. It is a
> problem though when you use sbuild to build different artifacts using 
> different
> options. The dpkg-buildpackage command will ignore the options you pass to it.
>

Ack.

> On a personal note: maybe do not always build packages twice in a row by
> default. I suspect that the changes which break the property of being able to
> do that are rare and it's sufficient to test this maybe once a year or once
> before a stable release. If you build your package twice in a row all the 
> time,
> you are mostly just increasing the carbon dioxide in the air for not much
> benefit.
>

Agreed.  It makes sense to only enable it occasionally to debug.  Still,
having "--twice" would make it easier.

> Thanks!
>
> cheers, josch

-- 
Regards,
Xiyue Deng

Attachment: signature.asc
Description: PGP signature

Reply via email to