Package: debootstrap Version: 1.0.10 Severity: wishlist Tags: patch This patch implements the "flat" mirror type, a trivial archive made by running dpkg-scanpackages on a single directory.
This is very useful when bootstrapping new ports, at the stage in which a proper archive is not setup and one wants to build a base system out of a set of hand-built debs. -- System Information: Debian Release: 5.0 APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.18-6-amd64 (SMP w/2 CPU cores) Locale: LANG=ca_AD.UTF-8, LC_CTYPE=ca_AD.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/bash Versions of packages debootstrap depends on: ii binutils 2.18.1~cvs20080103-7 The GNU assembler, linker and bina ii wget 1.11.4-2 retrieves files from the web debootstrap recommends no packages. debootstrap suggests no packages. -- no debconf information
diff -ur debootstrap-1.0.10/functions debootstrap-1.0.10.new/functions --- debootstrap-1.0.10/functions 2008-12-27 00:50:04.810414076 +0000 +++ debootstrap-1.0.10.new/functions 2008-12-27 00:50:24.834985012 +0000 @@ -226,6 +226,10 @@ DOWNLOAD_INDICES=download_main_indices DOWNLOAD_DEBS=download_main ;; + flat) + DOWNLOAD_INDICES=download_flat_indices + DOWNLOAD_DEBS=download_main + ;; *) error 1 BADMIRROR "unknown mirror style" ;; @@ -674,6 +678,28 @@ progress 100 100 DOWNMAINPKGS "Downloading Packages file" } +download_flat_indices () { + local m1="${MIRRORS%% *}" + progress 0 100 DOWNMAINPKGS "Downloading Packages file" + progress_next 100 + COMPONENTS=main + export COMPONENTS + for m in $MIRRORS; do + for c in $COMPONENTS; do + local m_path="Packages" + local path="dists/$SUITE/$c/binary-$ARCH/Packages" + local pkgdest="$TARGET/$($DLDEST pkg "$SUITE" "$c" "$ARCH" "$m" "$path")" + if [ -x /bin/gunzip ] && get "$m/${m_path}.gz" "${pkgdest}.gz"; then + rm -f "$pkgdest" + gunzip "$pkgdest.gz" + elif get "$m/$m_path" "$pkgdest"; then + true + fi + done + done + progress 100 100 DOWNMAINPKGS "Downloading Packages file" +} + download_main () { local m1="${MIRRORS%% *}"