diff options
author | Stanislav Ochotnicky <sochotnicky@gmail.com> | 2009-07-23 20:18:22 +0200 |
---|---|---|
committer | Stanislav Ochotnicky <sochotnicky@gmail.com> | 2009-07-25 00:51:48 +0200 |
commit | a4939b91967a0bcdb3241db8530609b9b4b57846 (patch) | |
tree | a0372afba4f3fcdd2dc1ec7cc5a609d5b477ac1e /src | |
parent | Fix small bug in exception handling (diff) | |
download | collagen-a4939b91967a0bcdb3241db8530609b9b4b57846.tar.gz collagen-a4939b91967a0bcdb3241db8530609b9b4b57846.tar.bz2 collagen-a4939b91967a0bcdb3241db8530609b9b4b57846.zip |
Fixed cases where r0 was added to version
this caused a lot of problems with packages that were not found and so
on..
Diffstat (limited to 'src')
-rw-r--r-- | src/tinderbox/__init__.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/tinderbox/__init__.py b/src/tinderbox/__init__.py index 766e766..f72f227 100644 --- a/src/tinderbox/__init__.py +++ b/src/tinderbox/__init__.py @@ -108,7 +108,12 @@ class Tinderbox(object): # setup logging! os.chroot(config.WORK_CHROOT) init_logging() - package.version = "-".join(portage.pkgsplit(pkg)[1:]) + pkgname, pkgver, pkgrev = portage.pkgsplit(pkg) + + if pkgrev is "r0": + package.version = pkgver + else: + package.version = "%s-%s" % (pkgver, pkgrev) self._emerge_package_subprocess(pkg, ebuild, dep_groups, package) sys.exit(0) @@ -188,7 +193,11 @@ class Tinderbox(object): elif 0 == real_use_enabled.count(useflag): real_use_enabled.append(useflag) - dep_pkg = Package(dep_name,"%s-%s" % (dep_ver, dep_rev), real_use_enabled) + if dep_rev is'r0': + dep_ver_full = dep_ver + else: + dep_ver_full = "%s-%s" % (dep_ver, dep_rev) + dep_pkg = Package(dep_name, dep_ver_full, real_use_enabled) package_infos.append(dep_pkg.get_info()) |