Bug#963079: debootstrap: --unpack-tarball without matching url from --make-tarball cause errors
Package: debootstrap
Version: 1.0.123
Severity: normal
Creating a tarball via --make-tarball and then unpacking causes an error when
the same url isn't specified during unpack.
Problem:
: debootstrap --arch amd64 --make-tarball=/tmp/debootstrap_pkgs.tar buster /tmp/junk http://ftp.us.debian.org/debian
I: Retrieving InRelease
I: Checking Release signature
I: Valid Release signature (key id 6D33866EDD8FFA41C0143AEDDCC9EFBF77E11517)
I: Retrieving Packages
I: Validating Packages
I: Resolving dependencies of required packages...
I: Resolving dependencies of base packages...
I: Checking component main on http://ftp.us.debian.org/debian...
I: Retrieving libacl1 2.2.53-4
I: Validating libacl1 2.2.53-4
I: Retrieving adduser 3.118
...
I: Retrieving zlib1g 1:1.2.11.dfsg-1
I: Validating zlib1g 1:1.2.11.dfsg-1
I: Deleting target directory
# So far so good
: sudo debootstrap --arch amd64 --unpack-tarball=/tmp/debootstrap_pkgs.tar buster /tmp/foo
I: Target architecture can be executed
I: Chosen extractor for .deb packages: dpkg-deb
I: Extracting libacl1...
I: Extracting adduser...
...
I: Configuring sysvinit-utils...
I: Configuring libc-bin...
I: Unpacking the base system...
# Failed
: echo $?
2
A little digging reveals:
/tmp/usr/share/debootstrap//functions: line 1498: /tmp/mnt1/foo/var/lib/apt/lists/deb.debian.org_debian_dists_buster_main_binary-amd64_Packages: No such file or directory
Expectations:
I would expect that the url would not be needed for unpacking. Even if this
behavior is somehow desired, it would be nice to have a more meaningful error
message so the user would have an indication of what they did wrong.
Workaround:
Specifying the url while unpacking makes this work.
: sudo debootstrap --arch amd64 --unpack-tarball=/tmp/debootstrap_pkgs.tar buster /tmp/foo http://ftp.us.debian.org/debian
Needing a url for an operation that should be offline seems strange.
Thank you!
Marco Fonseca
Reply to: