Use Release file to determine Contents-$arch.gz files
Ubuntu uses /dists/$dist/Content-$arch.gz, but Debian uses
/dists/$dist/$component/Content-$arch.gz. Thus download the Release file
and search for Content-$arch.gz files.
Note: This introduces a dependency on python-debian!
The system might use outdated packages that are no longer available from
the Debian archive. Thus add support for downloading them from http://snapshot.debian.org.
needed_runtime_packages() is called for finding packages that are not
installed in the sandbox yet. If the libs are already installed in the
sandbox, do not try to further search for the related package.
The DistroRelease contains GNU/Linux on Debian (example: "Debian
GNU/Linux 8"). The containing slash is very confusing when using the
DistroRelease as path.
name[1:-2] strips one leading characters and two trailing characters and
removes one character too much at the end. Thus the name.endswith check
fails to match 'GNU/Linux' and does nothing. If it was matching
GNU/Linux, it would set name to a list.
Fix the parsing of /etc/os-release by using shlex.