Some packages that I can't update

Since a few updates ago, there are some packages that I can’t update. When I try, I get the following:

Preparando...
Sincronización de bases de datos de paquetes...
Comprobando python2-lxml dependencias...
Comprobando python2-cffi dependencias...
Clonando python2-pycparser archivos de compilación...
Generando python2-pycparser información...
Comprobando python2-pycparser dependencias...
Resolviendo dependencias...
comprobando conflictos internos...

Construyendo python2-pycparser...
==> Creando el paquete: python2-pycparser 2.21-1 (mié 16 feb 2022 20:09:42)
==> Comprobando dependencias mientras se ejecuta...
==> Comprobando dependencias mientras se compila...
==> Recibiendo las fuentes...
  -> python2-pycparser-2.21.tar.gz ha sido encontrado
==> Validando los archivos source con sha512sums...
    python2-pycparser-2.21.tar.gz ... Aprobado
==> Eliminando el directorio $srcdir/...
==> Extrayendo las fuentes...
  -> Extrayendo python2-pycparser-2.21.tar.gz con bsdtar
==> Eliminando el directorio $pkgdir/...
==> Iniciando build()...
running build
running build_py
creating build
creating build/lib
creating build/lib/pycparser
copying pycparser/_build_tables.py -> build/lib/pycparser
copying pycparser/c_lexer.py -> build/lib/pycparser
copying pycparser/_ast_gen.py -> build/lib/pycparser
copying pycparser/__init__.py -> build/lib/pycparser
copying pycparser/plyparser.py -> build/lib/pycparser
copying pycparser/ast_transforms.py -> build/lib/pycparser
copying pycparser/c_generator.py -> build/lib/pycparser
copying pycparser/c_ast.py -> build/lib/pycparser
copying pycparser/c_parser.py -> build/lib/pycparser
creating build/lib/pycparser/ply
copying pycparser/ply/ygen.py -> build/lib/pycparser/ply
copying pycparser/ply/lex.py -> build/lib/pycparser/ply
copying pycparser/ply/yacc.py -> build/lib/pycparser/ply
copying pycparser/ply/__init__.py -> build/lib/pycparser/ply
copying pycparser/ply/cpp.py -> build/lib/pycparser/ply
copying pycparser/ply/ctokens.py -> build/lib/pycparser/ply
copying pycparser/_c_ast.cfg -> build/lib/pycparser
==> Iniciando check()...
Generating LALR tables
WARNING: 79 shift/reduce conflicts
WARNING: 37 reduce/reduce conflicts
WARNING: reduce/reduce conflict in state 27 resolved using rule (type_specifier -> atomic_specifier)
WARNING: rejected rule (empty -> <empty>) in state 27
WARNING: reduce/reduce conflict in state 87 resolved using rule (type_specifier -> atomic_specifier)
WARNING: rejected rule (empty -> <empty>) in state 87
WARNING: reduce/reduce conflict in state 437 resolved using rule (statement -> pppragma_directive)
WARNING: rejected rule (empty -> <empty>) in state 437
F.................................................................................................................................
======================================================================
FAIL: test_all_examples (tests.test_examples.TestExamplesSucceed)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/pamac-build-fran/python2-pycparser/src/pycparser-release_v2.21/tests/test_examples.py", line 29, in test_all_examples
    rc, 0, 'example "{}" failed with stdout =\n{}'.format(filename, stdout))
AssertionError: example "func_defs_add_param.py" failed with stdout =
AST before change:
  FileAST: 
    FuncDef: 
      Decl: foo, [], [], []
        FuncDecl: 
          ParamList: 
            Decl: a, [], [], []
              TypeDecl: a, []
                IdentifierType: ['int']
            Decl: b, [], [], []
              TypeDecl: b, []
                IdentifierType: ['int']
          TypeDecl: foo, []
            IdentifierType: ['void']
      Compound: 
    FuncDef: 
      Decl: bar, [], [], []
        FuncDecl: 
          TypeDecl: bar, []
            IdentifierType: ['void']
      Compound: 


