0001-lbu-remove-packages.list-if-exist.patch 1.29 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
From fbe26c92439f4b4f19ee09ec07798a5bbaec0d77 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Wed, 29 Jul 2009 19:30:36 +0000
Subject: [PATCH] lbu: remove packages.list if exist

fixes http://redmine.alpinelinux.org/issues/show/94
---
 lbu.in |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/lbu.in b/lbu.in
index 48e615e..b84682a 100644
--- a/lbu.in
+++ b/lbu.in
@@ -233,6 +233,12 @@ cmd_package() {
 	tmppkg="$tmpdir/$(basename $pkg)"
 
 	cd "${ROOT:-/}"
+	# remove old package.list
+	if [ -f etc/lbu/packages.list ] && [ -f var/lib/apk/world ]; then
+		echo "Note: Removing /etc/lbu/packages.list."
+		echo "      /var/lib/apk/world will be used."
+		rm -f etc/lbu/packages.list
+	fi
 	currentlist=$(apk audit --backup -q)
 	if [ -f var/lib/apk/world ]; then
 		currentlist="$currentlist var/lib/apk/world"
@@ -391,10 +397,10 @@ cmd_commit() {
 		}' | xargs rm 2>/dev/null
 
 	# remove obsolete file. some older version of alpine needs this
-	# to be ble to upgrade
+	# to be able to upgrade
 	if [ -z "$DRYRUN" ] && [ -f $mnt/packages.list ]; then
 		echo "Note: Removing packages.list from $(basename $mnt)."
-		echo "      $PACKAGES_LIST will be used."
+		echo "      /var/lib/apk/world will be used."
 		rm -f $mnt/packages.list
 	fi
 
-- 
1.6.3.3