#513 Use DNF from the bootstrap buildroot instead of the actual buildroot
Merged a month ago by ngompa. Opened 3 months ago by frostyx.
frostyx/FedoraReview repoquery-bug  into  master

file modified
+21 -12
@@ -63,9 +63,13 @@ 

                  *shlex.split(Settings.mock_options),

                  "-qn",

                  "--enable-network",

-                 "shell",

+                 "--pm-cmd",

                  "--",

-                 "dnf makecache",

+                 # We want to run `dnf makecache` here but for some reason, it

+                 # doesn't relly make the consequent `repoquery -C` commands

+                 # work. Let's simply repoquery without the cache-only to

+                 # properly create any needed cache for the consequent calls.

+                 "repoquery", "-l", "hello",

              ]

          )

      except subprocess.CalledProcessError:
@@ -87,10 +91,12 @@ 

          *shlex.split(Settings.mock_options),

          "-qn",

          "--enable-network",

-         "shell",

+         "--pm-cmd",

          "--",

-         "dnf-3 repoquery -q -C --requires --resolve " + " ".join(list(set(pkgs))),

+         "repoquery", "-q", "-C", "--requires", "--resolve",

      ]

+     cmd += list(set(pkgs))

+ 

      Settings.get_logger().debug("Running: %s", " ".join(cmd))

      try:

          dnf = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True)
@@ -122,10 +128,12 @@ 

          *shlex.split(Settings.mock_options),

          "-qn",

          "--enable-network",

-         "shell",

+         "--pm-cmd",

          "--",

-         "dnf-3 repoquery -q -C --provides " + " ".join(list(set(pkgs))),

+         "repoquery", "-q", "-C", "--provides",

      ]

+     cmd += list(set(pkgs))

+ 

      Settings.get_logger().debug("Running: %s", " ".join(cmd))

      try:

          dnf = subprocess.Popen(cmd, stdout=subprocess.PIPE, universal_newlines=True)
@@ -166,9 +174,9 @@ 

          *shlex.split(Settings.mock_options),

          "-qn",

          "--enable-network",

-         "shell",

+         "--pm-cmd",

          "--",

-         'dnf-3 repoquery -q -C --whatprovides "' + req + '"',

+         "repoquery", "-q", "-C", "--whatprovides", req,

      ]

      Settings.get_logger().debug("Running: %s", " ".join(cmd))

  
@@ -265,9 +273,9 @@ 

              *shlex.split(Settings.mock_options),

              "-qn",

              "--enable-network",

-             "shell",

+             "--pm-cmd",

              "--",

-             "dnf-3 repoquery -C --quiet --file " + path,

+             "repoquery", "-C", "--quiet", "--file", path,

          ]

          Settings.get_logger().debug("Running: %s", " ".join(cmd))

          try:
@@ -298,10 +306,11 @@ 

          *shlex.split(Settings.mock_options),

          "-qn",

          "--enable-network",

-         "shell",

+         "--pm-cmd",

          "--",

-         "dnf-3 repoquery -C -l " + " ".join(list(set(pkgs))),

+         "repoquery", "-C", "-l",

      ]

+     cmd += list(set(pkgs))

  

      Settings.get_logger().debug("Running: %s", " ".join(cmd))

      try:

Fix #510
Fix #511
Fix https://github.com/fedora-copr/copr/issues/3147

This depends on the following Mock PR:
https://github.com/rpm-software-management/mock/pull/1341

This works for fedora-rawhide-x86_64, fedora-39-x86_64, and
fedora-38-x86_64 but doesn't work for fedora-40-x86_64.

This works for fedora-rawhide-x86_64, fedora-39-x86_64, and
fedora-38-x86_64 but doesn't work for fedora-40-x86_64.

What's wrong with fedora-40?

Isn't that a dnf5 chroot?

rebased onto 667c2f79fcb2c78804064f0c63005866e4c519d7

2 months ago

rebased onto 0d080d6

a month ago

Looks reasonable to me. Merging, thanks!

Pull-Request has been merged by ngompa

a month ago
Metadata