aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/rpmutil.py
diff options
context:
space:
mode:
authorBogdano Arendartchuk <bogdano@mandriva.org>2007-06-12 18:59:27 +0000
committerBogdano Arendartchuk <bogdano@mandriva.org>2007-06-12 18:59:27 +0000
commitf7ab5b0c279fe21bfbb65082a512eccabcad5001 (patch)
tree2b1002a040aa1ea5453a19ddb533e6bee88e7b94 /RepSys/rpmutil.py
parentae42a1c062d852e928e81c81546caa80fcbf3fa2 (diff)
downloadmgarepo-f7ab5b0c279fe21bfbb65082a512eccabcad5001.tar
mgarepo-f7ab5b0c279fe21bfbb65082a512eccabcad5001.tar.gz
mgarepo-f7ab5b0c279fe21bfbb65082a512eccabcad5001.tar.bz2
mgarepo-f7ab5b0c279fe21bfbb65082a512eccabcad5001.tar.xz
mgarepo-f7ab5b0c279fe21bfbb65082a512eccabcad5001.zip
Don't use mirror in 'co' when the user provides one URL
Diffstat (limited to 'RepSys/rpmutil.py')
-rw-r--r--RepSys/rpmutil.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py
index 671908f..fd06627 100644
--- a/RepSys/rpmutil.py
+++ b/RepSys/rpmutil.py
@@ -5,6 +5,7 @@ from RepSys.svn import SVN
from RepSys.simplerpm import SRPM
from RepSys.log import specfile_svn2rpm
from RepSys.util import execcmd
+from RepSys.command import default_parent
import rpm
import tempfile
import shutil
@@ -361,13 +362,17 @@ def check_changed(pkgdirurl, all=0, show=0, verbose=0):
"nopristine": nopristine}
def checkout(pkgdirurl, path=None, revision=None):
- svn = SVN(baseurl=pkgdirurl)
+ o_pkgdirurl = pkgdirurl
+ pkgdirurl = default_parent(o_pkgdirurl)
current = os.path.join(pkgdirurl, "current")
if path is None:
_, path = os.path.split(pkgdirurl)
- if mirror.enabled():
+ # if default_parent changed the URL, we can use mirrors because the
+ # user did not provided complete package URL
+ if (o_pkgdirurl != pkgdirurl) and mirror.enabled():
current = mirror.checkout_url(current)
print "checking out from mirror", current
+ svn = SVN(baseurl=pkgdirurl)
svn.checkout(current, path, rev=revision, show=1)
def _getpkgtopdir(basedir=None):