#1562 dnf repoclosure fails on incompatible arches
Closed: Fixed 2 years ago by lsedlar. Opened 2 years ago by ktdreyer.

If I run Pungi's repoclosure on an architecture that is incompatible with my compose host, repoclosure fails with many basic errors about libc, etc.

From dnf-repoclosure(8):

To run repoclosure for arch incompatible with your system use --forcearch=<arch> option to change basearch.

When I add --forcearch=ppc64le, then the dnf repoclosure command works as expected on my x86_64 host.

When I was looking at fixing this in Pungi, I see get_repoclosure_cmd() can take a list for the arch parameter. It's not clear to me why this method takes a list. Maybe for 32-bit vs 64-bit? But the test suite has an interesting test case here:

def test_multiple_arches(self):
    self.assertEqual(
        rc.get_repoclosure_cmd(arch=["x86_64", "ppc64"]),
        ["/usr/bin/repoclosure", "--tempcache", "--arch=x86_64", "--arch=ppc64"],
    )

I don't know how realistic that test is - would we ever run repoclosure with both "x86_64" and "ppc64", since those are incompatible?

And the test suite only exercises the multiple-arches code path for the Yum backend, not the DNF backend.

Regardless, it's a bit tricky to know how to add --forcearch, given that arch can be a list.


That's a good find.

The test is not really good. There are regularly multiple values, but never incompatible arches like that. For non-multilib the list has two values ["ppc64le", "noarch"], for multilib there are all multilib arches ["x86_64", "athlon", "i686", "i586", "i486", "i386", "noarch"].

What do you think of #1563 ?

Metadata Update from @hlin:
- Issue set to the milestone: 4.3.2

2 years ago

A good find that we first found three years ago :D

https://bugzilla.redhat.com/show_bug.cgi?id=1565257

glad this is finally fixed!

Login to comment on this ticket.

Metadata
Related Pull Requests
  • #1563 Merged 2 years ago