Package: sbuild
Version: 0.91.1
Severity: normal

Dear Maintainer,

While trying to add an extra repo needed by my autopkgtest run, and after
understanding that --extra-repository only applies to the build step, I started
trying to use --autopkgtest-opts.

$ --autopkgtest-opts=--add-apt-source='deb http://deb.example.net/ experimental 
main'
[...]
autopkgtest
-----------

autopkgtest [16:59:30]: starting date and time: 2025-10-09 16:59:30+0200
autopkgtest [16:59:30]: version 5.51
autopkgtest [16:59:30]: host skade; command line: /usr/bin/autopkgtest 
/tmp/lazygal_0.11-2_amd64.changes -- unshare --release unstable --arch amd64 
--add-apt-source=deb http://deb.example.net/ experimental main
usage: autopkgtest-virt-unshare [-h] [-a ARCH] [-b OUTSIDE INSIDE] [-d]
                                [--bootstrapcmd BOOTSTRAPCMD] [-p PREFIX]
                                [-r RELEASE] [-t TARBALL] [-u UNPACK_DIR]
autopkgtest-virt-unshare: error: unrecognized arguments: --add-apt-source=deb 
http://deb.example.net/ experimental main

It seems that unshare makes AUTOPKGTEST_OPTIONS initialized with "-- unshare..."
and that --autopkgtest-opts gets appended after which make the command line 
fail.

The badly generated command line is:

    /usr/bin/autopkgtest /tmp/lazygal_0.11-2_amd64.changes -- unshare --release 
unstable --arch amd64 --add-apt-source='deb http://deb.example.net/ 
experimental main'

instead of:

    /usr/bin/autopkgtest --add-apt-source='deb http://deb.example.net/ 
experimental main' /tmp/lazygal_0.11-2_amd64.changes -- unshare --release 
unstable --arch amd64

Thanks,

Alex

-- System Information:
Debian Release: forky/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 6.1.0-39-amd64 (SMP w/4 CPU threads; PREEMPT)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages sbuild depends on:
ii  iproute2        6.17.0-1
ii  libsbuild-perl  0.91.1
ii  perl            5.40.1-6
ii  uidmap          1:4.18.0-1

Versions of packages sbuild recommends:
ii  mmdebstrap      1.5.7-3
ii  sbuild-schroot  0.91.1

Versions of packages sbuild suggests:
ii  autopkgtest  5.51
pn  piuparts     <none>

-- no debconf information

Reply via email to