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:
+1
-1
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user