summaryrefslogtreecommitdiffstats
path: root/init.d
diff options
context:
space:
mode:
authorncopa <ncopa@f176ef85-8d20-0410-844a-e957b5a1c371>2007-02-23 13:08:30 +0000
committerncopa <ncopa@f176ef85-8d20-0410-844a-e957b5a1c371>2007-02-23 13:08:30 +0000
commitfb137b3193fc9b0d2d9cc5164681df9f342ba9e4 (patch)
treea9d8a83887eed72b5f8c72d3947920193beb09b9 /init.d
parentccbacc53091529ab7bf02544f87add86673c4b28 (diff)
downloadalpine-baselayout-fb137b3193fc9b0d2d9cc5164681df9f342ba9e4.tar.bz2
alpine-baselayout-fb137b3193fc9b0d2d9cc5164681df9f342ba9e4.tar.xz
move var/db/world to etc/lbu/packages.list. dont look for more apkovls if one is found
Diffstat (limited to 'init.d')
-rwxr-xr-xinit.d/runtimes20
1 files changed, 16 insertions, 4 deletions
diff --git a/init.d/runtimes b/init.d/runtimes
index 1f50cee..5a03326 100755
--- a/init.d/runtimes
+++ b/init.d/runtimes
@@ -106,22 +106,33 @@ load_pkgs() {
# here we should issue a warning in future versions if found on cmdline
pkglist=${pkglist:-/packages.list}
+ # aww... we move from /mnt/packages.list to var/lib/apk/world to
+ # etc/lbu/packages.list. Hopefully this code can be simplified in
+ # future.
mlist="$mnt/$pkglist"
wlist="$TMP/var/lib/apk/world"
- if [ -f "$wlist" ] ; then
+ plist="$TMP/etc/lib/packages.list"
+
+ [ -f "$plilst" ] && wlist="$plist"
+ elif [ -f "$wlist" ] ; then
load_pkgs_from_list "$wlist"
# its re-generated
rm -rf "$wlist"
elif [ -f "$mlist" ] ; then
#ok, we are upgrading...
local line i
+ eeinfo "
+NOTE: Using packages.list from $dev. This file has moved to
+etc/lbu/packages.list and will be included in the apkovl.
+"
load_pkgs_from_list "$mlist"
# lets clean up the world file
+ echo "# This file was generated by /etc/init.d/runtimes" >/etc/init.d/packages.list
for i in $(apk_glob '*') ; do
reqby=$(apk_info -qr $i);
# only add the packages who has no REQUIRED_BY
[ -z "$reqby" ] && echo $i
- done | sed 's/-[0-9].*//' > /var/lib/apk/world
+ done | sed 's/-[0-9].*//' >> /etc/lbu/packages.list
fi
}
@@ -216,7 +227,7 @@ start() {
cfgdevs=$( echo $( get_kopt cfg_dev ) | tr , ' ')
for m in ${cfgdevs:-cdrom:iso9660 fd0:vfat usba1:vfat}; do
- local dev fs skip_umount mnt
+ local dev fs skip_umount mnt loaded
# split 'dev:fs'
dev=${m%%:*}
@@ -234,10 +245,11 @@ start() {
fi
# look for package listings and config overlays
- load_pkgs_and_config $dev $mnt
+ load_pkgs_and_config $dev $mnt && loaded=yes
# lazy unmount
[ x$skip_umount = xyes ] || umount -l $mnt
+ [ x$loaded=xyes ] && break
done
# if there are no /etc/apk/apk.conf, create one