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

Bug#601821: debootstrap: please change sid and gutsy scripts to use tabs



Karl Goetz wrote:
> Attached patch changes scripts/{sid,gutsy} to use tabs instead of mixed spaces
> and tabs.
> This allows diff to create a useful comparison of the files (and has revealed
> a couple of seemingly pointless differences).

Some I've resolved now. Leaving notably:

--- sid	2010-10-31 10:35:33.091309635 -0400
+++ gutsy	2010-10-31 10:35:33.091309635 -0400
@@ -110,7 +114,7 @@
 	x_core_install dpkg
 
 	if [ ! -e "$TARGET/etc/localtime" ]; then
-		ln -sf /usr/share/zoneinfo/UTC "$TARGET/etc/localtime"
+		ln -sf /usr/share/zoneinfo/Etc/UTC "$TARGET/etc/localtime"
 	fi
 
 	if doing_variant fakechroot; then

The files have identical content; I don't know which choice is "better",
or if there is any difference.

@@ -137,15 +141,18 @@
 
 	info UNPACKREQ "Unpacking required packages..."
 
-	exec 7>&1
-
 	smallyes '' |
 		(repeatn 5 in_target_failmsg UNPACK_REQ_FAIL_FIVE "Failure while unpacking required packages.  This will be attempted up to five times." "" \
-		dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 || echo EXITCODE $?) |
-		dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING
+		dpkg --status-fd 8 --force-depends --unpack $(debfor $required) 8>&1 1>&7 |
+		dpkg_progress $baseprog $bases UNPACKREQ "Unpacking required packages" UNPACKING) 7>&1

Seems like the gutsy script is either more or less robust here without
the || echo , not sure which. :)

The 7>&1 is the largest source of divergence. I don't see why the gutsy
script couldn't use the same one-time redirect that sid does. However,
I don't fully understand the FD dance going on here.

@@ -153,12 +160,21 @@
 echo \"Warning: Fake start-stop-daemon called, doing nothing\"" > "$TARGET/sbin/start-stop-daemon"
 	chmod 755 "$TARGET/sbin/start-stop-daemon"
 
+	if [ -x "$TARGET/sbin/initctl" ]; then
+	  mv "$TARGET/sbin/initctl" "$TARGET/sbin/initctl.REAL"
+	  echo \
+"#!/bin/sh
+echo
+echo \"Warning: Fake initctl called, doing nothing\"" > "$TARGET/sbin/initctl"
+	  chmod 755 "$TARGET/sbin/initctl"
+	fi

If debian ever gets upstart in base, we could use that too, I guess
not needed yet. (Though it couldn't hurt to put it in..)

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: