diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2012-05-17 15:15:14 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2012-05-17 15:16:09 +0000 |
commit | 1e6eacb33245c79f9cfd1515b76849a9079c6240 (patch) | |
tree | bf29a007504d5b962aaf36b7287cc2ba9c891b4d /main/mkinitfs | |
parent | e81e020aed9f8960c43e88c0d38d42cc3f37d500 (diff) | |
download | aports-1e6eacb33245c79f9cfd1515b76849a9079c6240.tar.bz2 aports-1e6eacb33245c79f9cfd1515b76849a9079c6240.tar.xz |
main/mkinitfs: fix apk world when upgrading
ref #1171
Diffstat (limited to 'main/mkinitfs')
-rw-r--r-- | main/mkinitfs/0001-Revert-init-only-use-etc-apk-world-when-it-exists.patch | 44 | ||||
-rw-r--r-- | main/mkinitfs/APKBUILD | 4 |
2 files changed, 47 insertions, 1 deletions
diff --git a/main/mkinitfs/0001-Revert-init-only-use-etc-apk-world-when-it-exists.patch b/main/mkinitfs/0001-Revert-init-only-use-etc-apk-world-when-it-exists.patch new file mode 100644 index 0000000000..41d1bdd1d2 --- /dev/null +++ b/main/mkinitfs/0001-Revert-init-only-use-etc-apk-world-when-it-exists.patch @@ -0,0 +1,44 @@ +From 4c8535b759fb9f2b34d05f971bee3a4ecc86b734 Mon Sep 17 00:00:00 2001 +From: Natanael Copa <ncopa@alpinelinux.org> +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 + diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index 9384e20080..6c5c923613 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mkinitfs pkgver=2.4.3 -pkgrel=1 +pkgrel=2 pkgdesc="Tool to generate initramfs images for Alpine" url=http://git.alpinelinux.org/cgit/mkinitfs depends="busybox apk-tools>=2.0" @@ -9,6 +9,7 @@ triggers="$pkgname.trigger=/usr/share/kernel/*" source="http://git.alpinelinux.org/cgit/$pkgname/snapshot/$pkgname-$pkgver.tar.bz2 0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch 0001-init-search-boot-repositories-after-relocation.patch + 0001-Revert-init-only-use-etc-apk-world-when-it-exists.patch eglibc.patch " arch="noarch" @@ -47,4 +48,5 @@ package() { md5sums="7373acb2159e24ba120ee46b0deb6bc4 mkinitfs-2.4.3.tar.bz2 ba969f3b8d8a0dd74319492eb41a712b 0001-init-fix-inittab-for-users-who-upgrades-from-pre-ope.patch bd9fd3813c9c28b42a1eeb30f65718e5 0001-init-search-boot-repositories-after-relocation.patch +7aea167ef747a6f0d92081628358083a 0001-Revert-init-only-use-etc-apk-world-when-it-exists.patch e59c2f7de496fe430b07e32fd812ebe0 eglibc.patch" |