--- Begin Message ---
- To: Debian Bug Tracking System <submit@bugs.debian.org>
- Subject: "flat" mirror type
- From: Robert Millan <rmh@aybabtu.com>
- Date: Sat, 27 Dec 2008 00:57:51 +0000
- Message-id: <20081227005751.11189.78351.reportbug@thorin>
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%% *}"
--- End Message ---
--- Begin Message ---
- To: 509855-done@bugs.debian.org
- Subject: Re: Bug#509855: "flat" mirror type
- From: Robert Millan <rmh@aybabtu.com>
- Date: Fri, 23 Jan 2009 23:43:03 +0100
- Message-id: <20090123224303.GA32338@thorin>
- In-reply-to: <20081227005751.11189.78351.reportbug@thorin>
- References: <20081227005751.11189.78351.reportbug@thorin>
On Sat, Dec 27, 2008 at 12:57:51AM +0000, Robert Millan wrote:
> 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.
I realized that creating a "proper" mirror structure that debootstrap will
process is not such a big deal, even if you have to do it by hand. I think
my patch is not really that useful.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
--- End Message ---