hi Soren,

On Tue Nov 12, 2024 at 4:12 AM CET, Soren Stoutner wrote:
> On Tuesday, November 5, 2024 3:41:59 PM MST Serafeim (Serafi) Zanikolas wrote:
> > I'm fine with adding a dedicated adequate job, if you feel strongly about
> > this.
>
> In addition to adding an adequate Salsa CI job, you might also consider 
> updating the .sbuildrc example to contain the necessary information to also 
> run adequate (assuming it isn’t too complicated).
>
> https://wiki.debian.org/sbuild#Setup

that makes sense. here's the .sbuildrc snippet I came up with:

$external_commands = {
  "chroot-cleanup-commands" => [
    [ 'apt install -y --install-recommends adequate' ],
    [ 'perl -e \'open(FH, ">", "/var/lib/adequate/pending") or die $!; while 
(<>) { my @c=split(" ", $_); print FH "$c[1]\n" if $c[0] eq "Package:" }; 
close(FH);\' %SBUILD_PKGBUILD_DIR/debian/control' ],
    [ 'adequate', '--fail', '--pending' ],
  ]
};

before I update the wiki, any suggestions on how to simplify? it'd be much 
simpler if:

- sbuild external commands would allow for subshells:
    adequate --fail $(grep ^Binary: %SBUILD_PKGBUILD_DIR/debian/control' | cut 
-d: -f2)
- sbuild would populate an escape variable with the list of built binary
  packages:
    adequate --fail %SBUILD_BINARY_PKG_NAMES

thanks,
serafi

Attachment: signature.asc
Description: PGP signature

Reply via email to