| |
@@ -452,6 +452,12 @@
|
| |
self.log.info("Copy directory: {} as {}".format(
|
| |
os.path.join(srcdir, folder), os.path.join(destdir, folder)))
|
| |
|
| |
+ for f in os.listdir(os.path.join(destdir, folder)):
|
| |
+ if not f.endswith(".rpm") or f.endswith(".src.rpm"):
|
| |
+ continue
|
| |
+ mmd.artifacts.rpms.add(str(f.rstrip(".rpm")))
|
| |
+
|
| |
+ self.log.info("Module artifacts: {}".format(mmd.artifacts.rpms))
|
| |
modulemd.dump_all(os.path.join(destdir, "modules.yaml"), [mmd])
|
| |
createrepo(path=destdir, front_url=self.front_url,
|
| |
username=ownername, projectname=projectname,
|
| |
I've found out that it is possible to enable modules from Copr, see their info and so on, but it is not possible to install them. After some investigation with @mhatina we figured out, that we don't generate artifacts section [1] for our modules. So I've implemented it and I can confirm that it fixes the issue.
I needed the
splitFilename
function from frontend, so I've duplicated it to backend helpers. We really should make somepython-copr-common
package to share the code.[1] https://pagure.io/modulemd/blob/master/f/spec.yaml#_256