[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#458663: Missing support for data.tar.bz2-based debs



Package: debootstrap
Version: 1.0.6
Severity: wishlist
Tags: patch

Hi,

The current debootstrap code can't handle .debs which contain a
data.tar.bz2 instead of a data.tar.bz. Attached is a fix.

Marc
diff -Nwru debootstrap-1.0.7/debian/control debootstrap-1.0.7.he/debian/control
--- debootstrap-1.0.7/debian/control	2007-11-14 03:22:12.000000000 +0100
+++ debootstrap-1.0.7.he/debian/control	2008-01-02 11:48:53.000000000 +0100
@@ -9,7 +9,7 @@
 
 Package: debootstrap
 Architecture: all
-Depends: wget, binutils
+Depends: wget, binutils, bzip2
 Description: Bootstrap a basic Debian system
  debootstrap is used to create a Debian base system from scratch,
  without requiring the availability of dpkg or apt. It does this by
diff -Nwru debootstrap-1.0.7/functions debootstrap-1.0.7.he/functions
--- debootstrap-1.0.7/functions	2007-11-14 10:50:04.000000000 +0100
+++ debootstrap-1.0.7.he/functions	2008-01-02 11:47:59.000000000 +0100
@@ -718,7 +718,15 @@
 		progress "$p" "$#" EXTRACTPKGS "Extracting packages"
 		packagename="$(echo "$pkg" | sed 's,^.*/,,;s,_.*$,,')"
 		info EXTRACTING "Extracting %s..." "$packagename"
+		data_file="$(ar -t "./$pkg" | grep '^data')"
+		if [ "$data_file" = "data.tar.gz" ]; then
 		ar -p "./$pkg" data.tar.gz | zcat | tar -xf -
+		elif [ "$data_file" = "data.tar.bz2" ]; then
+			ar -p "./$pkg" data.tar.bz2 | bzcat | tar -xf -
+		else
+			echo "Something weird happened and I don't know how debootstrap handles errors"
+			exit 1
+		fi
 	done
 ); }
 

Reply to: