FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-11-2008, 01:32 PM
Nagy Gabor
 
Default Serious problems with file relocation on upgrade

I think we should fix/discuss this before 3.1.2 release, because this is quite
critical imho.

Part I

----- TovábbĂ*tott levĂ©l Nagy Gabor <ngaba@bibl.u-szeged.hu> cĂ*mrĹ‘l -----
Dátum: Sat, 9 Feb 2008 18:07:28 +0100
FeladĂł: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Viszontválasz cĂ*m: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Tartalom: [BUG] Serious problems with file relocation on upgrade
CĂ*mzett: Xavier <shiningxc@gmail.com>

Hi!

For more info see the attached patch.

Bye
----- VĂ©ge a továbbĂ*tott ĂĽzenetnek -----


----------------------------------------------------
SZTE Egyetemi Könyvtár - http://www.bibl.u-szeged.hu
This mail sent through IMP: http://horde.org/imp/
From 0c1240713285cd0142f0bc22d63588226f924293 Mon Sep 17 00:00:00 2001
From: Nagy Gabor <ngaba@bibl.u-szeged.hu>
Date: Sat, 9 Feb 2008 17:51:05 +0100
Subject: [PATCH] File relocation pactests (fixes)

This patch fixes upgrade040.py and upgrade041.py (041 now fails!):
* the old pactests didn't check the existense of the relocated file
* upgrade041.py was broken due to a typo (missing comma)

New upgrade046.py pactest was added (derived from the fixed upgrade041.py).
This fails because the file relocation check is _hacked_ to conflict.c, and
_alpm_db_find_fileconflicts is not called in case of --force.

Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
---
pactest/tests/upgrade040.py | 1 +
pactest/tests/upgrade041.py | 3 ++-
pactest/tests/upgrade046.py | 31 +++++++++++++++++++++++++++++++
3 files changed, 34 insertions(+), 1 deletions(-)
create mode 100644 pactest/tests/upgrade046.py

diff --git a/pactest/tests/upgrade040.py b/pactest/tests/upgrade040.py
index bc40f33..e17c717 100644
--- a/pactest/tests/upgrade040.py
+++ b/pactest/tests/upgrade040.py
@@ -27,4 +27,5 @@ for p in p1, p2:
self.addrule("PKG_EXIST=%s" % p.name)
self.addrule("FILE_MODIFIED=bin/dummy")
self.addrule("FILE_MODIFIED=bin/foobar")
+self.addrule("FILE_EXIST=usr/share/file")
self.addrule("FILE_MODIFIED=usr/share/file")
diff --git a/pactest/tests/upgrade041.py b/pactest/tests/upgrade041.py
index 347c2c4..20da4f1 100644
--- a/pactest/tests/upgrade041.py
+++ b/pactest/tests/upgrade041.py
@@ -4,7 +4,7 @@ lp1 = pmpkg("dummy")
lp1.files = ["bin/dummy"]

lp2 = pmpkg("foobar")
-lp2.files = ["bin/foobar"
+lp2.files = ["bin/foobar",
"usr/share/file"]

for p in lp1, lp2:
@@ -27,4 +27,5 @@ for p in p1, p2:
self.addrule("PKG_EXIST=%s" % p.name)
self.addrule("FILE_MODIFIED=bin/dummy")
self.addrule("FILE_MODIFIED=bin/foobar")
+self.addrule("FILE_EXIST=usr/share/file")
self.addrule("FILE_MODIFIED=usr/share/file")
diff --git a/pactest/tests/upgrade046.py b/pactest/tests/upgrade046.py
new file mode 100644
index 0000000..60164b7
--- /dev/null
+++ b/pactest/tests/upgrade046.py
@@ -0,0 +1,31 @@
+self.description = "File relocation between two packages (reverse order, --force)"
+
+lp1 = pmpkg("dummy")
+lp1.files = ["bin/dummy"]
+
+lp2 = pmpkg("foobar")
+lp2.files = ["bin/foobar",
+ "usr/share/file"]
+
+for p in lp1, lp2:
+ self.addpkg2db("local", p)
+
+p1 = pmpkg("dummy")
+p1.files = ["bin/dummy",
+ "usr/share/file"]
+
+p2 = pmpkg("foobar")
+p2.files = ["bin/foobar"]
+
+for p in p1, p2:
+ self.addpkg(p)
+
+self.args = "-Uf %s" % " ".join([p.filename() for p in p1, p2])
+
+self.addrule("PACMAN_RETCODE=0")
+for p in p1, p2:
+ self.addrule("PKG_EXIST=%s" % p.name)
+self.addrule("FILE_MODIFIED=bin/dummy")
+self.addrule("FILE_MODIFIED=bin/foobar")
+self.addrule("FILE_EXIST=usr/share/file")
+self.addrule("FILE_MODIFIED=usr/share/file")
--
1.5.3.7

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 01:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org