diff options
| author | solar <solar@gentoo.org> | 2007-04-29 03:15:05 +0000 |
|---|---|---|
| committer | solar <solar@gentoo.org> | 2007-04-29 03:15:05 +0000 |
| commit | 5f34edff090dcd75ac77e4d98c4d8550706eabc8 (patch) | |
| tree | c109d9108d3c5b22ae288c403073aad34b3a3004 /trunk/src | |
| parent | 052b87496de75c8e1074383e4b2d62ce5a51d8b6 (diff) | |
| download | gentoolkit-5f34edff090dcd75ac77e4d98c4d8550706eabc8.tar.gz | |
- always keep the non compressed version around
svn path=/; revision=396
Diffstat (limited to 'trunk/src')
| -rw-r--r-- | trunk/src/genpkgindex/genpkgindex | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/trunk/src/genpkgindex/genpkgindex b/trunk/src/genpkgindex/genpkgindex index 6c0ca77..16ba219 100644 --- a/trunk/src/genpkgindex/genpkgindex +++ b/trunk/src/genpkgindex/genpkgindex @@ -230,10 +230,13 @@ fp.write("\n") fp.flush() fp.close() if (compress): - os.system("bzip2 .Packages") + os.system("bzip2 < .Packages > .Packages.bz2") os.rename(".Packages.bz2", "Packages.bz2") else: - os.rename(".Packages", "Packages") + if os.path.exists("Packages.bz2"): + os.unlink("Packages.bz2") + +os.rename(".Packages", "Packages") # Clean up stale cache files os.chdir(portage_const.CACHE_PATH+"/xpak") |
