[Debian-live-changes] r1021 - in dists/trunk/live-helper: doc
functions helpers
Daniel Baumann
daniel at alioth.debian.org
Wed Apr 11 16:25:19 UTC 2007
Author: daniel
Date: 2007-04-11 16:25:18 +0000 (Wed, 11 Apr 2007)
New Revision: 1021
Added:
dists/trunk/live-helper/functions/exit.sh
Modified:
dists/trunk/live-helper/doc/ChangeLog
dists/trunk/live-helper/helpers/lh_binary_grub
dists/trunk/live-helper/helpers/lh_chroot_apt
dists/trunk/live-helper/helpers/lh_config
dists/trunk/live-helper/helpers/lh_source_config
dists/trunk/live-helper/helpers/lh_source_download
dists/trunk/live-helper/helpers/lh_source_generic
dists/trunk/live-helper/helpers/lh_source_hdd
dists/trunk/live-helper/helpers/lh_source_iso
dists/trunk/live-helper/helpers/lh_source_md5sum
dists/trunk/live-helper/helpers/lh_source_net
dists/trunk/live-helper/helpers/lh_source_usb
Log:
Modified: dists/trunk/live-helper/doc/ChangeLog
===================================================================
--- dists/trunk/live-helper/doc/ChangeLog 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/doc/ChangeLog 2007-04-11 16:25:18 UTC (rev 1021)
@@ -5,6 +5,13 @@
- helpers/lh_chroot_linuximage: Added additional options to
kernel-img.conf.
- helpers/lh_chroot_proc: Made binfmt umount conditional.
+ * helpers/lh_binary_grub, lh_binary_syslinux:
+ - Added failsafe kernel entries.
+ * helpers/lh_chroot_apt:
+ - Using apt.conf.d also for apt, not just for aptitude.
+ - Minor code cleanup.
+ * helpers/lh_source_*:
+ - Minor code cleanup.
* helpers/lh_source_download:
- Added LIVE_BOOTLOADER to the list of source packages.
Added: dists/trunk/live-helper/functions/exit.sh
===================================================================
--- dists/trunk/live-helper/functions/exit.sh 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/functions/exit.sh 2007-04-11 16:25:18 UTC (rev 1021)
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# exit.sh - cleanup
+# Copyright (C) 2006-2007 Daniel Baumann <daniel at debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
+
+set -e
+
+Exit ()
+{
+ if [ "${LH_DEBUG}" = "enabled" ]
+ then
+ set | grep -e ^LH -e ^LIVE
+ fi
+}
Property changes on: dists/trunk/live-helper/functions/exit.sh
___________________________________________________________________
Name: svn:executable
+ *
Modified: dists/trunk/live-helper/helpers/lh_binary_grub
===================================================================
--- dists/trunk/live-helper/helpers/lh_binary_grub 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_binary_grub 2007-04-11 16:25:18 UTC (rev 1021)
@@ -132,14 +132,18 @@
LIVE_BOOTAPPEND="`echo ${LIVE_BOOTAPPEND} | sed -e 's/ //'`"
+FAILSAFE="vga=normal noagp noapic noapm nobluetooth nocpufreq nodbus nodhcp nodma nofirewire nomce nopcmcia noscsi nosound nousb xmodule=vesa"
+
# Assembling kernel configuration
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
- LINUX="title\t\tDebian GNU/Linux - Live\nkernel\t\t/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="title\t\tDebian GNU/Linux - Live\nkernel\t\t/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live (failsafe mode)\nkernel\t\t/`basename ${DESTDIR}`/`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
else
DEFAULT_FLAVOUR="`echo ${LIVE_KERNEL_FLAVOUR} | awk '{ print $1 }'`"
- LINUX="title\t\tDebian GNU/Linux - Live\nkernel\t\t`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}`\ninitrd\t\tinitrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="title\t\tDebian GNU/Linux - Live\nkernel\t\t`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\tinitrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live (failsafe mode)\nkernel\t\t`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\tinitrd.img-`basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR} | sed -e 's/vmlinuz-//'`"
fi
if [ "`echo ${LIVE_KERNEL_FLAVOUR} | wc -w`" -gt "1" ]
@@ -150,18 +154,22 @@
then
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t/`basename ${DESTDIR}`/`basename ${KERNEL}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t/`basename ${DESTDIR}`/`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (failsafe mode)\nkernel\t\t/`basename ${DESTDIR}`/`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
else
- LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t`basename ${KERNEL}`\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="title\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel\t\t`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (failsafe mode)\nkernel\t\t`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
fi
else
if [ "${LIVE_BINARY_IMAGE}" = "iso" ]
then
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel /`basename ${DESTDIR}`/`basename ${KERNEL}`\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel /`basename ${DESTDIR}`/`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (failsafe mode)\nkernel /`basename ${DESTDIR}`/`basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\t/`basename ${DESTDIR}`/initrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
else
- LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel `basename ${KERNEL}`\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'` boot=casper LIVE_BOOTAPPEND"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'`\nkernel `basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
+ LINUX="${LINUX}\n\ntitle\t\tDebian GNU/Linux - Live, kernel `basename ${KERNEL} | sed -e 's/vmlinuz-//'` (failsafe mode)\nkernel `basename ${KERNEL}` boot=casper LIVE_BOOTAPPEND ${FAILSAFE}\ninitrd\t\tinitrd.img-`basename ${KERNEL} | sed -e 's/vmlinuz-//'`"
fi
- fi
+ fi
done
fi
Modified: dists/trunk/live-helper/helpers/lh_chroot_apt
===================================================================
--- dists/trunk/live-helper/helpers/lh_chroot_apt 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_chroot_apt 2007-04-11 16:25:18 UTC (rev 1021)
@@ -47,139 +47,78 @@
# Checking stage file
Check_stagefile .stage/chroot_apt
- if [ -f chroot/etc/apt/apt.conf ]
+ if [ ! -d chroot/etc/apt/apt.conf.d ]
then
- # Remove old /etc/apt/apt.conf
- rm -f chroot/etc/apt/apt.conf
- fi
-
- if [ "${LH_APT}" = "aptitude" ] && [ ! -d chroot/etc/apt/apt.conf.d ]
- then
mkdir -p chroot/etc/apt/apt.conf.d
fi
# Configuring apt ftp proxy
if [ -n "${LH_APT_FTPPROXY}" ]
then
- case "${LH_APT}" in
- apt|apt-get)
- echo "Acquire::ftp::Proxy \"${LH_APT_FTPPROXY}\";" >> chroot/etc/apt/apt.conf
- ;;
-
- aptitude)
- echo "Acquire::ftp::Proxy \"${LH_APT_FTPPROXY}\";" > chroot/etc/apt/apt.conf.d/ftp-proxy
- ;;
- esac
+ echo "Acquire::ftp::Proxy \"${LH_APT_FTPPROXY}\";" > chroot/etc/apt/apt.conf.d/00ftp-proxy
fi
# Configuring apt http proxy
if [ -n "${LH_APT_HTTPPROXY}" ]
then
- case "${LH_APT}" in
- apt|apt-get)
- echo "Acquire::http::Proxy \"${LH_APT_HTTPPROXY}\";" >> chroot/etc/apt/apt.conf
- ;;
-
- aptitude)
- echo "Acquire::http::Proxy \"${LH_APT_HTTPPROXY}\";" > chroot/etc/apt/apt.conf.d/http-proxy
- ;;
- esac
+ echo "Acquire::http::Proxy \"${LH_APT_HTTPPROXY}\";" > chroot/etc/apt/apt.conf.d/00http-proxy
fi
# Configuring apt pdiffs
- if [ "${LH_APT_PDIFFS}" = "enabled" ]
- then
- case "${LH_APT}" in
- apt|apt-get)
- echo "Acquire::PDiffs \"true\";" >> chroot/etc/apt/apt.conf
- ;;
+ case "${LH_APT_PDIFFS}" in
+ enabled)
+ echo "Acquire::PDiffs \"true\";" > chroot/etc/apt/apt.conf.d/00pdiffs
+ ;;
- aptitude)
- echo "Acquire::PDiffs \"true\";" > chroot/etc/apt/apt.conf.d/pdiffs
- ;;
- esac
- else
- case "${LH_APT}" in
- apt|apt-get)
- echo "Acquire::PDiffs \"false\";" >> chroot/etc/apt/apt.conf
- ;;
+ disabled)
+ echo "Acquire::PDiffs \"false\";" > chroot/etc/apt/apt.conf.d/00pdiffs
+ ;;
+ esac
- aptitude)
- echo "Acquire::PDiffs \"false\";" > chroot/etc/apt/apt.conf.d/pdiffs
- ;;
- esac
- fi
-
# Configuring apt recommends
- if [ "${LH_APT_RECOMMENDS}" = "enabled" ]
+ if [ "${LH_APT}" = "aptitude" ]
then
- case "${LH_APT}" in
- apt|apt-get)
- echo "Aptitude::Recommends-Important \"true\";" >> chroot/etc/apt/apt.conf
+ case "${LH_APT_RECOMMENDS}" in
+ enabled)
+ echo "Aptitude::Recommends-Important \"true\";" > chroot/etc/apt/apt.conf.d/00recommends
;;
- aptitude)
- echo "Aptitude::Recommends-Important \"true\";" > chroot/etc/apt/apt.conf.d/recommends
+ disabled)
+ echo "Aptitude::Recommends-Important \"false\";" > chroot/etc/apt/apt.conf.d/00recommends
;;
esac
- else
- case "${LH_APT}" in
- apt|apt-get)
- echo "Aptitude::Recommends-Important \"false\";" >> chroot/etc/apt/apt.conf
- ;;
-
- aptitude)
- echo "Aptitude::Recommends-Important \"false\";" > chroot/etc/apt/apt.conf.d/recommends
- ;;
- esac
fi
# Configuring apt secure
- if [ "${LH_APT_SECURE}" = "enabled" ]
- then
- case "${LH_APT}" in
- apt|apt-get)
- echo "APT::Get::AllowUnauthenticated \"true\";" >> chroot/etc/apt/apt.conf
- ;;
+ case "${LH_APT_SECURE}" in
+ enabled)
+ echo "APT::Get::AllowUnauthenticated \"true\";" > chroot/etc/apt/apt.conf.d/00secure
+ ;;
- aptitude)
- echo "APT::Get::AllowUnauthenticated \"true\";" > chroot/etc/apt/apt.conf.d/secure
- ;;
- esac
- else
- case "${LH_APT}" in
- apt|apt-get)
- echo "APT::Get::AllowUnauthenticated \"false\";" >> chroot/etc/apt/apt.conf
- ;;
+ disabled)
+ echo "APT::Get::AllowUnauthenticated \"false\";" > chroot/etc/apt/apt.conf.d/00secure
+ ;;
+ esac
- aptitude)
- echo "APT::Get::AllowUnauthenticated \"false\";" > chroot/etc/apt/apt.conf.d/secure
- ;;
- esac
- fi
-
# Creating stage file
Create_stagefile .stage/chroot_apt
;;
remove)
- # Deconfiguring apt settings
- rm -f chroot/etc/apt/apt.conf
-
# Deconfiguring aptitude ftp proxy
- rm -f chroot/etc/apt/apt.conf.d/ftp-proxy
+ rm -f chroot/etc/apt/apt.conf.d/00ftp-proxy
# Deconfiguring aptitude http proxy
- rm -f chroot/etc/apt/apt.conf.d/http-proxy
+ rm -f chroot/etc/apt/apt.conf.d/00http-proxy
# Deconfiguring aptitude pdiffs
- rm -f chroot/etc/apt/apt.conf.d/pdiffs
+ rm -f chroot/etc/apt/apt.conf.d/00pdiffs
# Deconfiguring aptitude recommends
- rm -f chroot/etc/apt/apt.conf.d/recommends
+ rm -f chroot/etc/apt/apt.conf.d/00recommends
# Deconfiguring aptitude secure
- rm -f chroot/etc/apt/apt.conf.d/secure
+ rm -f chroot/etc/apt/apt.conf.d/00secure
# Removing stage file
rm -f .stage/chroot_apt
Modified: dists/trunk/live-helper/helpers/lh_config
===================================================================
--- dists/trunk/live-helper/helpers/lh_config 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_config 2007-04-11 16:25:18 UTC (rev 1021)
@@ -39,7 +39,7 @@
Breakpoint "config: Init"
# Creating configuration directory
-install -d -m 0755 "${LIVE_ROOT}"/config || true
+mkdir -p "${LIVE_ROOT}"/config
# Creating live-helper configuration
cat > "${LIVE_ROOT}"/config/common << EOF
@@ -182,11 +182,11 @@
EOF
# Creating lh_chroot_* directories
-install -d -m 0755 "${LIVE_ROOT}"/config/chroot_localhooks || true
-install -d -m 0755 "${LIVE_ROOT}"/config/chroot_localincludes || true
-install -d -m 0755 "${LIVE_ROOT}"/config/chroot_localpackages || true
-install -d -m 0755 "${LIVE_ROOT}"/config/chroot_localpackageslists || true
-install -d -m 0755 "${LIVE_ROOT}"/config/chroot_sources || true
+mkdir -p "${LIVE_ROOT}"/config/chroot_localhooks
+mkdir -p "${LIVE_ROOT}"/config/chroot_localincludes
+mkdir -p "${LIVE_ROOT}"/config/chroot_localpackages
+mkdir -p "${LIVE_ROOT}"/config/chroot_localpackageslists
+mkdir -p "${LIVE_ROOT}"/config/chroot_sources
# Creating lh_bootstrap_* configuration
cat > "${LIVE_ROOT}"/config/bootstrap << EOF
@@ -303,4 +303,4 @@
EOF
# Creating lh_binary_* directories
-install -d -m 0755 "${LIVE_ROOT}"/config/binary_localincludes || true
+mkdir -p "${LIVE_ROOT}"/config/binary_localincludes
Modified: dists/trunk/live-helper/helpers/lh_source_config
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_config 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_source_config 2007-04-11 16:25:18 UTC (rev 1021)
@@ -33,38 +33,40 @@
Breakpoint "source_config: Init"
-if [ "${LIVE_SOURCE}" = "enabled" ]
+if [ "${LIVE_SOURCE}" != "enabled" ]
then
- # Requiring stage file
- Require_stagefile .stage/bootstrap
+ exit 0
+fi
- # Checking lock file
- Check_lockfile .lock
+# Requiring stage file
+Require_stagefile .stage/bootstrap
- # Creating lock file
- Create_lockfile .lock
+# Checking lock file
+Check_lockfile .lock
- # Checking stage file
- Check_stagefile .stage/source_config
+# Creating lock file
+Create_lockfile .lock
- # Remove old sources
- if [ -d source/debian-live ]
- then
- rm -rf source/debian-live
- fi
+# Checking stage file
+Check_stagefile .stage/source_config
- # Copy system configuration
- mkdir -p source/debian-live
- cp -a config source/debian-live
+# Remove old sources
+if [ -d source/debian-live ]
+then
+ rm -rf source/debian-live
+fi
- # Create tarball
- cd source
- tar cfz debian-live-config_`date +%Y%m%d.%s`.tar.gz debian-live
- cd "${OLDPWD}"
+# Copy system configuration
+mkdir -p source/debian-live
+cp -a config source/debian-live
- rm -rf source/debian-live/config
- mv source/debian-live-config_*.tar.gz source/debian-live
+# Create tarball
+cd source
+tar cfz debian-live-config_`date +%Y%m%d.%s`.tar.gz debian-live
+cd "${OLDPWD}"
- # Creating stage file
- Create_stagefile .stage/source_config
-fi
+rm -rf source/debian-live/config
+mv source/debian-live-config_*.tar.gz source/debian-live
+
+# Creating stage file
+Create_stagefile .stage/source_config
Modified: dists/trunk/live-helper/helpers/lh_source_download
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_download 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_source_download 2007-04-11 16:25:18 UTC (rev 1021)
@@ -33,52 +33,57 @@
Breakpoint "source_download: Init"
-if [ "${LIVE_SOURCE}" = "enabled" ]
+if [ "${LIVE_SOURCE}" != "enabled" ]
then
- # Requiring stage file
- Require_stagefile .stage/bootstrap
+ exit 0
+fi
- # Checking lock file
- Check_lockfile .lock
+# Requiring stage file
+Require_stagefile .stage/bootstrap
- # Creating lock file
- Create_lockfile .lock
+# Checking lock file
+Check_lockfile .lock
- # Checking stage file
- Check_stagefile .stage/source_download
+# Creating lock file
+Create_lockfile .lock
- # Remove old sources
- if [ -d source/debian ]
- then
- rm -rf source/debian
- fi
+# Checking stage file
+Check_stagefile .stage/source_download
- # Download sources
- Chroot "dpkg --get-selections" | awk '{ print $1 }' > chroot/root/dpkg-selection.txt
- echo "${LIVE_BOOTLOADER}" >> chroot/root/dpkg-selection.txt
- #echo "live-helper" >> chroot/root/dpkg-selection.txt
- Chroot "xargs --arg-file=/root/dpkg-selection.txt apt-get source --download-only"
- rm -f chroot/root/dpkg-selection.txt
+# Remove old sources
+if [ -d source/debian ]
+then
+ rm -rf source/debian
+fi
- # Sort sources
- for DSC in chroot/*.dsc
- do
- SOURCE="`awk '/Source:/ { print $2; }' ${DSC}`"
+# Download sources
+Chroot "dpkg --get-selections" | awk '{ print $1 }' > chroot/root/dpkg-selection.txt
+echo "${LIVE_BOOTLOADER}" >> chroot/root/dpkg-selection.txt
+#echo "live-helper" >> chroot/root/dpkg-selection.txt
+Chroot "xargs --arg-file=/root/dpkg-selection.txt apt-get source --download-only"
+rm -f chroot/root/dpkg-selection.txt
- if [ "`echo ${SOURCE} | cut -b 1-3`" == "lib" ]
- then
- LETTER="`echo ${SOURCE} | cut -b 1-4`"
- else
- LETTER="`echo ${SOURCE} | cut -b 1`"
- fi
+# Sort sources
+for DSC in chroot/*.dsc
+do
+ SOURCE="`sed -n 's/^Source: //p' ${DSC}`"
- # Install directory
- install -d -m 0755 source/debian/"${LETTER}"/"${SOURCE}"
+ case "${SOURCE}" in
+ lib?*)
+ LETTER="`echo ${SOURCE} | sed 's/\(....\).*/\1/'`"
+ ;;
- # Move files
- mv chroot/"${SOURCE}"_* source/debian/"${LETTER}"/"${SOURCE}"
- done
+ *)
+ LETTER="`echo ${SOURCE} | sed 's/\(.\).*/\1/'`"
+ ;;
+ esac
- # Creating stage file
- Create_stagefile .stage/source_download
-fi
+ # Install directory
+ mkdir -p source/debian/"${LETTER}"/"${SOURCE}"
+
+ # Move files
+ mv chroot/"${SOURCE}"_* source/debian/"${LETTER}"/"${SOURCE}"
+done
+
+# Creating stage file
+Create_stagefile .stage/source_download
Modified: dists/trunk/live-helper/helpers/lh_source_generic
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_generic 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_source_generic 2007-04-11 16:25:18 UTC (rev 1021)
@@ -33,7 +33,7 @@
Breakpoint "source_generic: Init"
-if [ "${LIVE_SOURCE}" = "disabled" ]
+if [ "${LIVE_SOURCE}" != "enabled" ]
then
exit 0
fi
Modified: dists/trunk/live-helper/helpers/lh_source_hdd
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_hdd 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_source_hdd 2007-04-11 16:25:18 UTC (rev 1021)
@@ -33,7 +33,7 @@
Breakpoint "source_hdd: Init"
-if [ "${LIVE_SOURCE}" = "disabled" ]
+if [ "${LIVE_SOURCE}" != "enabled" ]
then
exit 0
fi
Modified: dists/trunk/live-helper/helpers/lh_source_iso
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_iso 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_source_iso 2007-04-11 16:25:18 UTC (rev 1021)
@@ -33,7 +33,7 @@
Breakpoint "source_iso: Init"
-if [ "${LIVE_SOURCE}" = "disabled" ]
+if [ "${LIVE_SOURCE}" != "enabled" ]
then
exit 0
fi
Modified: dists/trunk/live-helper/helpers/lh_source_md5sum
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_md5sum 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_source_md5sum 2007-04-11 16:25:18 UTC (rev 1021)
@@ -33,31 +33,33 @@
Breakpoint "source_md5sum: Init"
-if [ "${LIVE_SOURCE}" = "enabled" ]
+if [ "${LIVE_SOURCE}" != "enabled" ]
then
- # Requiring stage file
- Require_stagefile .stage/source_download
+ exit 0
+fi
- # Checking lock file
- Check_lockfile .lock
+# Requiring stage file
+Require_stagefile .stage/source_download
- # Creating lock file
- Create_lockfile .lock
+# Checking lock file
+Check_lockfile .lock
- # Checking stage file
- Check_stagefile .stage/source_md5sum
+# Creating lock file
+Create_lockfile .lock
- # Remove old md5sums
- if [ -f source/md5sum.txt ]
- then
- rm -f source/md5sum.txt
- fi
+# Checking stage file
+Check_stagefile .stage/source_md5sum
- # Calculating md5sums
- cd source
- find . -type f -print0 | xargs -0 md5sum > md5sum.txt
- cd "${OLDPWD}"
+# Remove old md5sums
+if [ -f source/md5sum.txt ]
+then
+ rm -f source/md5sum.txt
+fi
- # Creating stage file
- Create_stagefile .stage/source_md5sum
-fi
+# Calculating md5sums
+cd source
+find . -type f -print0 | xargs -0 md5sum > md5sum.txt
+cd "${OLDPWD}"
+
+# Creating stage file
+Create_stagefile .stage/source_md5sum
Modified: dists/trunk/live-helper/helpers/lh_source_net
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_net 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_source_net 2007-04-11 16:25:18 UTC (rev 1021)
@@ -33,7 +33,7 @@
Breakpoint "source_net: Init"
-if [ "${LIVE_SOURCE}" = "disabled" ]
+if [ "${LIVE_SOURCE}" != "enabled" ]
then
exit 0
fi
Modified: dists/trunk/live-helper/helpers/lh_source_usb
===================================================================
--- dists/trunk/live-helper/helpers/lh_source_usb 2007-04-11 09:56:30 UTC (rev 1020)
+++ dists/trunk/live-helper/helpers/lh_source_usb 2007-04-11 16:25:18 UTC (rev 1021)
@@ -33,7 +33,7 @@
Breakpoint "source_usb: Init"
-if [ "${LIVE_SOURCE}" = "disabled" ]
+if [ "${LIVE_SOURCE}" != "enabled" ]
then
exit 0
fi
More information about the Debian-live-changes
mailing list