#2993 import guestfs before dnf
Merged 8 months ago by tkopecek. Opened 9 months ago by tkopecek.
tkopecek/koji issue2964  into  master

file modified
+11 -1
@@ -48,8 +48,18 @@ 

  from gzip import GzipFile

  from optparse import SUPPRESS_HELP, OptionParser


- import Cheetah.Template

+ try:

+     # Due to https://bugzilla.redhat.com/show_bug.cgi?id=1923971

+     # and https://pagure.io/koji/issue/2964

+     # guestfs needs to be imported before dnf, so json libraries will

+     # load in non-breaking order (guestfs would be otherwise imported

+     # by ImageFactory/Oz

+     import guestfs  # noqa: F401

+ except ImportError:

+     pass

  import dnf


+ import Cheetah.Template

  import librepo

  import requests

  import rpm

To read "dnf is not available" is a little surprising, because python3-dnf is everywhere at this point. It's in the CentOS 8 base container images, etc. Can we clarify the error message further?

rebased onto 0934e8f

9 months ago

I've used different approach, so message is out now.

pretty please pagure-ci rebuild

9 months ago

Metadata Update from @tkopecek:
- Pull-request tagged with: testing-ready

8 months ago

Metadata Update from @tkopecek:
- Pull-request untagged with: testing-ready
- Pull-request tagged with: no_qe

8 months ago

Commit 5fca74c fixes this pull-request

Pull-Request has been merged by tkopecek

8 months ago