gbp-create-remote-repo: Allow for repository names without substitutions
authorGuido Günther <agx@sigxcpu.org>
Thu, 13 Jan 2011 18:38:28 +0000 (19:38 +0100)
committerGuido Günther <agx@sigxcpu.org>
Thu, 13 Jan 2011 19:49:43 +0000 (20:49 +0100)
gbp-create-remote-repo

index e62ef06..5316a6a 100755 (executable)
@@ -52,8 +52,8 @@ def parse_remote(remote_url, pkg):
     frags = urlparse.urlparse(remote_url)
     if frags.scheme != 'ssh':
         raise GbpError, "Remote URL must use ssh protocol."
-    if not '%(pkg)s' in remote_url:
-        raise GbpError, "Remote URL lacks \%(pkg)s"
+    if not '%(pkg)s' in remote_url and not remote_url.endswith(".git"):
+        raise GbpError, "Remote URL needs to contain either a repository name or '%(pkg)s'"
     remote = { 'pkg': pkg,
                'url' : remote_url % { 'pkg': pkg },
                'dir': frags.path % { 'pkg': pkg },