summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Burchardt <ansgar@debian.org>2016-09-09 21:03:23 (GMT)
committerAnsgar Burchardt <ansgar@debian.org>2016-09-09 21:03:23 (GMT)
commit316ba08b931e6f226b25c396b45b6add58b578e2 (patch)
tree725e4dbf3517cc2ba2f315c8d6cbf0311958fbb4
parent282a804ebf108c49c3f205cb23590a326b2dda2b (diff)
downloaddebootstrap-316ba08b931e6f226b25c396b45b6add58b578e2.zip
debootstrap-316ba08b931e6f226b25c396b45b6add58b578e2.tar.gz
debootstrap-316ba08b931e6f226b25c396b45b6add58b578e2.tar.bz2
Feign install of dpkg in second stage
Using the `dpkg-deb` extractor, or more precise `dpkg-deb -f`, together with busybox' `tar` results in failure: `dpkg-deb` passes additional options to `tar` that are not understood by busybox' implementation such as `--warning=no-timestamp`. We can avoid this by feigning the installation of `dpkg` in the second stage. Here it is possible to call the installed `dpkg-deb` together with the installed (GNU) `tar`.
-rw-r--r--scripts/sid10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/sid b/scripts/sid
index 428c676..ceedd66 100644
--- a/scripts/sid
+++ b/scripts/sid
@@ -59,11 +59,15 @@ first_stage_install () {
fi
setup_devices
+}
+
+second_stage_install () {
+ setup_dynamic_devices
x_feign_install () {
local pkg="$1"
local deb="$(debfor $pkg)"
- local ver="$(extract_deb_field "$TARGET/$deb" Version)"
+ local ver="$(in_target dpkg-deb -f "$deb" Version)"
mkdir -p "$TARGET/var/lib/dpkg/info"
@@ -77,10 +81,6 @@ Status: install ok installed" >> "$TARGET/var/lib/dpkg/status"
}
x_feign_install dpkg
-}
-
-second_stage_install () {
- setup_dynamic_devices
x_core_install () {
smallyes '' | in_target dpkg --force-depends --install $(debfor "$@")