summaryrefslogtreecommitdiff
path: root/auto/functions/compat
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2012-10-11 07:59:51 +0200
committerAndreas Loibl <andreas@andreas-loibl.de>2012-10-11 08:31:29 +0200
commit48f3cfe728c1ffe44629c792380d4d47466ee38f (patch)
tree537c2506f0b0c2a8006ba8ea983a24338effa335 /auto/functions/compat
parent797ee5a8cf5bb066143582a7fb042285f2f220e3 (diff)
downloadkanotix-48f3cfe728c1ffe44629c792380d4d47466ee38f.zip
kanotix-48f3cfe728c1ffe44629c792380d4d47466ee38f.tar.gz
compat update for latest live-build version
Diffstat (limited to 'auto/functions/compat')
-rw-r--r--auto/functions/compat42
1 files changed, 32 insertions, 10 deletions
diff --git a/auto/functions/compat b/auto/functions/compat
index 250402d..9bb8438 100644
--- a/auto/functions/compat
+++ b/auto/functions/compat
@@ -1,5 +1,8 @@
#!/bin/bash
export LB_VERSION=$VERSION
+export LB_BASE="${LB_BASE:-/usr/share/live/build}"
+
+current_script="$(basename "$0"|sed 's/^lb_//')"
Compat_arguments ()
{
@@ -10,11 +13,11 @@ Compat_arguments ()
case "$arg" in
-r|--repositories) arg="--archives";;
--architecture) arg="--architectures";;
- --packages-lists) arg="--package-lists";;
--syslinux-theme) ;;
# ignore other unsupported arguments
--syslinux-*|--bootstrap-config|-e|--encryption|-l|--language) shift; continue;;
--binary-indices|--packages|--symlinks|--sysvinit|--tasks|--virtual-root-size) shift; continue;;
+ --packages-lists|--package-list|-p) Compat_packagelists $1; shift; continue;;
esac
echo -n "$arg$IFS"
done
@@ -41,6 +44,7 @@ Compat_dir ()
dir3="$2"
ext2="$3"
ext3="$4"
+ [ ! -e "config/$dir2" ] && return 0
if [ -z "$ext2$ext3" ]; then
rm -r "config/$dir3"
ln -s "$(basename "$dir2")" "config/$dir3"
@@ -61,6 +65,19 @@ Compat_dir ()
touch config/$dir3.compat
}
+Compat_packagelists()
+{
+ mkdir -p config/package-lists
+ (
+ echo '# AUTOGENERATED from "lb config -p" option - DO NOT CHANGE'
+ IFS=" "
+ for packagelist in $1
+ do
+ echo "#include <$packagelist>"
+ done
+ ) > config/package-lists/compat.list.chroot
+}
+
Compat_clean()
{
for i in config/*.compat
@@ -75,8 +92,13 @@ Compat_clean()
case "$LB_VERSION" in
3*)
- case "$(basename "$0")" in
- lb_config)
+ case "$current_script" in
+ config)
+ if [ -z "$LB_COMPAT_CONFIG_AUTO" ]; then
+ export LB_COMPAT_CONFIG_AUTO=1
+ auto/config "$@"
+ exit $?
+ fi
OIFS="$IFS"; IFS="$(printf \\a)"
set -- $(Compat_arguments "$@")
IFS="$OIFS"
@@ -88,10 +110,10 @@ case "$LB_VERSION" in
LB_ARCHITECTURE="$LB_ARCHITECTURES"
trap Compat_config EXIT
;;
- lb_chroot_apt)
+ chroot_apt)
Compat_dir chroot_local-packages packages.chroot
;;
- lb_chroot_archives)
+ chroot_archives)
mkdir -p config/archives
touch config/archives.compat
. config/bootstrap
@@ -109,19 +131,19 @@ case "$LB_VERSION" in
done
done
;;
- lb_chroot_preseed)
+ chroot_preseed)
Compat_dir chroot_local-preseed preseed .cfg .preseed
;;
- lb_chroot_includes)
+ chroot_includes)
Compat_dir chroot_local-includes includes.chroot
;;
- lb_chroot_hooks)
+ chroot_hooks)
Compat_dir chroot_local-hooks hooks - .chroot
;;
- lb_binary_hooks)
+ binary_hooks)
Compat_dir binary_local-hooks hooks - .binary
;;
- lb_build|lb_clean)
+ build|clean)
trap Compat_clean EXIT
;;
esac