| |
@@ -1377,32 +1377,16 @@
|
| |
namespace rpms will set.
|
| |
:rtype: str
|
| |
"""
|
| |
-
|
| |
- if self.distgit_namespaced:
|
| |
- if '/' in repo_name:
|
| |
- giturl = self.gitbaseurl % {
|
| |
- 'user': self.user,
|
| |
- 'repo': repo_name,
|
| |
- # This is for the compatible with old format
|
| |
- 'module': repo_name,
|
| |
- }
|
| |
- else:
|
| |
- # Default to rpms namespace for backwards compat
|
| |
- rpms_repo_name = 'rpms/%s' % repo_name
|
| |
- giturl = self.gitbaseurl % {
|
| |
- 'user': self.user,
|
| |
- 'repo': rpms_repo_name,
|
| |
- # This is for the compatible with old format
|
| |
- 'module': rpms_repo_name,
|
| |
- }
|
| |
- else:
|
| |
- giturl = self.gitbaseurl % {
|
| |
- 'user': self.user,
|
| |
- 'repo': repo_name,
|
| |
- # This is for the compatible with old format
|
| |
- 'module': repo_name
|
| |
- }
|
| |
-
|
| |
+ if self.distgit_namespaced and '/' not in repo_name:
|
| |
+ # Default to rpms namespace for backwards compat
|
| |
+ repo_name = 'rpms/%s' % repo_name
|
| |
+
|
| |
+ giturl = self.gitbaseurl % {
|
| |
+ 'user': self.user,
|
| |
+ 'repo': repo_name,
|
| |
+ # This is for the compatible with old format
|
| |
+ 'module': repo_name
|
| |
+ }
|
| |
return giturl
|
| |
|
| |
def _get_namespace_anongiturl(self, repo_name):
|
| |
@@ -1414,28 +1398,15 @@
|
| |
namespace rpms will be set.
|
| |
:rtype: str
|
| |
"""
|
| |
+ if self.distgit_namespaced and '/' not in repo_name:
|
| |
+ # Default to rpms namespace for backwards compat
|
| |
+ repo_name = 'rpms/%s' % repo_name
|
| |
|
| |
- if self.distgit_namespaced:
|
| |
- if '/' in repo_name:
|
| |
- giturl = self.anongiturl % {
|
| |
- 'repo': repo_name,
|
| |
- # This is for the compatible with old format
|
| |
- 'module': repo_name,
|
| |
- }
|
| |
- else:
|
| |
- rpms_repo_name = 'rpms/%s' % repo_name
|
| |
- # Default to rpms namespace for backwards compat
|
| |
- giturl = self.anongiturl % {
|
| |
- 'repo': rpms_repo_name,
|
| |
- # This is for the compatible with old format
|
| |
- 'module': rpms_repo_name,
|
| |
- }
|
| |
- else:
|
| |
- giturl = self.anongiturl % {
|
| |
- 'repo': repo_name,
|
| |
- 'module': repo_name,
|
| |
- }
|
| |
-
|
| |
+ giturl = self.anongiturl % {
|
| |
+ 'repo': repo_name,
|
| |
+ # This is for the compatible with old format
|
| |
+ 'module': repo_name,
|
| |
+ }
|
| |
return giturl
|
| |
|
| |
def add_tag(self, tagname, force=False, message=None, file=None):
|
| |
"clone" method in fedpkg accepted repo name with .git extension. It cloned repo successfully, but during configuration of the repo it failed, because of wrong directory name derived from the repo name. Now rpkg checks (and modifies) the correct format at the beginning of the process.
Another commit in PR simplifies methods for getting namespace giturl. There were some unnecessary duplications.