Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 80151 Details for
Bug 122996
use new PORTAGE_RSYNC_OPTS variable instead of hardcoded defaults
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Updated patch always appending --exclude stuff and adding PORTAGE_RSYNC_EXTRA_OPTS
rsync-opts2.diff (text/plain), 4.89 KB, created by
Marius Mauch (RETIRED)
on 2006-02-19 00:20:26 UTC
(
hide
)
Description:
Updated patch always appending --exclude stuff and adding PORTAGE_RSYNC_EXTRA_OPTS
Filename:
MIME Type:
Creator:
Marius Mauch (RETIRED)
Created:
2006-02-19 00:20:26 UTC
Size:
4.89 KB
patch
obsolete
>diff -ru bin/emerge.org bin/emerge >--- bin/emerge.org 2006-02-16 09:38:57.000000000 +0100 >+++ bin/emerge 2006-02-19 08:45:05.000000000 +0100 >@@ -2550,30 +2550,62 @@ > sys.exit(1) > mytimeout=180 > if portage.settings.has_key("RSYNC_TIMEOUT"): >+ print "WARNING: usage of RSYNC_TIMEOUT is deprecated, use PORTAGE_RSYNC_OPTS instead" > try: > mytimeout=int(portage.settings["RSYNC_TIMEOUT"]) >+ rsync_flags.append("--timeout=%d" % mytimeout) > except SystemExit, e: > raise # Needed else can't exit > except: > pass > >- rsync_flags = [ >- "--recursive", # Recurse directories >- "--links", # Consider symlinks >- "--safe-links", # Ignore links outside of tree >- "--perms", # Preserve permissions >- "--times", # Preserive mod times >- "--compress", # Compress the data transmitted >- "--force", # Force deletion on non-empty dirs >- "--whole-file", # Don't do block transfers, only entire files >- "--delete", # Delete files that aren't in the master tree >- "--delete-after", # Delete only after everything else is done >- "--stats", # Show final statistics about what was transfered >- "--timeout="+str(mytimeout), # IO timeout if not done in X seconds >- "--exclude='/distfiles'", # Exclude distfiles from consideration >- "--exclude='/local'", # Exclude local from consideration >- "--exclude='/packages'", # Exclude packages from consideration >- ] >+ if (not portage.settings.has_key("PORTAGE_RSYNC_OPTS")) \ >+ or portage.settings["PORTAGE_RSYNC_OPTS"] == "": >+ print "PORTAGE_RSYNC_OPTS empty or unset, using hardcoded defaults" >+ rsync_flags = [ >+ "--recursive", # Recurse directories >+ "--links", # Consider symlinks >+ "--safe-links", # Ignore links outside of tree >+ "--perms", # Preserve permissions >+ "--times", # Preserive mod times >+ "--compress", # Compress the data transmitted >+ "--force", # Force deletion on non-empty dirs >+ "--whole-file", # Don't do block transfers, only entire files >+ "--delete", # Delete files that aren't in the master tree >+ "--delete-after", # Delete only after everything else is done >+ "--stats", # Show final statistics about what was transfered >+ "--timeout="+str(mytimeout), # IO timeout if not done in X seconds >+ "--exclude='/distfiles'", # Exclude distfiles from consideration >+ "--exclude='/local'", # Exclude local from consideration >+ "--exclude='/packages'", # Exclude packages from consideration >+ ] >+ rsync_opts = "" >+ else: >+ # handle default opts later >+ print "using PORTAGE_RSYNC_OPTS instead of hardcoded defaults" >+ rsync_flags = [] >+ rsync_opts = portage.settings["PORTAGE_RSYNC_OPTS"] >+ if portage.settings.has_key("PORTAGE_RSYNC_EXTRA_OPTS"): >+ rsync_opts = " ".join([rsync_opts, portage.settings["PORTAGE_RSYNC_EXTRA_OPTS"]]) >+ # TODO: determine required options >+ for opt in ["--recursive","--times"]: >+ if not rsync_opts.find(opt) >= 0: >+ print yellow("WARNING:")+" adding required option %s not included in PORTAGE_RSYNC_OPTS" % opt >+ rsync_flags.append(opt) >+ for exclude in ["distfiles","local","packages"]: >+ opt = "--exclude='/"+exclude+"'" >+ if not rsync_opts.find(opt) >= 0: >+ print yellow("WARNING:")+" adding required option %s not included in PORTAGE_RSYNC_OPTS (override with --exclude='!')" % opt >+ rsync_flags.append(opt) >+ >+ # TODO: determine options required for official servers >+ if syncuri.rstrip("/").endswith(".gentoo.org/gentoo-portage"): >+ if not rsync_opts.find("--timeout") >= 0: >+ rsync_flags.append("--timeout=180") >+ for opt in ["--compress", "--whole-file"]: >+ if not rsync_opts.find(opt) >= 0: >+ print yellow("WARNING:")+" adding required option %s not included in PORTAGE_RSYNC_OPTS" % opt >+ rsync_flags.append(opt) > > if "--quiet" in myopts: > rsync_flags.append("--quiet") # Shut up a lot >@@ -2587,15 +2619,19 @@ > rsync_flags.append("--checksum") # Force checksum on all files > > if portage.settings.has_key("RSYNC_EXCLUDEFROM"): >+ print yellow("WARNING:")+" usage of RSYNC_EXCLUDEFROM is deprecated, use PORTAGE_RSYNC_OPTS instead" > if os.path.exists(portage.settings["RSYNC_EXCLUDEFROM"]): > rsync_flags.append("--exclude-from="+portage.settings["RSYNC_EXCLUDEFROM"]) > else: > print "!!! RSYNC_EXCLUDEFROM specified, but file does not exist." > > if portage.settings.has_key("RSYNC_RATELIMIT"): >+ print yellow("WARNING:")+" usage of RSYNC_RATELIMIT is deprecated, use PORTAGE_RSYNC_OPTS instead" > rsync_flags.append("--bwlimit="+portage.settings["RSYNC_RATELIMIT"]) > >- rsynccommand = "/usr/bin/rsync " + string.join(rsync_flags, " ") >+ rsynccommand = " ".join(["/usr/bin/rsync", " ".join(rsync_flags), rsync_opts]) >+ >+ print rsynccommand > > servertimestampdir = portage.settings.depcachedir+"/" > servertimestampfile = portage.settings.depcachedir+"/timestamp.chk"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 122996
:
79915
| 80151