Open ackalker opened 4 years ago
Running xbps-alternatives -l
after the above leads to another assertion:
$ xbps-alternatives -l
awk
- gawk (current)
- awk:/usr/bin/gawk
- awk.1:/usr/share/man/man1/gawk.1
babel
- python3-Babel (current)
- pybabel:/usr/bin/pybabel3
bc
- bc (current)
- bc:/usr/bin/gnu-bc
- bc.1:/usr/share/man/man1/gnu-bc.1
chardet
- python-chardet (current)
- chardetect:/usr/bin/chardetect2
- python3-chardet
- chardetect:/usr/bin/chardetect3
coverage
- python-coverage (current)
- coverage:/usr/bin/coverage2
crond
- dcron (current)
- crond:/etc/sv/dcron
- crond:/usr/bin/dcrond
- crontab:/usr/bin/dcrontab
- crontab.1:/usr/share/man/man1/dcrontab.1
- crond.8:/usr/share/man/man8/dcrond.8
cython
- python3-Cython (current)
- cygdb:/usr/bin/cygdb3
- cython:/usr/bin/cython3
- cythonize:/usr/bin/cythonize3
dc
- bc (current)
- dc:/usr/bin/gnu-dc
- dc.1:/usr/share/man/man1/gnu-dc.1
docutils
- python3-docutils (current)
- rst2html:/usr/bin/rst2html.py3
- rst2html4:/usr/bin/rst2html4.py3
- rst2html5:/usr/bin/rst2html5.py3
- rst2latex:/usr/bin/rst2latex.py3
- rst2man:/usr/bin/rst2man.py3
- rst2odt:/usr/bin/rst2odt.py3
- rst2odt_prepstyles:/usr/bin/rst2odt_prepstyles.py3
- rst2pseudoxml:/usr/bin/rst2pseudoxml.py3
- rst2s5:/usr/bin/rst2s5.py3
- rst2xetex:/usr/bin/rst2xetex.py3
- rst2xml:/usr/bin/rst2xml.py3
- rstpep2html:/usr/bin/rstpep2html.py3
find
- findutils (current)
- find:/usr/bin/gfind
- find.1:/usr/share/man/man1/gfind.1
gntp
- python-gntp (current)
- gntp:/usr/bin/gntp2
hostname
- coreutils (current)
- hostname:/usr/bin/hostname-coreutils
- hostname.1:/usr/share/man/man1/hostname-coreutils.1
- net-tools
- hostname:/usr/bin/net-tools-hostname
- /usr/share/man/man1/hostname.1:/usr/share/man/man8/net-tools-hostname.1
ifconfig
- net-tools (current)
- ifconfig:/usr/bin/net-tools-ifconfig
- /usr/share/man/man1/ifconfig.1:/usr/share/man/man8/net-tools-ifconfig.8
iptables
- iptables (current)
- ip6tables:/usr/bin/xtables-legacy-multi
- ip6tables-restore:/usr/bin/xtables-legacy-multi
- ip6tables-save:/usr/bin/xtables-legacy-multi
- iptables:/usr/bin/xtables-legacy-multi
- iptables-restore:/usr/bin/xtables-legacy-multi
- iptables-save:/usr/bin/xtables-legacy-multi
java
- openjdk8 (current)
- /usr/bin/java:/usr/lib/jvm/java-1.8-openjdk/bin/java
- /usr/bin/jjs:/usr/lib/jvm/java-1.8-openjdk/bin/jjs
- /usr/bin/keytool:/usr/lib/jvm/java-1.8-openjdk/bin/keytool
- /usr/bin/orbd:/usr/lib/jvm/java-1.8-openjdk/bin/orbd
- /usr/bin/pack200:/usr/lib/jvm/java-1.8-openjdk/bin/pack200
- /usr/bin/policytool:/usr/lib/jvm/java-1.8-openjdk/bin/policytool
- /usr/bin/rmid:/usr/lib/jvm/java-1.8-openjdk/bin/rmid
- /usr/bin/rmiregistry:/usr/lib/jvm/java-1.8-openjdk/bin/rmiregistry
- /usr/bin/servertool:/usr/lib/jvm/java-1.8-openjdk/bin/servertool
- /usr/bin/tnameserv:/usr/lib/jvm/java-1.8-openjdk/bin/tnameserv
- /usr/bin/unpack200:/usr/lib/jvm/java-1.8-openjdk/bin/unpack200
- openjdk8-jre
- /usr/bin/java:/usr/lib/jvm/java-1.8-openjdk/jre/bin/java
- /usr/bin/jjs:/usr/lib/jvm/java-1.8-openjdk/jre/bin/jjs
- /usr/bin/keytool:/usr/lib/jvm/java-1.8-openjdk/jre/bin/keytool
- /usr/bin/orbd:/usr/lib/jvm/java-1.8-openjdk/jre/bin/orbd
- /usr/bin/pack200:/usr/lib/jvm/java-1.8-openjdk/jre/bin/pack200
- /usr/bin/policytool:/usr/lib/jvm/java-1.8-openjdk/jre/bin/policytool
- /usr/bin/rmid:/usr/lib/jvm/java-1.8-openjdk/jre/bin/rmid
- /usr/bin/rmiregistry:/usr/lib/jvm/java-1.8-openjdk/jre/bin/rmiregistry
- /usr/bin/servertool:/usr/lib/jvm/java-1.8-openjdk/jre/bin/servertool
- /usr/bin/tnameserv:/usr/lib/jvm/java-1.8-openjdk/jre/bin/tnameserv
- /usr/bin/unpack200:/usr/lib/jvm/java-1.8-openjdk/jre/bin/unpack200
jdk
- openjdk8 (current)
- /usr/bin/appletviewer:/usr/lib/jvm/java-1.8-openjdk/bin/appletviewer
- /usr/bin/extcheck:/usr/lib/jvm/java-1.8-openjdk/bin/extcheck
- /usr/bin/idlj:/usr/lib/jvm/java-1.8-openjdk/bin/idlj
- /usr/bin/jar:/usr/lib/jvm/java-1.8-openjdk/bin/jar
- /usr/bin/jarsigner:/usr/lib/jvm/java-1.8-openjdk/bin/jarsigner
- /usr/bin/java:/usr/lib/jvm/java-1.8-openjdk/bin/java
- /usr/bin/java-rmi.cgi:/usr/lib/jvm/java-1.8-openjdk/bin/java-rmi.cgi
- /usr/bin/javac:/usr/lib/jvm/java-1.8-openjdk/bin/javac
- /usr/bin/javadoc:/usr/lib/jvm/java-1.8-openjdk/bin/javadoc
- /usr/bin/javah:/usr/lib/jvm/java-1.8-openjdk/bin/javah
- /usr/bin/javap:/usr/lib/jvm/java-1.8-openjdk/bin/javap
- /usr/bin/jcmd:/usr/lib/jvm/java-1.8-openjdk/bin/jcmd
- /usr/bin/jconsole:/usr/lib/jvm/java-1.8-openjdk/bin/jconsole
- /usr/bin/jdb:/usr/lib/jvm/java-1.8-openjdk/bin/jdb
- /usr/bin/jdeps:/usr/lib/jvm/java-1.8-openjdk/bin/jdeps
- /usr/bin/jhat:/usr/lib/jvm/java-1.8-openjdk/bin/jhat
- /usr/bin/jinfo:/usr/lib/jvm/java-1.8-openjdk/bin/jinfo
- /usr/bin/jjs:/usr/lib/jvm/java-1.8-openjdk/bin/jjs
- /usr/bin/jmap:/usr/lib/jvm/java-1.8-openjdk/bin/jmap
- /usr/bin/jps:/usr/lib/jvm/java-1.8-openjdk/bin/jps
- /usr/bin/jrunscript:/usr/lib/jvm/java-1.8-openjdk/bin/jrunscript
- /usr/bin/jsadebugd:/usr/lib/jvm/java-1.8-openjdk/bin/jsadebugd
- /usr/bin/jstack:/usr/lib/jvm/java-1.8-openjdk/bin/jstack
- /usr/bin/jstat:/usr/lib/jvm/java-1.8-openjdk/bin/jstat
- /usr/bin/jstatd:/usr/lib/jvm/java-1.8-openjdk/bin/jstatd
- /usr/bin/keytool:/usr/lib/jvm/java-1.8-openjdk/bin/keytool
- /usr/bin/native2ascii:/usr/lib/jvm/java-1.8-openjdk/bin/native2ascii
- /usr/bin/orbd:/usr/lib/jvm/java-1.8-openjdk/bin/orbd
- /usr/bin/pack200:/usr/lib/jvm/java-1.8-openjdk/bin/pack200
- /usr/bin/policytool:/usr/lib/jvm/java-1.8-openjdk/bin/policytool
- /usr/bin/rmic:/usr/lib/jvm/java-1.8-openjdk/bin/rmic
- /usr/bin/rmid:/usr/lib/jvm/java-1.8-openjdk/bin/rmid
- /usr/bin/rmiregistry:/usr/lib/jvm/java-1.8-openjdk/bin/rmiregistry
- /usr/bin/schemagen:/usr/lib/jvm/java-1.8-openjdk/bin/schemagen
- /usr/bin/serialver:/usr/lib/jvm/java-1.8-openjdk/bin/serialver
- /usr/bin/servertool:/usr/lib/jvm/java-1.8-openjdk/bin/servertool
- /usr/bin/tnameserv:/usr/lib/jvm/java-1.8-openjdk/bin/tnameserv
- /usr/bin/unpack200:/usr/lib/jvm/java-1.8-openjdk/bin/unpack200
- /usr/bin/wsgen:/usr/lib/jvm/java-1.8-openjdk/bin/wsgen
- /usr/bin/wsimport:/usr/lib/jvm/java-1.8-openjdk/bin/wsimport
- /usr/bin/xjc:/usr/lib/jvm/java-1.8-openjdk/bin/xjc
locate
- findutils (current)
logger
- util-linux (current)
- logger:/usr/bin/util-linux-logger
- logger.1:/usr/share/man/man1/util-linux-logger.1
lua
- lua52 (current)
- lua:/usr/bin/lua5.2
- luac:/usr/bin/luac5.2
- lua.1:/usr/share/man/man1/lua5.2.1
- luac.1:/usr/share/man/man1/luac5.2.1
- lua:/usr/share/doc/lua5.2
- lua51
- lua:/usr/bin/lua5.1
- luac:/usr/bin/luac5.1
- lua.1:/usr/share/man/man1/lua5.1.1
- luac.1:/usr/share/man/man1/luac5.1.1
- lua:/usr/share/doc/lua5.1
- lua53
- lua:/usr/bin/lua5.3
- luac:/usr/bin/luac5.3
- lua.1:/usr/share/man/man1/lua5.3.1
- luac.1:/usr/share/man/man1/luac5.3.1
- lua:/usr/share/doc/lua5.3
mail
- mailx (current)
- mail.rc:/etc/mailx.rc
- mail:/usr/bin/mailx
- mail.1:/usr/share/man/man1/mailx.1
man
- mdocml (current)
- man:/usr/bin/mandoc
- whatis:/usr/bin/mandoc
- apropos:/usr/bin/mandoc
- man.1:/usr/share/man/man1/mandoc-man.1
- whatis.1:/usr/share/man/man1/mandoc-whatis.1
- apropos.1:/usr/share/man/man1/mandoc-apropos.1
markdown
- python-Markdown (current)
- markdown_py:/usr/bin/markdown_py2
mkpasswd
- expect (current)
- mkpasswd:/usr/bin/expect-mkpasswd
- mkpasswd.1:/usr/share/man/man1/expect-mkpasswd.1
nc
- netcat (current)
- nc:/usr/bin/gnetcat
- nc.1:/usr/share/man/man1/gnetcat.1
- openbsd-netcat
- nc:/usr/bin/openbsd-nc
- nc.1:/usr/share/man/man1/openbsd-nc.1
- nmap
- nc:/usr/bin/ncat
- nc.1:/usr/share/man/man1/ncat.1
ntpd
- chrony (current)
- ntpd:/usr/bin/chronyd
- ntpd.8:/usr/share/man/man8/chronyd.8
- ntpd:/etc/sv/chronyd
numpy
- python-numpy (current)
- f2py:/usr/bin/f2py2
- python3-numpy
- f2py:/usr/bin/f2py3
pinentry
- pinentry (current)
- pinentry:/usr/bin/pinentry-curses
- pinentry-gtk
- pinentry:/usr/bin/pinentry-gtk-2
ping
- iputils (current)
- ping:/usr/bin/iputils-ping
- ping.8:/usr/share/man/man8/iputils-ping.8
ping6
- iputils (current)
- ping6:/usr/bin/iputils-ping
- ping6.8:/usr/share/man/man8/iputils-ping.8
pip
- python3-pip (current)
- pip:/usr/bin/pip3
- python-pip
- pip:/usr/bin/pip2
pkg-config
- pkg-config (current)
- pkg-config:/usr/bin/pkg-config.pkg-config
- pkg-config.1:/usr/share/man/man1/pkg-config.1.pkg-config
- pkg.m4:/usr/share/aclocal/pkg.m4.pkg-config
- pkgconf
- pkg-config:/usr/bin/pkgconf
- pkg-config.1:/usr/share/man/man1/pkgconf.1
- pkg.m4:/usr/share/aclocal/pkg.m4.pkgconf
pygments
- python3-Pygments (current)
- pygmentize:/usr/bin/pygmentize3
pyqt4
- python3-PyQt4 (current)
- pyuic4:/usr/bin/python3-pyuic4
- python-PyQt4
xbps-alternatives: main.c:152: list_alternatives: Assertion `pkgd' failed.
Aborted
Running xbps-pkdb -a
results in:
# xbps-pkgdb -a
ConsoleKit2: cannot read /var/db/xbps/.ConsoleKit2-files.plist, ignoring...
conkeror: cannot read /var/db/xbps/.conkeror-files.plist, ignoring...
cgmanager: cannot read /var/db/xbps/.cgmanager-files.plist, ignoring...
chirp-daily: cannot read /var/db/xbps/.chirp-daily-files.plist, ignoring...
advancescan: cannot read /var/db/xbps/.advancescan-files.plist, ignoring...
archivemount: cannot read /var/db/xbps/.archivemount-files.plist, ignoring...
libcgmanager: cannot read /var/db/xbps/.libcgmanager-files.plist, ignoring...
libnih: cannot read /var/db/xbps/.libnih-files.plist, ignoring...
libprotobuf-lite18: cannot read /var/db/xbps/.libprotobuf-lite18-files.plist, ignoring...
libtk-img: cannot read /var/db/xbps/.libtk-img-files.plist, ignoring...
libxml2-python: cannot read /var/db/xbps/.libxml2-python-files.plist, ignoring...
lunzip: cannot read /var/db/xbps/.lunzip-files.plist, ignoring...
php-zmq: cannot read /var/db/xbps/.php-zmq-files.plist, ignoring...
pm-utils: cannot read /var/db/xbps/.pm-utils-files.plist, ignoring...
python-gobject2: cannot read /var/db/xbps/.python-gobject2-files.plist, ignoring...
pygtk: cannot read /var/db/xbps/.pygtk-files.plist, ignoring...
python-websockify: cannot read /var/db/xbps/.python-websockify-files.plist, ignoring...
python-pyserial: cannot read /var/db/xbps/.python-pyserial-files.plist, ignoring...
python-crypto: cannot read /var/db/xbps/.python-crypto-files.plist, ignoring...
ERROR: python3-PyQt4: alternatives group pyqt4 symlink /usr/bin/pyuic4: No such file or directory
zeromq: cannot read /var/db/xbps/.zeromq-files.plist, ignoring...
xbps-pkgdb -a
doesn't appear to fix these problems; running it a second time results in identical output.
Removing 'pyqt4' alternatives group symlink: pyuic4
python3-PyQt4-4.12.1_3: unregistered 'pyqt4' alternatives group
xbps-remove: package_alternatives.c:319: switch_alt_group: Assertion `curpkgd' failed.
Aborted
It either erroneously called switch_alt_group
or that function should know how to deal with cases like this. I will try to reproduce this one.
I believe (but you're better off waiting for someone who understand XBPS better) you might be able to finish uninstalling these packages if you force reinstall them (assuming they are still in your cache), then remove them again. But perhaps leave the PyQt4 package alone. Also, you should probably make a copy of your database if you decide to mess with this stuff, it's in /var/db/xbps/pkgdb*
.
Thanks for your suggestions.
I have forcibly reinstalled python3-PyQt4
from my cache using xdowngrade
from the xtools
package (without doing this I couldn't install anything anyway, as xbps-install
would complain about python3-PyQt4
package being broken), and successfully uninstalled all other packages in my original list except for this one.
Sadly the problem persists, trying to uninstall python3-PyQt4
produces the same error. At least xbps-pkgdb -a
now no longer complains about files for the other packages.
Could you share your pkgdb? I believe it would help with diagnosing your issue.
@ericonr I'm sorry for the very long delay answering your question.
I'm still experiencing problems with xbps-alternatives -l
erroring out.
I have created a repository on Github with the contents of my /var/db/xbps
directory as of today, I hope this can be of some use.
From some digging in the XBPS source (sadly I've lost my notes about it), I have a hunch that the problem is somehow related to a situation where the _XBPS_ALTERNATIVES_
key/dict is left with references to non-existent packages. I think this can happen when:
alternatives
As a kludge, any of following works:
cd $(mktemp -d) && xbps-create -n python-PyQt4-1_1 -s pyqt4 -A noarch . && xbps-rindex -a *.xbps && xbps-install python-PyQt4 -R . && xbps-remove python3-PyQt4 && xbps-remove python-PyQt4
_XBPS_ALTERNATIVES_
, then remove python3-PyQt4Proper fix is unlikely to appear soon.
I can confirm the second approach worked. I removed both the key and dict for pyqt4 and xbps tools started working again.
Problem occurs in following way:
_XBPS_ALTERNATIVES_
in pkgdb lists packages it shoudn't.Draft of crash fix is sent in #457.
On Void Linux x86_64 (GLibc), xbps-0.59.1_2, today I hit this assertion when trying to uninstall some packages which are no longer in the repo.
Captured output of what I did:
Hopefully I'll be able to provide more info on request.