Bug 1576921 - RFE: dnf does not "remember" --forcearch=
Summary: RFE: dnf does not "remember" --forcearch=
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 28
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-10 17:51 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2018-06-28 08:13 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-28 08:13:01 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Zbigniew Jędrzejewski-Szmek 2018-05-10 17:51:48 UTC
Description of problem:
I used dnf --forcearch=i686 to install a 32-bit container into a directory:

sudo dnf -y --releasever=28 --installroot=/var/lib/machines/f28-32 \    
     --disablerepo='*' --enablerepo=fedora --enablerepo=updates install \
     systemd passwd dnf fedora-release vim-minimal --forcearch=i686

This works great, but then when I run dnf operations *inside* the
container, it always wants to install their amd64 versions:

[root@f28-32 ~]# dnf install htop
Last metadata expiration check: 0:20:05 ago on Thu May 10 19:29:11 2018.
Dependencies resolved.
================================================================================
 Package            Arch         Version                     Repository    Size
================================================================================
Installing:
 htop               x86_64       2.1.0-1.fc28                fedora       108 k
Installing dependencies:
 glibc              x86_64       2.27-8.fc28                 fedora       3.6 M
 ncurses-libs       x86_64       6.1-4.20180224.fc28         fedora       334 k

It would be great if dnf would somehow store the information that in made the
initial creation of this installroot with --forcearch, so that dnf running
inside that installroot would default to the right architecture.

Version-Release number of selected component (if applicable):
dnf-2.7.5-8.fc28.noarch (outside)
dnf-2.7.5-12.fc28.noarch (inside)

Comment 1 Jaroslav Mracek 2018-05-15 14:01:38 UTC
I created a patch that enhance a documentation https://github.com/rpm-software-management/dnf/pull/1089

Comment 2 Zbigniew Jędrzejewski-Szmek 2018-05-15 20:03:49 UTC
Thanks, that explains that I'm missing an 'arch' setting.

Do you think it would be possible for dnf to add 'arch' automatically to /etc/dnf/dnf.conf?

Comment 3 Jaroslav Mracek 2018-05-16 07:35:52 UTC
If you will add into dnf.conf

arch=i686 
ignorearch-True

it will work like you expect. DNF cannot do it automatically.

Comment 4 Jaroslav Mracek 2018-06-28 08:13:01 UTC
The issue is solved by dnf-3.0.1-1 that was released into rawhide.


Note You need to log in before you can comment on or make changes to this bug.