From 748d5df242ad0d03be8a93dff98014ea9825e87f Mon Sep 17 00:00:00 2001 From: lxnay Date: Sun, 15 Apr 2007 12:08:58 +0000 Subject: [PATCH] some minor changes git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@292 cd1c1023-2f26-0410-ae45-c471fc1f0318 --- tools/gentooTranslator | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tools/gentooTranslator b/tools/gentooTranslator index 3f1051ff8..4df5e2f41 100644 --- a/tools/gentooTranslator +++ b/tools/gentooTranslator @@ -39,6 +39,8 @@ for arch in archs: # sync directories for arch in archs: + print "Architecture: "+arch + # get the dir content dircontent = os.listdir(etpPackagesDir+"/"+arch) @@ -50,18 +52,18 @@ for arch in archs: dircontent = _dircontent # clean the current content of the gentooPackagesDirs+"/"+arch - os.system("rm -rf "+gentooPackagesDirs+"/"+arch+"/*.tbz2") + os.system("rm -rf "+gentooPackagesDirs+"/"+arch+"/*") # move packages files for file in dircontent: if (not file.endswith("-unstable.tbz2")) and (not file.endswith("-stable.tbz2")): - print "<> Copying file"+file - os.system("cp "+etpPackagesDir+"/"+arch+"/"+file+" "+gentooPackagesDirs+"/"+arch+"/") + print "<> Copying file "+file + os.system("ln -sf "+etpPackagesDir+"/"+arch+"/"+file+" "+gentooPackagesDirs+"/"+arch+"/") elif file.endswith("-unstable.tbz2"): # look if there's the same package tagged as stable newfilename = file.split("-unstable.tbz2")[0]+".tbz2" - print "<> Copying file"+file - os.system("cp "+etpPackagesDir+"/"+arch+"/"+file+" "+gentooPackagesDirs+"/"+arch+"/"+newfilename) + print "<> Copying file "+file + os.system("ln -sf "+etpPackagesDir+"/"+arch+"/"+file+" "+gentooPackagesDirs+"/"+arch+"/"+newfilename) elif file.endswith("-stable.tbz2"): unstablefilename = file.split("-stable.tbz2")[0]+"-unstable.tbz2" if os.path.isfile(etpPackagesDir+"/"+arch+"/"+unstablefilename): @@ -69,6 +71,6 @@ for arch in archs: continue # look if there's the same package tagged as stable newfilename = file.split("-stable.tbz2")[0]+".tbz2" - print "<> Copying file"+file - os.system("cp "+etpPackagesDir+"/"+arch+"/"+file+" "+gentooPackagesDirs+"/"+arch+"/"+newfilename) + print "<> Copying file "+file + os.system("ln -sf "+etpPackagesDir+"/"+arch+"/"+file+" "+gentooPackagesDirs+"/"+arch+"/"+newfilename) \ No newline at end of file