Lines 540-557
Link Here
|
540 |
if root[-3:] == 'All': |
540 |
if root[-3:] == 'All': |
541 |
continue |
541 |
continue |
542 |
for file in files: |
542 |
for file in files: |
543 |
if not file[-5:] == ".tbz2": |
543 |
if file[-5:] == ".tbz2": |
544 |
# ignore non-tbz2 files |
544 |
category = os.path.basename(root) |
|
|
545 |
cpv = category+"/"+file[:-5] |
546 |
elif file[-5:] == ".xpak": |
547 |
category = os.path.basename(os.path.dirname(root)) |
548 |
cpv = category+"/"+file.rpartition('-')[0] |
549 |
else: |
550 |
# ignore other files |
545 |
continue |
551 |
continue |
546 |
path = os.path.join(root, file) |
552 |
path = os.path.join(root, file) |
547 |
category = os.path.split(root)[-1] |
|
|
548 |
cpv = category+"/"+file[:-5] |
549 |
st = os.lstat(path) |
553 |
st = os.lstat(path) |
550 |
if time_limit and (st[stat.ST_MTIME] >= time_limit): |
554 |
if time_limit and (st[stat.ST_MTIME] >= time_limit): |
551 |
# time-limit exclusion |
555 |
# time-limit exclusion |
552 |
continue |
556 |
continue |
553 |
# dict is cpv->[files] (2 files in general, because of symlink) |
557 |
# dict is cpv->[files] (2 files in general, because of symlink) |
554 |
clean_me[cpv] = [path] |
558 |
clean_me.setdefault(cpv,[]).append(path) |
555 |
#if os.path.islink(path): |
559 |
#if os.path.islink(path): |
556 |
if stat.S_ISLNK(st[stat.ST_MODE]): |
560 |
if stat.S_ISLNK(st[stat.ST_MODE]): |
557 |
clean_me[cpv].append(os.path.realpath(path)) |
561 |
clean_me[cpv].append(os.path.realpath(path)) |