Package: apt
Version: 2.2.4
Severity: minor

On a system with bullseye and bullseye-backports,
I wanted to source the latest vlc apt had anywhere (backports or not).
That is, temporarily override any pinning.

    $ apt source   -t/./ vlc     # gives confusing error (see below)
    $ apt download -t/./ vlc     # works as expected

The expected behaviour is that --target-release works the same for "apt source" 
as it does for "apt download" (or "apt install").


20:40 <juliank> twb: So source does not support regular expressions or glob 
patterns in -t, APT::Default-Release
20:40 <juliank> only exact release names
20:41 <juliank> twb: presumably nobody noticed that it did its own matching :)
20:41 <twb> OK.  If that's known/expected behaviour, then it's not a bug
20:42 <juliank> i think it's a bug because it's an oversight and clashes with 
the release notes
20:42 <juliank> which suggested that default-release 
"/^bullseye(-security|-updates)$/" works as "bullseye" would have before; but 
it breaks source


Here is full transcript for bullseye:

        bash5$ mmdebstrap bullseye /dev/null --customize-hook='chroot $1 apt 
download -t/./ vlc' --customize-hook='chroot $1 apt source -t/./ vlc'  'deb 
http://deb.debian.org/debian bullseye main' 'deb-src 
http://deb.debian.org/debian bullseye main'
        I: automatically chosen mode: unshare
        I: chroot architecture amd64 is equal to the host's architecture
        I: automatically chosen format: tar
        I: using /tmp/mmdebstrap.FcuegMKvYL as tempdir
        I: running apt-get update...
        done
        I: downloading packages with apt...
        done
        I: extracting archives...
        done
        I: installing essential packages...
        done
        I: downloading apt...
        done
        I: installing apt...
        done
        I: installing remaining packages inside the chroot...
        done
        done
-->     I: running --customize-hook in shell: sh -c 'chroot $1 apt download 
-t/./ vlc' exec /tmp/mmdebstrap.FcuegMKvYL
-->     Get:1 http://deb.debian.org/debian bullseye/main amd64 vlc amd64 
3.0.16-1 [144 kB]
        Fetched 144 kB in 0s (1526 kB/s)
        W: Download is performed unsandboxed as root as file 
'//vlc_3.0.16-1_amd64.deb' couldn't be accessed by user '_apt'. - 
pkgAcquire::Run (13: Permission denied)
-->     I: running --customize-hook in shell: sh -c 'chroot $1 apt source -t/./ 
vlc' exec /tmp/mmdebstrap.FcuegMKvYL
-->     Reading package lists... Done
        E: Unable to find a source package for vlc
        E: run_chroot failed: E: command failed: chroot $1 apt source -t/./ vlc
        W: listening on child socket failed: 
        I: removing tempdir /tmp/mmdebstrap.FcuegMKvYL...


Here is a full transcript for sid:

        bash5$ mmdebstrap unstable /dev/null --customize-hook='chroot $1 apt 
download -t/./ vlc' --customize-hook='chroot $1 apt source -t/./ vlc'  'deb 
http://deb.debian.org/debian unstable main' 'deb-src 
http://deb.debian.org/debian unstable main'
        I: automatically chosen mode: unshare
        I: chroot architecture amd64 is equal to the host's architecture
        I: automatically chosen format: tar
        I: using /tmp/mmdebstrap.nTcELCiBZM as tempdir
        I: running apt-get update...
        done
        I: downloading packages with apt...
        done
        I: extracting archives...
        done
        I: installing essential packages...
        done
        I: downloading apt...
        done
        I: installing apt...
        done
        I: installing remaining packages inside the chroot...
        done
        done
-->     I: running --customize-hook in shell: sh -c 'chroot $1 apt download 
-t/./ vlc' exec /tmp/mmdebstrap.nTcELCiBZM
-->     Get:1 http://deb.debian.org/debian unstable/main amd64 vlc amd64 
3.0.16-1+b4 [145 kB]
        Fetched 145 kB in 0s (1443 kB/s)
        W: Download is performed unsandboxed as root as file 
'//vlc_3.0.16-1+b4_amd64.deb' couldn't be accessed by user '_apt'. - 
pkgAcquire::Run (13: Permission denied)
-->     I: running --customize-hook in shell: sh -c 'chroot $1 apt source -t/./ 
vlc' exec /tmp/mmdebstrap.nTcELCiBZM
-->     Reading package lists... Done
-->     E: Can not find version '3.0.16-1' of package 'vlc'
-->     E: Unable to find a source package for vlc
        E: run_chroot failed: E: command failed: chroot $1 apt source -t/./ vlc
        W: listening on child socket failed: 
        I: removing tempdir /tmp/mmdebstrap.nTcELCiBZM...
        bash5$

Reply via email to