From 4c8535b759fb9f2b34d05f971bee3a4ecc86b734 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Thu, 17 May 2012 14:33:18 +0000 Subject: [PATCH] Revert "init: only use /etc/apk/world when it exists" We can not only use /etc/apk/world since it will always be there due to previous apk add --initdb. Instead, clean up the /var/lib/apk/world after upgrade This reverts commit 8981ccbf5b2636c7d2e06b08ffdf87be80fe19c8. Conflicts: initramfs-init.in --- initramfs-init.in | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/initramfs-init.in b/initramfs-init.in index b14ebf9..6e1ebc1 100755 --- a/initramfs-init.in +++ b/initramfs-init.in @@ -481,13 +481,11 @@ if [ -f "$ovl" ]; then # hack, incase /root/.ssh was included in apkovl [ -d "$sysroot/root" ] && chmod 700 "$sysroot/root" pkgs="$pkgs $(sed 's/\#.*//' $sysroot/etc/lbu/packages.list 2>/dev/null)" - rm -f "$sysroot"/etc/lbu/packages.list - for world in etc/apk/world var/lib/apk/world; do - if [ -e "$sysroot/$world" ]; then - pkgs="$pkgs $(cat $sysroot/$world)" - break; - fi - done + pkgs="$pkgs $(cat $sysroot/var/lib/apk/world \ + $sysroot/etc/apk/world 2>/dev/null)" + # clean up after upgrade + rm -f $sysroot/etc/lbu/packages.list \ + $sysroot/var/lib/apk/world # fix up inittab from pre openrc times (alpine v1.8) if [ -f "$sysroot"/etc/inittab ]; then -- 1.7.10.2