Do not split PORTAGE_RSYNC_EXTRA_OPTS and add it directly to rsynccommand in order...
authorZac Medico <zmedico@gentoo.org>
Mon, 20 Mar 2006 00:30:55 +0000 (00:30 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 20 Mar 2006 00:30:55 +0000 (00:30 -0000)
svn path=/main/trunk/; revision=2961

bin/emerge

index f22ada946fc545d7dedb50fe2584810591ae51cd..b17a2a6b20a53acba9989a0df111121bbe39534d 100755 (executable)
@@ -2509,8 +2509,6 @@ if myaction in ["sync","metadata"] and (not "--help" in myopts):
                mytimeout=180
 
                rsync_opts = []
-               if portage.settings["PORTAGE_RSYNC_EXTRA_OPTS"] != "":
-                       rsync_opts.extend(portage.settings["PORTAGE_RSYNC_EXTRA_OPTS"].split())
 
                if portage.settings["PORTAGE_RSYNC_OPTS"] == "":
                        portage.writemsg("PORTAGE_RSYNC_OPTS empty or unset, using hardcoded defaults\n")
@@ -2609,11 +2607,6 @@ if myaction in ["sync","metadata"] and (not "--help" in myopts):
                        rsync_opts.append("--bwlimit=%s" % \
                        portage.settings["RSYNC_RATELIMIT"])
 
-               rsynccommand = ["/usr/bin/rsync"] + rsync_opts
-
-               if "--debug" in myopts:
-                       print rsynccommand
-
                servertimestampdir  = portage.settings.depcachedir+"/"
                servertimestampfile = portage.settings.depcachedir+"/timestamp.chk"
                tmpservertimestampdir  = portage.settings["PORTAGE_TMPDIR"]+"/"
@@ -2695,9 +2688,17 @@ if myaction in ["sync","metadata"] and (not "--help" in myopts):
 
                        if "--quiet" not in myopts:
                                print ">>> Checking server timestamp ..."
-                       rsynccommand.append(dosyncuri + "/metadata/timestamp.chk")
-                       rsynccommand.append(tmpservertimestampdir)
-                       mycommand = " ".join(rsynccommand)
+
+                       rsynccommand = " ".join(["/usr/bin/rsync",
+                               portage.settings["PORTAGE_RSYNC_EXTRA_OPTS"],
+                               " ".join(rsync_opts)])
+
+                       if "--debug" in myopts:
+                               print rsynccommand
+
+                       mycommand = " ".join([rsynccommand,
+                               dosyncuri + "/metadata/timestamp.chk",
+                               tmpservertimestampdir])
                        exitcode=portage.spawn(mycommand,portage.settings,free=1)
                        if (exitcode==0):
                                try: