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 01-10-2011, 03:48 PM
Dan McGee
 
Default pactest: correctly write epoch and force as necessary

We were missing this in a few places; also add the ability to check the
outcome via a new rule type.

Signed-off-by: Dan McGee <dan@archlinux.org>
---
test/pacman/pmdb.py | 2 ++
test/pacman/pmpkg.py | 4 ++++
test/pacman/pmrule.py | 3 +++
3 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py
index c275337..60460ce 100755
--- a/test/pacman/pmdb.py
+++ b/test/pacman/pmdb.py
@@ -252,6 +252,8 @@ def db_write(self, pkg):
data.append(_mksection("SIZE", pkg.size))
if pkg.reason:
data.append(_mksection("REASON", pkg.reason))
+ if pkg.epoch:
+ data.append(_mksection("EPOCH", pkg.epoch))
else:
data.append(_mksection("FILENAME", pkg.filename()))
if pkg.replaces:
diff --git a/test/pacman/pmpkg.py b/test/pacman/pmpkg.py
index e0f3baa..3aabea4 100755
--- a/test/pacman/pmpkg.py
+++ b/test/pacman/pmpkg.py
@@ -132,6 +132,10 @@ def makepkg(self, path):
data.append("builddate = %s" % self.builddate)
data.append("packager = %s" % self.packager)
data.append("size = %s" % self.size)
+ if self.force:
+ data.append("force = true")
+ if self.epoch:
+ data.append("epoch = %d" % self.epoch)
if self.arch:
data.append("arch = %s" % self.arch)
for i in self.license:
diff --git a/test/pacman/pmrule.py b/test/pacman/pmrule.py
index 89ae3f4..bea8e4a 100755
--- a/test/pacman/pmrule.py
+++ b/test/pacman/pmrule.py
@@ -78,6 +78,9 @@ def check(self, root, retcode, localdb, files):
elif case == "VERSION":
if value != newpkg.version:
success = 0
+ elif case == "EPOCH":
+ if int(value) != newpkg.epoch:
+ success = 0
elif case == "DESC":
if value != newpkg.desc:
success = 0
--
1.7.3.5
 

Thread Tools




All times are GMT. The time now is 12:21 PM.

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