[23108] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r22771 - trunk/debathena/third/common

daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Tue Feb 26 03:10:43 2008

Date: Tue, 26 Feb 2008 03:10:29 -0500 (EST)
From: ghudson@MIT.EDU
Message-Id: <200802260810.DAA08215@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: ghudson
Date: 2008-02-26 03:10:28 -0500 (Tue, 26 Feb 2008)
New Revision: 22771

Modified:
   trunk/debathena/third/common/debathenificator.sh
Log:
* debathena/third/common/debathenificator.sh: Use explicit session
  creation and destruction to avoid the need for an su inside the
  chroot.


Modified: trunk/debathena/third/common/debathenificator.sh
===================================================================
--- trunk/debathena/third/common/debathenificator.sh	2008-02-26 04:01:56 UTC (rev 22770)
+++ trunk/debathena/third/common/debathenificator.sh	2008-02-26 08:10:28 UTC (rev 22771)
@@ -56,7 +56,11 @@
 	    dch_done=
 	    hack_package
 	    [ -n "$dch_done" ]
-	    schroot -c "$chroot" -u root -- sh -c "apt-get -q -y build-dep '$name' && apt-get -q -y install devscripts && su '$USER' --shell=/bin/sh -c 'debuild -S -sa -us -uc -i -I.svn'"
+	    sid=$(schroot -b -c "$chroot")
+	    trap 'schroot -e -c "$sid"' EXIT
+	    schroot -r -c "$sid" -u root -- apt-get -q -y build-dep "$name"
+	    schroot -r -c "$sid" -u root -- apt-get -q -y install devscripts
+	    schroot -r -c "$sid" -- debuild -S -sa -us -uc -i -I.svn
 	)
 	[ $? -eq 0 ] || {
 	    bash -c "diff -u <(xxd '${name}_$origversion.orig.tar.gz') <(xxd '$tmpdir/${name}_$origversion.orig.tar.gz')"


home help back first fref pref prev next nref lref last post