#1146386 debootsnap: relative output paths are lost when the temporary directory is cleaned up

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
Tianyu Chen
Date:
2026-09-01 07:57:03 UTC
Severity:
normal
#1146386#5
Date:
2026-09-01 07:55:10 UTC
From:
To:
debootsnap's [output] parameter only works with an absolute tarball
path. Passing a relative path like `chroot.tar` actually generates the
tarball under a temporary directory and got cleanup when finishing.

def run_mmdebstrap(
    tmpdirname, sources: list[Source], nativearch, foreignarches, output
):
...
        cmd = [
            "mmdebstrap",
...
            output,
...
        subprocess.check_call(cmd, cwd=tmpdirname)

$ debootsnap --buildinfo=lrzsz_0.12.21-deepin1_amd64.buildinfo chroot.tar
...
$ ls chroot.tar
ls: cannot access 'chroot.tar': No such file or directory
$ debootsnap --buildinfo=lrzsz_0.12.21-deepin1_amd64.buildinfo $(pwd)/chroot.tar
...
$ ls chroot.tar
chroot.tar

Best,
Tianyu Chen