----------------------------------------------------------------------
Ran 130 tests in 1.402s

FAILED (failures=1)
==> ERROR: Se produjo un fallo en check().
    Cancelando...

:arrow_down:

python2 is already end-of-life now. Every package depending on python2 can be removed.

1 Like

So, can I remove them, or do I have to rebuild them?

If rebuilding solves the problem then why remove. If it doesn’t → remove.

When I run pacman -Qoq /usr/lib/python3.9
I get
error: No package contains /usr/lib/python3.9

Actually these packages are not 3.9, so that’s why I’m confused.

That is for python3 packages that need to be rebuilded,

About your python2 packages, remove what you don’t need, and please check AURweb page

https://aur.archlinux.org/packages/python2-pycparser#comment-845512

If building the package fails for you, either build in a clean chroot or disable the tests, but at your own risk that the functionality will be faulty.

For building with makepkg and skipping check

makepkg --nocheck

Thanks for your help :slightly_smiling_face:

I have been reading the solutions given in

https://aur.archlinux.org/packages/python2-pycparser#comment-845512

and the simplest one seems to be this one:

sudo fakepkg python2-pycparser (to have the package if new build still fails)
sudo pacman -Rdd python2-pycparser
yay -S python2-pycparser

The problem is that I don’t use yay, so my question is if I can change it to:

sudo fakepkg python2-pycparser (to have the package if new build still fails)
sudo pacman -Rdd python2-pycparser
sudo pamac build python2-pycparser

Is this okay?

Perhaps because Python 2 is a long way past EOL and does not get security updates?

@Franilustrador :
Would it be best to find out first what apps you have that depend on Python2?
When they have been upgraded, they should be using Python3.

Also, Arch/Manjaro is not guaranteed to be upgradable after a long break.
Maybe it will be easier to start again with a fresh install.

Yes, it does the same thing.
But no, don’t use sudo with pamac.
If it doesn’t work, it won’t do any permanent damage –
it only builds a package, and if it’s no good, either it won’t install or you can uninstall it.

[Disclaimer: I think these statements are true, but am not absolutely certain; use with care. :wink: ]

Well, this is what I’ve done, and so far there don’t seem to be any more problems. I have been able to update the other two packages, although I still need to investigate which application needs so manypython 2 packages. Actually, I think Displaycal only uses python 2, and I tried uninstalling it, although I don’t know what else to do or how to act to get rid of all the python 2 packages from AUR.

sudo pacman -Rdd python2-pycparser
sudo pamac build python2-pycparser

After refreshing my memory with (pacman - ArchWiki) I tried :
‘pacman -Qd | grep python2’
‘pacman -Qe | grep python2’
‘pacman -Qs python2’

I think these show everything that is installed related to python2.
Try them and see what you get …

This is what I got :

$ pacman -Qd | grep python2
python2 2.7.18-5
python2-gobject 3.36.1-4

$ pacman -Qe | grep python2
[nothing]

$ pacman -Qd | grep gobject
gobject-introspection-runtime 1.70.0-5
python-gobject 3.42.0-3

There was nothing depending on ‘python2-gobject’,
so I removed it recursively :

$ sudo pacman -Rsu python2-gobject
checking dependencies...
Packages (2) python2-2.7.18-5  python2-gobject-3.36.1-4
Total Removed Size:  78.04 MiB
:: Do you want to remove these packages? [Y/n] y
...

The fact that it offered to remove python2 as well meant
that there was nothing else depending on python2, so I hit ‘y’.

Now my machine is free of ancient python2,
which should have died 10 years ago. :wink:

@Franilustrador :
Have you successfully updated everything else on your system?
If so, then persist with weeding out python2.

If not, then consider doing a fresh install, as the Arch/Manjaro rolling release system can get into a state that is not automatically upgradable if you leave it for too long between upgrades. You might succed with python2, then find that other things will not upgrade.