From bf46e04614b3740eea4a5e0d44767f57e1cffa4d Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Mon, 10 Jan 2011 13:40:31 -0600 Subject: Remove epoch as an independent field Instead, go the same route we have always taken with version-release in libalpm and treat it all as one piece of information. Makepkg is the only script that knows about epoch as a distinct value; from there on out we will parse out the components as necessary. This makes the code a lot simpler as far as epoch handling goes. The downside here is that we are tossing some compatibility to the wind; packages using force will have to be rebuilt with an incremented epoch to keep their special status. Signed-off-by: Dan McGee --- test/pacman/pmdb.py | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'test/pacman/pmdb.py') diff --git a/test/pacman/pmdb.py b/test/pacman/pmdb.py index b4d0e2d5..6329f23d 100755 --- a/test/pacman/pmdb.py +++ b/test/pacman/pmdb.py @@ -156,11 +156,6 @@ class pmdb: pkg.md5sum = fd.readline().strip("\n") elif line == "%REPLACES%": pkg.replaces = _getsection(fd) - elif line == "%EPOCH%": - pkg.epoch = int(fd.readline().strip("\n")) - elif line == "%FORCE%": - fd.readline() - pkg.force = True elif line == "%DEPENDS%": pkg.depends = _getsection(fd) elif line == "%OPTDEPENDS%": @@ -250,19 +245,10 @@ class pmdb: 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: data.append(_mksection("REPLACES", pkg.replaces)) - if pkg.epoch: - data.append(_mksection("EPOCH", pkg.epoch)) - # for backward compatibility - if not pkg.force: - data.append(_mksection("FORCE", "")) - if pkg.force: - data.append(_mksection("FORCE", "")) if pkg.csize: data.append(_mksection("CSIZE", pkg.csize)) if pkg.md5sum: -- cgit v1.2.3