copr-builders: allow rpkg-util to build from forks
This commit is contained in:
parent
4deeeb0928
commit
1e8d40d56b
3 changed files with 28 additions and 1 deletions
|
@ -0,0 +1,21 @@
|
||||||
|
diff --git a/rpkglib/lookaside_cache.py b/rpkglib/lookaside_cache.py
|
||||||
|
index 0a38152..a6e3ec2 100644
|
||||||
|
--- a/rpkglib/lookaside_cache.py
|
||||||
|
+++ b/rpkglib/lookaside_cache.py
|
||||||
|
@@ -48,10 +48,15 @@ class LookasideCache(object):
|
||||||
|
'hash': hash,
|
||||||
|
}
|
||||||
|
subs.update(kwargs)
|
||||||
|
+
|
||||||
|
+ parts = subs["repo_path"].split("/")
|
||||||
|
+ subs["module"] = parts[-1]
|
||||||
|
+ subs["ns1"] = parts[-2]
|
||||||
|
+
|
||||||
|
try:
|
||||||
|
result_url = self.download_url % subs
|
||||||
|
except Exception as e:
|
||||||
|
- raise DownloadError(
|
||||||
|
+ raise RpkgError(
|
||||||
|
'Could not get download url from %s template. '
|
||||||
|
'Original error: %s.' % (self.download_url, str(e)))
|
||||||
|
|
|
@ -244,3 +244,9 @@
|
||||||
mode: 0644
|
mode: 0644
|
||||||
when:
|
when:
|
||||||
- prepare_base_image is not defined
|
- prepare_base_image is not defined
|
||||||
|
|
||||||
|
- name: patch from https://pagure.io/rpkg-util/pull-request/38
|
||||||
|
patch: src=patches/rpkg-v3.patch
|
||||||
|
dest=/usr/lib/python3.10/site-packages/rpkglib/lookaside_cache.py
|
||||||
|
when:
|
||||||
|
- prepare_base_image is not defined
|
||||||
|
|
|
@ -38,6 +38,6 @@ rpm_vendor_copr_name = {{ rpm_vendor_copr_name }}
|
||||||
|
|
||||||
[distgit0]
|
[distgit0]
|
||||||
distgit_hostname_pattern = src.fedoraproject.org
|
distgit_hostname_pattern = src.fedoraproject.org
|
||||||
distgit_lookaside_url = https://src.fedoraproject.org/repo/pkgs/%(repo_path)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s
|
distgit_lookaside_url = https://src.fedoraproject.org/repo/pkgs/%(ns1)s/%(module)s/%(filename)s/%(hashtype)s/%(hash)s/%(filename)s
|
||||||
distgit_clone_url = https://src.fedoraproject.org/%(repo_path)s
|
distgit_clone_url = https://src.fedoraproject.org/%(repo_path)s
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue