Não é possível instalar pacotes usando o dnf no Fedora 22 na plataforma ARM

3

Instalei o Fedora 22 (usando rootfs) em um dispositivo Android 5.0 com processador ARMv7 usando o aplicativo GNURoot. Isso está funcionando bem. Todos os comandos no rootfs executam OK. No entanto, tenho um problema com o dnf.

Os comandos

dnf clean all e dnf update funcionam bem. Se eu executar dnf search <package name> , tudo funciona bem. Eu obtenho os resultados corretos da pesquisa. Se eu executar dnf info <package name> , tudo funciona bem. No entanto, quando executo dnf install <package name> , recebo um erro da seguinte forma:

Last metadata expiration check performed 1:52:54 ago on Sat Dec 26 11:05:25 2015.
No package <package name> available.
Error: Unable to find a match.

Eu recebo este erro para cada pacote, mesmo que esse pacote esteja disponível no resultado da pesquisa dnf.

Um exemplo:

> less
bash: less: command not found

> dnf search less
Last metadata expiration check performed 1:44:08 ago on Sat Dec 26 11:05:25 2015.
================== N/S Matched: less ===================
less.armv7hl : A text file browser similar to more, but
             : better
bless-doc.armv7hl : Bless user manual
python-lesscpy.noarch : Lesscss compiler
python3-lesscpy.noarch : Lesscss compiler
..
..
..

> dnf info less
Last metadata expiration check performed 1:44:58 ago on Sat Dec 26 11:05:25 2015.
Available Packages
Name        : less
Arch        : armv7hl
Epoch       : 0
Version     : 481
Release     : 1.fc22
Size        : 143 k
Repo        : updates
Summary     : A text file browser similar to more, but
            : better
URL         : http://www.greenwoodsoftware.com/less/
License     : GPLv3+ or BSD
Description : The less utility is a text file browser
            : that resembles more, but has more
            : capabilities.  Less allows you to move
            : backwards in the file as well as forwards.
            :  Since less doesn't have to read the
            : entire input file before it starts, less
            : starts up more quickly than text editors
            : (for example, vi).
            :
            : You should install less because it is a
            : basic utility for viewing text files, and
            : you'll use it frequently.

> dnf install less
Last metadata expiration check performed 1:50:23 ago on Sat Dec 26 11:05:25 2015.
No package less available.
Error: Unable to find a match.

> dnf install less.armv7hl
Last metadata expiration check performed 1:52:54 ago on Sat Dec 26 11:05:25 2015.
No package less.armv7hl available.
Error: Unable to find a match.

> dnf install less.armv7hl -v                           
cachedir: /var/cache/dnf
Loaded plugins: migrate
DNF version: 1.1.4
repo: using cache for: fedora
not found deltainfo for: Fedora 22 - armhfp
not found updateinfo for: Fedora 22 - armhfp
repo: using cache for: updates
fedora: using metadata from Sat May 23 09:54:23 2015.
updates: using metadata from Tue Dec 22 00:53:59 2015.
Last metadata expiration check performed 3:51:50 ago on Sat Dec 26 11:05:25 2015.
No package less.armv7hl available.
Error: Unable to find a match.

> dnf search less.armv7hl
Last metadata expiration check performed 0:18:04 ago on Sat Dec 26 15:27:49 2015.
Error: No matches found.

Como posso resolver esse erro?

Agradecemos antecipadamente por sua ajuda.

    
por geekowl 26.12.2015 / 19:37

1 resposta

3

Abra este arquivo no seu braço chroot:

 /usr/lib/python3.5/site-packages/dnf/conf/substitutions.py

E altere a função __init__ conforme abaixo (efetivamente, codifique os nomes dos arquivos em execução):

def __init__(self):
    super(Substitutions, self).__init__()
    arch = hawkey.detect_arch()
    self['arch'] = arch
    self['arch'] = 'armv7hl'
    self['basearch'] = dnf.rpm.basearch(arch)
    self['basearch'] = 'armhfp'
    self._update_from_env()

(A única mudança é adicionar essas duas linhas:

    self['arch'] = 'armv7hl'
    self['basearch'] = 'armhfp'

    
por 20.07.2016 / 14:41