| |
@@ -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.