Lines 557-571
Link Here
|
557 |
clean_me[cpv].append(os.path.realpath(path)) |
557 |
clean_me[cpv].append(os.path.realpath(path)) |
558 |
# keep only obsolete ones |
558 |
# keep only obsolete ones |
559 |
if destructive: |
559 |
if destructive: |
560 |
dbapi = var_dbapi |
560 |
dbapi = var_dbapi |
561 |
if package_names: |
561 |
cp_all = (dbapi.cp_all() if package_names else []) |
562 |
cp_all = dict.fromkeys(dbapi.cp_all()) |
|
|
563 |
else: |
564 |
cp_all = {} |
565 |
else: |
562 |
else: |
566 |
dbapi = port_dbapi |
563 |
dbapi = port_dbapi |
567 |
cp_all = {} |
564 |
cp_all = [] |
568 |
for cpv in list(clean_me): |
565 |
for cpv in list(clean_me): |
569 |
if exclDictMatchCP(exclude,portage.cpv_getkey(cpv)): |
566 |
if exclDictMatchCP(exclude,portage.cpv_getkey(cpv)): |
570 |
# exclusion because of the exclude file |
567 |
# exclusion because of the exclude file |
571 |
del clean_me[cpv] |
568 |
del clean_me[cpv] |
Lines 573-581
Link Here
|
573 |
if dbapi.cpv_exists(cpv): |
570 |
if dbapi.cpv_exists(cpv): |
574 |
# exclusion because pkg still exists (in porttree or vartree) |
571 |
# exclusion because pkg still exists (in porttree or vartree) |
575 |
del clean_me[cpv] |
572 |
del clean_me[cpv] |
576 |
continue |
573 |
continue |
577 |
if portage.cpv_getkey(cpv) in cp_all: |
574 |
if portage.cpv_getkey(cpv) in cp_all and port_dbapi.cpv_exists(cpv): |
578 |
# exlusion because of --package-names |
575 |
# exlusion because of --package-names |
579 |
del clean_me[cpv] |
576 |
del clean_me[cpv] |
580 |
|
577 |
|
581 |
return clean_me |
578 |
return clean_me |