diff options
Diffstat (limited to 'RepSys/rpmutil.py')
-rw-r--r-- | RepSys/rpmutil.py | 9 |
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): |