1 |
commit: 0c95b6b4aea0b7baa86c6f41e6b643c477f60203 |
2 |
Author: Paul Varner <fuzzyray <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jun 23 20:00:15 2016 +0000 |
4 |
Commit: Paul Varner <fuzzyray <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jun 23 20:00:15 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoolkit.git/commit/?id=0c95b6b4 |
7 |
|
8 |
eclean: Apply handle binpkgs with .xpak suffix patch from bug 586658 |
9 |
|
10 |
Author: Manuel Mommertz <2kmm <AT> gmx.de> |
11 |
X-Gentoo-bug: 586658 |
12 |
X-Gentoo-bug-url: https://bugs.gentoo.org/show_bug.cgi?id=586658 |
13 |
|
14 |
pym/gentoolkit/eclean/search.py | 14 +++++++++----- |
15 |
1 file changed, 9 insertions(+), 5 deletions(-) |
16 |
|
17 |
diff --git a/pym/gentoolkit/eclean/search.py b/pym/gentoolkit/eclean/search.py |
18 |
index f771ffc..7b261b8 100644 |
19 |
--- a/pym/gentoolkit/eclean/search.py |
20 |
+++ b/pym/gentoolkit/eclean/search.py |
21 |
@@ -542,18 +542,22 @@ def findPackages( |
22 |
if root[-3:] == 'All': |
23 |
continue |
24 |
for file in files: |
25 |
- if not file[-5:] == ".tbz2": |
26 |
- # ignore non-tbz2 files |
27 |
+ if file[-5:] == ".tbz2": |
28 |
+ category = os.path.basename(root) |
29 |
+ cpv = category+"/"+file[:-5] |
30 |
+ elif file[-5:] == ".xpak": |
31 |
+ category = os.path.basename(os.path.dirname(root)) |
32 |
+ cpv = category+"/"+file.rpartition('-')[0] |
33 |
+ else: |
34 |
+ # ignore other files |
35 |
continue |
36 |
path = os.path.join(root, file) |
37 |
- category = os.path.split(root)[-1] |
38 |
- cpv = category+"/"+file[:-5] |
39 |
st = os.lstat(path) |
40 |
if time_limit and (st[stat.ST_MTIME] >= time_limit): |
41 |
# time-limit exclusion |
42 |
continue |
43 |
# dict is cpv->[files] (2 files in general, because of symlink) |
44 |
- clean_me[cpv] = [path] |
45 |
+ clean_me.setdefault(cpv,[]).append(path) |
46 |
#if os.path.islink(path): |
47 |
if stat.S_ISLNK(st[stat.ST_MODE]): |
48 |
clean_me[cpv].append(os.path.realpath(path)) |