Lines 98-103
Link Here
|
98 |
'portage.versions:best,catpkgsplit,catsplit,endversion_keys,' + \ |
98 |
'portage.versions:best,catpkgsplit,catsplit,endversion_keys,' + \ |
99 |
'suffix_value@endversion,pkgcmp,pkgsplit,vercmp,ververify', |
99 |
'suffix_value@endversion,pkgcmp,pkgsplit,vercmp,ververify', |
100 |
'portage.xpak', |
100 |
'portage.xpak', |
|
|
101 |
'portage.busy', |
101 |
) |
102 |
) |
102 |
|
103 |
|
103 |
import portage.const |
104 |
import portage.const |
Lines 7503-7515
Link Here
|
7503 |
bsd_chflags.chflags(os.path.dirname(dest), 0) |
7504 |
bsd_chflags.chflags(os.path.dirname(dest), 0) |
7504 |
|
7505 |
|
7505 |
if destexists: |
7506 |
if destexists: |
7506 |
if stat.S_ISLNK(dstat[stat.ST_MODE]): |
7507 |
# done for all but dir now, to assure that busy files are moved |
|
|
7508 |
# out of the way before moving in the new files. |
7509 |
#if stat.S_ISLNK(dstat[stat.ST_MODE]): |
7510 |
if not stat.S_ISDIR(dstat[stat.ST_MODE]): |
7507 |
try: |
7511 |
try: |
7508 |
os.unlink(dest) |
7512 |
os.unlink(dest) |
7509 |
destexists=0 |
7513 |
destexists=0 |
7510 |
except SystemExit as e: |
7514 |
except SystemExit as e: |
7511 |
raise |
7515 |
raise |
7512 |
except Exception as e: |
7516 |
except Exception as e: |
|
|
7517 |
# Failed to remove the existing file. Probably "Text file busy" |
7518 |
# FIXXME: how can i check whether its really a busy text file? |
7519 |
_getBusyFiles(mysettings).addBusyFile(dest) |
7513 |
pass |
7520 |
pass |
7514 |
|
7521 |
|
7515 |
if stat.S_ISLNK(sstat[stat.ST_MODE]): |
7522 |
if stat.S_ISLNK(sstat[stat.ST_MODE]): |
Lines 9084-9089
Link Here
|
9084 |
close_portdbapi_caches() |
9091 |
close_portdbapi_caches() |
9085 |
commit_mtimedb() |
9092 |
commit_mtimedb() |
9086 |
|
9093 |
|
|
|
9094 |
try: |
9095 |
_getBusyFiles().cleanBusyFiles() |
9096 |
except: |
9097 |
pass |
9098 |
|
9087 |
atexit_register(portageexit) |
9099 |
atexit_register(portageexit) |
9088 |
|
9100 |
|
9089 |
def _global_updates(trees, prev_mtimes): |
9101 |
def _global_updates(trees, prev_mtimes): |
Lines 9470-9475
Link Here
|
9470 |
"flushmtimedb"): |
9482 |
"flushmtimedb"): |
9471 |
globals()[k] = _LegacyGlobalProxy(k) |
9483 |
globals()[k] = _LegacyGlobalProxy(k) |
9472 |
|
9484 |
|
|
|
9485 |
busyfiles=None |
9486 |
def _getBusyFiles(mysettings=None): |
9487 |
global busyfiles |
9488 |
|
9489 |
# i know, if settings differ, you won't get another path to busydb, but |
9490 |
# as long as you get the same path _always_, this does not matter. |
9491 |
if busyfiles is None: |
9492 |
if mysettings is None: |
9493 |
global settings |
9494 |
mysettings = settings |
9495 |
|
9496 |
busyfiles = busy.BusyFiles(mysettings) |
9497 |
|
9498 |
return busyfiles |
9499 |
|
9473 |
# Clear the cache |
9500 |
# Clear the cache |
9474 |
dircache={} |
9501 |
dircache={} |
9475 |
|
9502 |
|