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

Bug#684896: live-build: loading of build.sh does not work as expected in various scripts



Package: live-build
Version: 3.0~a57-1
Severity: important

Hi, the code used to load build.sh changed multiple times recently:

- What's in git debian-next right now (14f5793) does not work if you
  install it as a Debian package.

  The code is:
  . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || . /usr/lib/live/build.sh

  But the result is:
# sh -x /usr/bin/lb clean --purge
+ set -e
+ . /scripts/build.sh
# echo $?
127

- What's in sid right now (3.0~a57-1) does not work in the case where you
  want to run it out of a git checkout:

  The code is:
  ( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh

  But the result is that the stuff exported by build.sh is only available
  in the sub-shell and immediately lost.


Those few lines are duplicated across many scripts. My suggestion is to
do the check only once in bin/lb (with a real if statement and not an ||
construct) and to export a variable with the path to build.sh and source
that in other scripts.

Cheers,

-- Package-specific info:

-- System Information:
Debian Release: wheezy/sid
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'proposed-updates'), (500, 'unstable'), (500, 'testing'), (500, 'stable'), (150, 'experimental')
Architecture: i386 (x86_64)
Foreign Architectures: amd64

Kernel: Linux 3.4-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages live-build depends on:
ii  cdebootstrap  0.5.9
ii  debootstrap   1.0.42

Versions of packages live-build recommends:
ii  cpio                            2.11-8
ii  gnu-fdisk                       1.2.4-3.1
ii  live-boot-doc                   3.0~a38-1
ii  live-config-doc                 3.0.1-1
ii  live-manual-html [live-manual]  1:3.0~a15-1

Versions of packages live-build suggests:
ii  dosfstools                  3.0.13-1
ii  fakeroot                    1.18.4-2
ii  genisoimage                 9:1.1.11-2
ii  git                         1:1.7.10.4-1
ii  grub                        0.97-66
ii  memtest86+                  4.20-1.1
ii  mtools                      4.0.17-1
ii  parted                      2.3-10
pn  squashfs-tools | mtd-tools  <none>
ii  sudo                        1.8.5p2-1
ii  syslinux                    2:4.05+dfsg-6
ii  uuid-runtime                2.20.1-5.1
pn  win32-loader                <none>

-- no debconf information


Reply to: