modulemd-tools icon indicating copy to clipboard operation
modulemd-tools copied to clipboard

I had to patch dir2module.py to get it to complete

Open cpsource opened this issue 3 years ago • 1 comments

Here's the patch:

diff --git a/dir2module/dir2module/dir2module.py b/dir2module/dir2module/dir2module.py
index 6643a83..e639bba 100755
--- a/dir2module/dir2module/dir2module.py
+++ b/dir2module/dir2module/dir2module.py
@@ -113,8 +113,8 @@ class Module(ModuleBase):
         for pkglicense in self.licenses:
             mod_stream.add_content_license(pkglicense)
 
-        for nevra in self.package_nevras:
-            mod_stream.add_rpm_artifact(nevra)
+#        for nevra in self.package_nevras:
+#            mod_stream.add_rpm_artifact(nevra)
 
         dependencies = Modulemd.Dependencies()
         for depname, depstream in self.requires.items():

Apparently nevras is an empty list, so add_rpm_artifact dies.

I'm hacking yes, but if the list is null, I don't need the code right?

Can you provide a proper fix?

cpsource avatar Jan 11 '22 14:01 cpsource

Can you provide a proper fix?

Sure, the fix should be easy. But this never happened to me. Can you please point me to a package that has empty NEVRAs list? I would like to reproduce the issue somehow.

FrostyX avatar Jan 12 '22 18:01 FrostyX