[SCM] live-build branch, debian-next, updated. debian/3.0_a55-1-5-g2798326
Daniel Baumann
daniel at debian.org
Sun Jul 29 23:55:29 UTC 2012
The following commit has been merged in the debian-next branch:
commit 27983260a23e821117685330fc34e9ba78581607
Author: Daniel Baumann <daniel at debian.org>
Date: Mon Jul 30 01:53:56 2012 +0200
Adding shortcut helper for dctrl-tools.
This 'Packages' shortcut helper can be used for simplified
usage of grep-aptavailable from dctrl-tools.
Rather than needing to specify the following explicit command:
! grep-aptavail -n -sPackage -FPriority standard
in package lists, the following shortcut can be used:
! Packages priority standard
diff --git a/Makefile b/Makefile
index 578def6..7ac672d 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,7 @@ SHELL := sh -e
LANGUAGES = $(shell cd manpages/po && ls)
-SCRIPTS = bin/* frontends/cgi/live-build-cgi frontends/cgi/live-build-cgi.cron functions/* examples/auto/* examples/hooks/* scripts/*.sh scripts/*/* share/hooks/*
+SCRIPTS = bin/* frontends/cgi/live-build-cgi frontends/cgi/live-build-cgi.cron functions/* examples/auto/* examples/hooks/* scripts/*.sh scripts/*/* share/bin/* share/hooks/*
all: build
diff --git a/scripts/build/lb_binary_package-lists b/scripts/build/lb_binary_package-lists
index 74b34e8..f3ec48d 100755
--- a/scripts/build/lb_binary_package-lists
+++ b/scripts/build/lb_binary_package-lists
@@ -51,6 +51,13 @@ then
# Installing depends
Install_package
+ if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
+ then
+ cp "${LIVE_BUILD}/share/bin/Packages" chroot/bin
+ else
+ cp /usr/share/bin/Packages chroot/bin
+ fi
+
mkdir -p chroot/binary.deb/archives/partial
mv chroot/var/lib/dpkg/status chroot/var/lib/dpkg/status.tmp
touch chroot/var/lib/dpkg/status
@@ -121,6 +128,8 @@ then
cd "${OLDPWD}"
+ rm -f chroot/bin/Packages
+
rm -rf chroot/binary.deb
mv chroot/var/lib/dpkg/status.tmp chroot/var/lib/dpkg/status
diff --git a/scripts/build/lb_chroot_package-lists b/scripts/build/lb_chroot_package-lists
index f38fff7..e32a0c6 100755
--- a/scripts/build/lb_chroot_package-lists
+++ b/scripts/build/lb_chroot_package-lists
@@ -55,6 +55,13 @@ then
# Installing depends
Install_package
+ if [ -e "${LIVE_BUILD}/share/bin/Packages" ]
+ then
+ cp "${LIVE_BUILD}/share/bin/Packages" chroot/bin
+ else
+ cp /usr/share/bin/Packages chroot/bin
+ fi
+
for LIST in config/package-lists/*.list \
config/package-lists/*.list.chroot \
config/package-lists/*.list.chroot_${_PASS}
@@ -67,6 +74,8 @@ then
fi
done
+ rm -f chroot/bin/Packages
+
# Removing dctrl-tools again if the user has not installed it
if ! grep -qs dctrl-tools chroot/root/packages.chroot
then
diff --git a/functions/wrapper.sh b/share/bin/Packages
similarity index 53%
copy from functions/wrapper.sh
copy to share/bin/Packages
index 019acfa..06ce05e 100755
--- a/functions/wrapper.sh
+++ b/share/bin/Packages
@@ -8,18 +8,23 @@
## under certain conditions; see COPYING for details.
-Apt ()
-{
- CHROOT="${1}"
- shift
-
- case "${LB_APT}" in
- apt|apt-get)
- Chroot ${CHROOT} apt-get ${APT_OPTIONS} ${@}
- ;;
-
- aptitude)
- Chroot ${CHROOT} aptitude ${APTITUDE_OPTIONS} ${@}
- ;;
- esac
-}
+set -e
+
+if [ ! -e /usr/bin/grep-aptavail ]
+then
+ echo "E: /usr/bin/grep-aptavail: No such file."
+
+ exit 1
+fi
+
+if [ -z "${@}" ]
+then
+ echo "Usage: $(basename ${0}) FIELD VALUE"
+
+ exit 1
+fi
+
+_FIELD="${1}"
+_VALUE="${2}"
+
+grep-aptavail -n -sPackage -F${_FIELD} ${_VALUE} | sort
--
live-build
More information about the debian-live-changes
mailing list