1 |
commit: cf9a6b53689958e0f74ec6b20fe62f4cba89e4e9 |
2 |
Author: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 1 22:27:52 2012 +0000 |
4 |
Commit: Christian Ruppert <idl0r <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Apr 1 22:27:52 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=cf9a6b53 |
7 |
|
8 |
Fix pkgsplit error when using slots and globs |
9 |
|
10 |
--- |
11 |
package.mask/mask_check.py | 16 +--------------- |
12 |
1 files changed, 1 insertions(+), 15 deletions(-) |
13 |
|
14 |
diff --git a/package.mask/mask_check.py b/package.mask/mask_check.py |
15 |
index 95eb1c9..92af0c6 100755 |
16 |
--- a/package.mask/mask_check.py |
17 |
+++ b/package.mask/mask_check.py |
18 |
@@ -18,21 +18,13 @@ from portage.versions import pkgsplit, vercmp |
19 |
OPERATORS = (">", "=", "<", "~") |
20 |
|
21 |
def strip_atoms(pkg): |
22 |
- while pkg.startswith( OPERATORS ) and len(pkg) > 1: |
23 |
- pkg = pkg[1:] |
24 |
- while pkg.endswith( ("*", ".") ): |
25 |
- pkg = pkg[0:-1] |
26 |
- |
27 |
# strip slots |
28 |
if pkg.find(":") != -1: |
29 |
pkg = pkg[0:pkg.find(":")] |
30 |
- return pkg |
31 |
|
32 |
-# Deprecated |
33 |
-def strip_atoms2(pkg): |
34 |
while pkg.startswith( OPERATORS ) and len(pkg) > 1: |
35 |
pkg = pkg[1:] |
36 |
- while pkg.endswith( "*" ): |
37 |
+ while pkg.endswith( ("*", ".") ): |
38 |
pkg = pkg[0:-1] |
39 |
|
40 |
return pkg |
41 |
@@ -46,12 +38,6 @@ def pkgcmp_atom(pkgdir, pkg): |
42 |
|
43 |
ppkg = basename(strip_atoms(pkg)) |
44 |
|
45 |
- # test |
46 |
- ppkg2 = basename(strip_atoms2(pkg)) |
47 |
- if ppkg != ppkg2: |
48 |
- print >> stderr, "PPKG: %s" % ppkg |
49 |
- print >> stderr, "PPKG2: %s" % ppkg2 |
50 |
- |
51 |
revre = re.compile( ("^" + re.escape(ppkg) + "(-r\d+)?.ebuild$") ) |
52 |
|
53 |
# print "DBG: checking for %s" % pkg |