diff options
author | Ansgar Burchardt <ansgar@debian.org> | 2016-09-20 22:58:15 (GMT) |
---|---|---|
committer | Philipp Kern <phil@philkern.de> | 2016-10-04 10:35:53 (GMT) |
commit | c15d546dcef28a091b0e4ee849d46ae95529a96f (patch) | |
tree | 07c4f3b7060bee665d8c4119446172aa0e08e3a3 | |
parent | a08df002eb893e5ffb4e898de73fd3cfe87ed681 (diff) | |
download | debootstrap-c15d546dcef28a091b0e4ee849d46ae95529a96f.zip debootstrap-c15d546dcef28a091b0e4ee849d46ae95529a96f.tar.gz debootstrap-c15d546dcef28a091b0e4ee849d46ae95529a96f.tar.bz2 |
Add support for xz-compressed Packages indices
Bug: https://bugs.debian.org/837649
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | functions | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 27e512c..9bc36bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +debootstrap (1.0.84) UNRELEASED; urgency=medium + + * Add support for xz-compressed Packages indices. (Closes: #837649) + + -- Ansgar Burchardt <ansgar@debian.org> Wed, 21 Sep 2016 00:58:15 +0200 + debootstrap (1.0.83) unstable; urgency=medium [ Ansgar Burchardt ] @@ -331,6 +331,7 @@ get () { local iters=0 case "$typ" in + xz) from="$1.xz"; dest="$2.xz" ;; bz2) from="$1.bz2"; dest="$2.bz2" ;; gz) from="$1.gz"; dest="$2.gz" ;; *) from="$1"; dest="$2" ;; @@ -358,6 +359,7 @@ get () { case "$typ" in gz) gunzip "$dest" ;; bz2) bunzip2 "$dest" ;; + xz) unxz "$dest" ;; esac return 0 else @@ -566,6 +568,7 @@ download_release_indices () { local totalpkgs=0 for c in $COMPONENTS; do local subpath="$c/binary-$ARCH/Packages" + local xzi="`get_release_checksum "$reldest" "$subpath.xz"`" local bz2i="`get_release_checksum "$reldest" "$subpath.bz2"`" local gzi="`get_release_checksum "$reldest" "$subpath.gz"`" local normi="`get_release_checksum "$reldest" "$subpath"`" @@ -574,6 +577,8 @@ download_release_indices () { i="$normi" elif in_path bunzip2 && [ "$bz2i" != "" ]; then i="$bz2i" + elif in_path unxz && [ "$xzi" != "" ]; then + i="$xzi" elif in_path gunzip && [ "$gzi" != "" ]; then i="$gzi" fi @@ -591,6 +596,7 @@ download_release_indices () { for c in $COMPONENTS; do local subpath="$c/binary-$ARCH/Packages" local path="dists/$SUITE/$subpath" + local xzi="`get_release_checksum "$reldest" "$subpath.xz"`" local bz2i="`get_release_checksum "$reldest" "$subpath.bz2"`" local gzi="`get_release_checksum "$reldest" "$subpath.gz"`" local normi="`get_release_checksum "$reldest" "$subpath"`" @@ -600,6 +606,10 @@ download_release_indices () { ext="$ext $normi ." i="$normi" fi + if in_path unxz && [ "$xzi" != "" ]; then + ext="$ext $xzi xz" + i="${i:-$xzi}" + fi if in_path bunzip2 && [ "$bz2i" != "" ]; then ext="$ext $bz2i bz2" i="${i:-$bz2i}" |