Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cpsource opened this issue Jan 11, 2022 · 1 comment
Open

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

cpsource opened this issue Jan 11, 2022 · 1 comment

Comments

@cpsource
Copy link

cpsource commented Jan 11, 2022

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?

@FrostyX
Copy link
Member

FrostyX commented Jan 12, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants