From 843d368ef60a74719dfc74a27de3fe3ef441951f Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sun, 23 Sep 2007 14:43:03 -0500 Subject: libalpm/add.c: fix backup array issue As seen with the recent upgrade of pacman and the removal of the pacman.d/current mirrorlist, files that were formerly in the backup array get deleted upon their removal, which could be dangerous. Instead, we should use the combined backup array of the old and new package. This fix should address this issue in a relatively straightforward way. In addition, old files should be moved to pacsave locations as expected. Signed-off-by: Dan McGee --- pactest/tests/upgrade010.py | 1 + pactest/tests/upgrade020.py | 1 + pactest/tests/upgrade021.py | 1 + pactest/tests/upgrade022.py | 1 + pactest/tests/upgrade023.py | 1 + pactest/tests/upgrade025.py | 1 + 6 files changed, 6 insertions(+) (limited to 'pactest/tests') diff --git a/pactest/tests/upgrade010.py b/pactest/tests/upgrade010.py index 04f3d816..633ef7e4 100644 --- a/pactest/tests/upgrade010.py +++ b/pactest/tests/upgrade010.py @@ -15,3 +15,4 @@ self.args = "-U %s" % p.filename() self.addrule("PKG_VERSION=dummy|1.0-2") self.addrule("!FILE_MODIFIED=etc/dummy.conf") self.addrule("FILE_PACNEW=etc/dummy.conf") +self.addrule("!FILE_PACSAVE=etc/dummy.conf") diff --git a/pactest/tests/upgrade020.py b/pactest/tests/upgrade020.py index ab5fe225..6a7994bb 100644 --- a/pactest/tests/upgrade020.py +++ b/pactest/tests/upgrade020.py @@ -15,3 +15,4 @@ self.args = "-U %s" % p.filename() self.addrule("PKG_VERSION=dummy|1.0-2") self.addrule("FILE_MODIFIED=etc/dummy.conf") self.addrule("!FILE_PACNEW=etc/dummy.conf") +self.addrule("!FILE_PACSAVE=etc/dummy.conf") diff --git a/pactest/tests/upgrade021.py b/pactest/tests/upgrade021.py index 1ac0ceb5..b45ea18a 100644 --- a/pactest/tests/upgrade021.py +++ b/pactest/tests/upgrade021.py @@ -15,3 +15,4 @@ self.args = "-U %s" % p.filename() self.addrule("PKG_VERSION=dummy|1.0-2") self.addrule("!FILE_MODIFIED=etc/dummy.conf") self.addrule("!FILE_PACNEW=etc/dummy.conf") +self.addrule("!FILE_PACSAVE=etc/dummy.conf") diff --git a/pactest/tests/upgrade022.py b/pactest/tests/upgrade022.py index 6bf12c15..dcf7ae01 100644 --- a/pactest/tests/upgrade022.py +++ b/pactest/tests/upgrade022.py @@ -15,3 +15,4 @@ self.args = "-U %s" % p.filename() self.addrule("PKG_VERSION=dummy|1.0-2") self.addrule("!FILE_MODIFIED=etc/dummy.conf") self.addrule("FILE_PACNEW=etc/dummy.conf") +self.addrule("!FILE_PACSAVE=etc/dummy.conf") diff --git a/pactest/tests/upgrade023.py b/pactest/tests/upgrade023.py index 68a29df2..d1d2e314 100644 --- a/pactest/tests/upgrade023.py +++ b/pactest/tests/upgrade023.py @@ -15,3 +15,4 @@ self.addrule("PKG_VERSION=dummy|1.1-1") self.addrule("!FILE_MODIFIED=etc/dummy.conf") # Do we want this pacnew or not? self.addrule("FILE_PACNEW=etc/dummy.conf") +self.addrule("!FILE_PACSAVE=etc/dummy.conf") diff --git a/pactest/tests/upgrade025.py b/pactest/tests/upgrade025.py index b78a2dd1..2c9c06f3 100644 --- a/pactest/tests/upgrade025.py +++ b/pactest/tests/upgrade025.py @@ -13,4 +13,5 @@ self.args = "-U %s" % p.filename() self.addrule("PKG_VERSION=dummy|1.0-2") self.addrule("FILE_PACSAVE=etc/dummy.conf") +self.addrule("!FILE_PACNEW=etc/dummy.conf") self.addrule("FILE_EXIST=etc/dummy.conf") -- cgit v1.2.3-70-g09d2