yum broken

I need a working yum installation for a lxc deployment script to work. However it seems that it is currently totally broken:

~/Downloads] λ yum --version
3.4.3
Traceback (most recent call last):
File “/usr/bin/yum”, line 29, in <module>
yummain.user_main(sys.argv[1:], exit_code=True)
File “/usr/share/yum-cli/yummain.py”, line 288, in user_main
errcode = main(args)
File “/usr/share/yum-cli/yummain.py”, line 98, in main
base.getOptionsConfig(args)
File “/usr/share/yum-cli/cli.py”, line 280, in getOptionsConfig
for pkg in sorted(self.rpmdb.returnPackages(patterns=yum_progs)):
File “/usr/lib64/python2.7/site-packages/yum/rpmsack.py”, line 593, in returnPackages
pkgs = self.searchNames([pat])
File “/usr/lib64/python2.7/site-packages/yum/rpmsack.py”, line 1180, in searchNames
returnList.extend(self._search(name=name))
File “/usr/lib64/python2.7/site-packages/yum/rpmsack.py”, line 1246, in _search
po = self._makePackageObject(hdr, idx)
File “/usr/lib64/python2.7/site-packages/yum/rpmsack.py”, line 1266, in _makePackageObject
po = RPMInstalledPackage(hdr, index, self)
File “/usr/lib64/python2.7/site-packages/yum/rpmsack.py”, line 64, in init
YumInstalledPackage.init(self, rpmhdr, yumdb=rpmdb.yumdb)
File “/usr/lib64/python2.7/site-packages/yum/packages.py”, line 1828, in init
self.yumdb_info = yumdb.get_package(self)
File “/usr/lib64/python2.7/site-packages/yum/rpmsack.py”, line 1605, in get_package
yumdb_cache=self.yumdb_cache)
AttributeError: ‘RPMDBAdditionalData’ object has no attribute ‘yumdb_cache’

On Mon, 06 Jul 2015 15:16:01 +0000, gargamel98 wrote:

> I need a working yum installation for a lxc deployment script to work.
> However it seems that it is currently totally broken:

Don’t use Yum with openSUSE. Use Zypper.

Jim


Jim Henderson
openSUSE Forums Administrator
Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

mnemosyne:~ # yum --version
3.4.3
  Installed: rpm-4.12.0.1-5.15.x86_64 at 2015-07-02 15:49
  Built    : http://bugs.opensuse.org at 2015-06-25 10:51
  Committed: coolo@suse.com at 2015-02-27


  Installed: yum-3.4.3-17.3.x86_64 at 2015-07-06 15:25
  Built    : http://bugs.opensuse.org at 2015-06-19 18:16
  Committed: p.drouand@gmail.com at 2014-10-19

mnemosyne:~ # cat /etc/os-release 
NAME=openSUSE
VERSION="20150702 (Tumbleweed)"
VERSION_ID="20150702"
PRETTY_NAME="openSUSE 20150702 (Tumbleweed) (x86_64)"
ID=opensuse
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:opensuse:20150702"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://opensuse.org/"
ID_LIKE="suse"

Edit:
I don’t use yum but have you tried cleaning the yumdb in /var/lib/yum/yumdb/ ?

I would use zypper but the script relies on yum.

I apparently do not have the folder… This might explain something…


mnemosyne:/var/lib/yum # ll
total 8
-rw-r--r-- 1 root root   36 Jul  6 18:26 uuid
drwxr-xr-x 2 root root 4096 Jul  6 18:26 yumdb