#37 Module name without namespace
Closed by lsedlar. Opened by lsedlar.
limited-namespacing  into  master

Download 37.patch
no initial comment

This patch also fixes fedpkg scratch-build --srpm.

This patch also fixes fedpkg scratch-build --srpm.

how?

Unfortunately this breaks the container-build functionality, which was why this change was originally put in.

$ fedpkg --conf ~/.fedpkg-stg.conf container-build
Created task: 90039273
Task info: http://koji.stg.fedoraproject.org/koji/taskinfo?taskID=90039273
Watching tasks (this may be safely interrupted)...
90039273 buildContainer (noarch): free
90039273 buildContainer (noarch): free -> open (buildvm-01.stg.phx2.fedoraproject.org)
90039273 buildContainer (noarch): open (buildvm-01.stg.phx2.fedoraproject.org) -> FAILED: BuildError: Error running GIT command "git reset --hard 508ee0333fb060edc68f72b118a054272c383f1c", see checkout-for-labels.log for details
  0 free  0 open  0 done  1 failed
90039273 buildContainer (noarch) failed

This originates because of the change I made to how we get the anongiturl:

def _get_namespace_anongiturl(self, module):
    """Get the namespaced git url, if DistGit namespaces enabled
    Takes a module name
    Returns a string of giturl
    """
    if self.distgit_namespaced:
        if '/' in module:
            giturl = self.anongiturl % {'module': module}
        else:
            # Default to rpms namespace for backwards compat
            giturl = self.anongiturl % {'module': "rpms/%s" % module}
    else:
        giturl = self.anongiturl % {'module': module}
    return giturl

It's possible that I need to refactor how I solved that problem or just find a different way to resolve the srpm download issue. Either way I'll look at it and see if I can get a fix in.

The current issue affects anything that uses module name – not just downloading sources, but also fedpkg verrel, fedpkg patch, etc.

I think this needs to be fixed in some other way for container build.

Pull-Request has been updated

I have updated the patch. It is an ugly hack, but I think it could work.

In the meantime, I have untagged rpkg 1.41 and fedpkg 1.22 from Rawhide to prevent people from installing broken version.

This is my proposal as a solution. I think we need to treat the module_name and the src_module_name as different entities for the sake of namespacing since certain things we interact with need to be namespaced or not (we could change the src_module_name to something like koji_module_name if desired).

https://pagure.io/rpkg/pull-request/38

Pull-Request has been closed by lsedlar

Metadata