some updates to sync()

git-svn-id: http://svn.sabayonlinux.org/projects/entropy/trunk@90 cd1c1023-2f26-0410-ae45-c471fc1f0318
This commit is contained in:
lxnay
2007-02-11 14:59:14 +00:00
parent d4aab78970
commit d0734612f8
2 changed files with 10 additions and 3 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ if (options[0] == "world"):
sys.exit(0)
# sync tool
elif (options[0] == "sync"):
enzymeTools.sync()
enzymeTools.sync(options)
sys.exit(0)
# add other options here
+9 -2
View File
@@ -52,7 +52,14 @@ def getSyncTime():
# fetch the latest updates from Gentoo rsync mirrors
def sync():
def sync(options):
syncMiscRedirect = "/dev/null"
for i in options:
if i.startswith("--verbose") or i.startswith("-v"):
syncMiscRedirect = None
print_info(green("syncing the Portage tree at: "+etpConst['portagetreedir']))
rc = spawnCommand(vdbPORTDIR+"="+etpConst['portagetreedir']+" "+cdbEMERGE+" --sync", redirect = "/dev/null")
rc = spawnCommand(vdbPORTDIR+"="+etpConst['portagetreedir']+" "+cdbEMERGE+" --sync ", redirect = syncMiscRedirect) # redirect = "/dev/null"
if (rc != 0):
print_error(red("an error occoured while syncing the Portage tree. Are you sure that your Internet connection works?"))
sys.exit(101)