aboutsummaryrefslogtreecommitdiffstats
path: root/repsys
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2008-07-17 12:24:21 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2008-07-17 12:24:21 +0000
commit5c7f585c08c8ffb944095ae031fbf82a54ba13bc (patch)
treec3b1eaad57b0518416b5adb59ac51576716ebf1e /repsys
parent0af96a9eb0e69191d5fb5d5dcfa35a287bcc31b4 (diff)
downloadmgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.tar
mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.tar.gz
mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.tar.bz2
mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.tar.xz
mgarepo-5c7f585c08c8ffb944095ae031fbf82a54ba13bc.zip
Allow specifying distro branches without using complete URLs
Added the configuration option "repository", which will have the URL to the root of the repository. The change also allowed using mirrors in all the read-only commands.
Diffstat (limited to 'repsys')
-rwxr-xr-xrepsys6
1 files changed, 5 insertions, 1 deletions
diff --git a/repsys b/repsys
index 67bb180..3869119 100755
--- a/repsys
+++ b/repsys
@@ -1,5 +1,5 @@
#!/usr/bin/python
-from RepSys import Error, plugins
+from RepSys import Error, plugins, config
from RepSys.command import *
import getopt
import sys
@@ -50,8 +50,12 @@ def parse_options():
parser.add_option("--help-plugins", action="callback", callback=plugin_help)
parser.add_option("--help-plugin", type="string", dest="__ignore",
action="callback", callback=plugin_help)
+ parser.add_option("--no-mirror", "-M", action="store_false",
+ dest="_mirror", default=True)
opts, args = parser.parse_args()
+ config.set("global", "use-mirror", opts._mirror and "yes" or "no")
del opts.__ignore
+ del opts._mirror
if len(args) < 1:
parser.print_help(sys.stderr)
sys.exit(1)