#799 Use the new repo_id format as Fedora 28 is now EOL
Merged a year ago by praiskup. Opened a year ago by dturecek.
copr/ dturecek/copr repo-format  into  master

@@ -550,26 +550,6 @@ 

      return urlparse(url)



- def get_copr_repo_id(copr_dir):

-     """

-     We cannot really switch to the new

-     copr:{hostname}:{owner}:{project} format yet, because it is implemented in

-     dnf-plugins-core-3.x which is only on F29+


-     Since the F29+ plugin is able to work with both old and new formats, we can

-     safely stay with the old one until F28 is still supported. Once it goes EOL,

-     we can migrate to the new format.


-     New format is:


-         return "copr:{0}:{1}:{2}".format(app.config["PUBLIC_COPR_HOSTNAME"].split(":")[0],

-                                          copr_dir.copr.owner_name.replace("@", "group_"),

-                                          copr_dir.name)


-     """

-     return copr_dir.repo_id



  class SubdirMatch(object):

      def __init__(self, subdir):

          if not subdir:

@@ -717,7 +717,9 @@ 

      if not mock_chroot:

          raise ObjectNotFound("Chroot {} does not exist".format(name_release))


-     repo_id = helpers.get_copr_repo_id(copr_dir)

+     repo_id = "copr:{0}:{1}:{2}".format(app.config["PUBLIC_COPR_HOSTNAME"].split(":")[0],

+                                         copr_dir.copr.owner_name.replace("@", "group_"),

+                                         copr_dir.name)

      url = os.path.join(copr_dir.repo_url, '') # adds trailing slash

      repo_url = generate_repo_url(mock_chroot, url)

      pubkey_url = urljoin(url, "pubkey.gpg")

Could you please check that it is OK on rhel8 as well? Otherwise LGTM:

07:50:21 ~/rh/projects/copr/docker-testing$ cat /etc/dnf/plugins/copr.d/local.conf
hostname = localhost
protocol = http
port = 55555
07:50:23 ~/rh/projects/copr/docker-testing$ sudo dnf copr enable local/praiskup/ping

You are about to enable a Copr repository. Please note that this
repository is not part of the main distribution, and quality may vary.

The Fedora Project does not exercise any power over the contents of
this repository beyond the rules outlined in the Copr FAQ at
and packages are not held to any quality or security level.

Please do not file bug reports about these packages in Fedora
Bugzilla. In case of problems, contact the owner of this repository.

Do you really want to enable localhost:55555/praiskup/ping? [y/N]: y
Repository successfully enabled.
07:50:34 ~/rh/projects/copr/docker-testing$ cat '/etc/yum.repos.d/_copr:localhost:praiskup:ping.repo'
name=Copr repo for ping owned by praiskup
gpgkey=http://copr-be.cloud.fedoraproject.org/results/praiskup/ping/pubkey.gpg repo_gpgcheck=0
enabled_metadata=107:50:51 ~/rh/projects/copr/docker-testing$

dnf-plugins-core-4.0.7-1.el8.noarch is in RHEL 8 now

Pull-Request has been merged by praiskup

a year ago