Skip to contentSkip to conversation

dnf ignorearch not working

DISCUSSION Jonathan Richardson 2 participants 2 messages Feb 1, 2021

lore
Share & tools
lore
#0 lore raw

Hi,

I tried adding ignorearch=True to dnf.conf but it doesn't work in a recent yocto using dnf 4.5.2. I have a driver built with different machine types but they are functionally identical. I see that dnf uses 'rpm'. rpm --ignorearch does work. I debugged dnf and see that when dnf installs an rpm of the same architecture it sets the IGNOREARCH flag which is used by 'rpm'.

@property

    def _ts(self):

<clip>
if self.conf.ignorearch:
self._rpm_probfilter.add(rpm.RPMPROB_FILTER_IGNOREARCH)

But when doing a dnf install with ignorearch=True and an rpm of a different architecture, this code is never called and the flag is never set. It queries the database and fails saying the architecture is incompatible. This looks like a dnf issue. The only dnf bug reporting database is for Red Hat. Not sure where I should file this bug because I'm not using RH and it sounds like the feature is being used successfully in that distro.

Thanks,
Jon

#1 lore raw

You should still file it with red hat bugzilla, but a way to reproduce on Fedora will certainly help. Better yet, keep digging and get to the point where you have a patch.

Alex

Quoted 29 lines · Jonathan Richardson via lists.yoctoproject.org

Hi,

I tried adding ignorearch=True to dnf.conf but it doesn't work in a recent yocto using dnf 4.5.2. I have a driver built with different machine types but they are functionally identical. I see that dnf uses 'rpm'. rpm --ignorearch does work. I debugged dnf and see that when dnf installs an rpm of the same architecture it sets the IGNOREARCH flag which is used by 'rpm'.

@property

    def _ts(self):

<clip>
if self.conf.ignorearch:
self._rpm_probfilter.add(rpm.RPMPROB_FILTER_IGNOREARCH)

But when doing a dnf install with ignorearch=True and an rpm of a different architecture, this code is never called and the flag is never set. It queries the database and fails saying the architecture is incompatible. This looks like a dnf issue. The only dnf bug reporting database is for Red Hat. Not sure where I should file this bug because I'm not using RH and it sounds like the feature is being used successfully in that distro.

Thanks,
Jon