[PATCH] Re: problem building -next on Lenny
On Sat, Feb 13, 2010 at 12:00:34AM +0200, Tzafrir Cohen wrote:
> On Fri, Feb 12, 2010 at 01:03:40AM +0200, Tzafrir Cohen wrote:
> > Hi
> > Short story: I can't get latest live-helper to build on Lenny. I'm not
> > sure exactly where the problem is.
> > mkdir test
> > cd test
> > git clone git://live.debian.net/git/live-helper.git
> > cd live-helper
> > git checkout --track -b local origin/debian-next
> In that branch 'lh_chroot' was renamed 'chroot'
> > cd ..
> > # The binary-mirror is probably irrelevant
> > # Using the default debootstrap leads to an error on mounting proc
> > ./live-helper/helpers/local lh config --mirror-binary http://mirror.isoc.org.il/pub/debian/ --bootstrap cdebootstrap
> > ./live-helper/helpers/local lh build
> Also adds the helpers directory to the path.
> 'chroot' will then try to run helpers/chroot
I'm not sure the directory name in this patch is the right one, but this
patch looks like a reasonable fix.
>From e4958c5eaea928f4fdb43dfff8872be0f5f9dcca Mon Sep 17 00:00:00 2001
From: Tzafrir Cohen <email@example.com>
Date: Sun, 14 Feb 2010 09:40:05 +0200
Subject: [PATCH] no need for helpers/ in the path of local build
The helper script 'local' allows building using the git checkout without
an install. Originally it was intended for live-helper 1, where all the
helper scripts were independent binaries. Which is why it adds the
helpers/ directory to the beginning of PATH.
However as of live-helper 2 only 'lh' itself is needed from that
directory. What's even worse, as of recent commits the lh_prefix was
dropped. Which means 'chroot' from the helpers directory will be run is
you run 'chroot', cuasing obscure bugs.
Thus a temporary localbin directory is created with a symlink to lh, and
only that directory is included in the PATH.
helpers/local | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/helpers/local b/helpers/local
index 16e228e..b2d568a 100755
@@ -7,8 +7,14 @@
# This is free software, and you are welcome to redistribute it
# under certain conditions; see COPYING for details.
+if [ ! -x localbin/lh ]
+ mkdir -p localbin
+ ln -s ../live-helper/helpers/lh localbin/
export LH_BASE PATH