Tumbleweed waiting for shared lock on /var/lib/rpm/Packages

When I start Tumbleweed the first thing I do is zypper dup. However each time I get the following message:

**linux-top:~ #** zypper dup
Warning: You are about to do a distribution upgrade with all enabled repositories. Make su
re these repositories are compatible before you continue. See 'man zypper' for more inform
ation about this command.
warning: waiting for shared lock on /var/lib/rpm/Packages
error: cannot get shared lock on /var/lib/rpm/Packages
error: cannot open Packages index using db4 - Operation not permitted (1)
error: cannot open Packages database in /var/lib/rpm
Target initialization failed:
Rpm Exception
**linux-top:**

I presume after loging in the computer looks for updates because the first thing I get is the computer asking for the root password. I normally cancel out as I those updates would come from the normal updater and would be the equivalent of ‘zypper up’. If I wait for approx 10 minutes the command zypper dup works as it should. I would like to disable this automatic updates here and I have already unchecked the system update box in the system tray. Where can I disable this automatic update function?
Cheers
uli

I haven’t seen that message.

I do sometimes see a message about locks, but I seem to recall that it mentions “packagekit”.

I don’t see this when I login to KDE Plasma, presumably because I have disabled the tray updater. But if I login to Gnome, I sometime see this. I have disabled whatever I can find about updates with Gnome, but apparently something still checks.

On the positive side, when whatever updater has finished and I can use “zypper”, it doesn’t have to refresh because the updater already did that.

You could try uninstalling “packagekit”. You might have to then lock it so that it isn’t automatically installed on the next update.

I had deleted packagekit previously for that reason but it is there again. I have done it again and if everything is OK I will taboo it next time and report back. It might be a while though.
Thanks nrickert

Not a Gnome user, but this perhaps?

gsettings set org.gnome.software download-updates false

https://lists.opensuse.org/opensuse-factory//2016-04/msg00280.html

Please show content of /var/lib/rpm (ls -la /var/lib/rpm/)

Just for the record I am using KDE. And, arvidjaar, here is the listing - just a link.

 ls -la /var/lib/rpm
lrwxrwxrwx 1 root root 26 Mar  7 22:32 /var/lib/rpm -> **../../usr/lib/sysimage/rpm**

In case you want the other list:

ls -la /usr/lib/sysimage/rpm
total 468784
drwxr-xr-x 2 root root      4096 Mar  7 22:32 **.**
drwxr-xr-x 3 root root      4096 Mar  7 22:32 **..**
-rw-r--r-- 1 root root  31301632 Mar 11 17:03 Basenames
-rw-r--r-- 1 root root     32768 Mar 11 17:03 Conflictname
-rw-r--r-- 1 root root  41672704 Mar 11 17:03 Dirnames
-rw-r--r-- 1 root root      8192 Mar 11 16:02 Enhancename
-rw-r--r-- 1 root root      8192 Mar 10 14:42 Filetriggername
-rw-r--r-- 1 root root     81920 Mar 11 17:03 Group
-rw-r--r-- 1 root root    188416 Mar 11 17:03 Installtid
-rw-r--r-- 1 root root    319488 Mar 11 17:03 Name
-rw-r--r-- 1 root root    147456 Mar 11 17:03 Obsoletename
-rw-r--r-- 1 root root 397094912 Mar 11 17:03 Packages
-rw-r--r-- 1 root root   6496256 Mar 11 17:03 Providename
-rw-r--r-- 1 root root     69632 Mar 11 17:03 Recommendname
-rw-r--r-- 1 root root   1437696 Mar 11 17:03 Requirename
-rw-r--r-- 1 root root         0 Aug 25  2012 .rpm.lock
-rw-r--r-- 1 root root    589824 Mar 11 17:03 Sha1header
-rw-r--r-- 1 root root    294912 Mar 11 17:03 Sigmd5
-rw-r--r-- 1 root root     20480 Mar 11 17:03 Suggestname
-rw-r--r-- 1 root root    217088 Mar 11 17:03 Supplementname
-rw-r--r-- 1 root root      8192 Mar  5  2017 Transfiletriggername
-rw-r--r-- 1 root root      8192 Feb 11 17:04 Triggername

You can go in Yast=>Software Manager and taboo it now, save you dealing with it in the future.

Also, another setting for updates is, while in Software Manager, look under Configuration where you can configure online updates.

I’m pretty sure that is already set. It is not downloading updates. But it is still doing a refresh on the repo metadata.

I’m not really a Gnome user either, but I play with it from time to time.

I don’t seem to have org.gnome.software

:~> gsettings list-schemas | grep org.gnome.software
:~> 

But as I wrote - I use KDE not gnome.

Right click on the show hidden icons item in the task bar, select system tray settings and uncheck software updates.

My reply was aimed at Neil’s comment.

I have already written in my first post that I have already done this.

OK today I started Tumbleweed (after I had deleted the PackageKit yesterday) and there was no messages “waiting for shared lock on /var/lib/rpm/Packages”. So I tabooed these packages (PackageKit PackageKit-backend-zypp PackageKit-branding-openSUSE PackageKit-lang). The next thing I did is to check what this request for the root password is. It seems to have to do with the network connections see https://paste.opensuse.org/41313179. These two processes listed under Details are (checked with ps -ef) :

root      1073     1  0 12:46 ?        00:00:00 /usr/sbin/NetworkManager --no-daemon
uli       1976  1972  0 12:47 ?        00:00:00 kded5 [kdeinit5]

I presume this comes because during startup the laptop always turns on wifi. Since I am on an ethernet cable I turn it off during startup. Just before the plymouth screen appears I can see the IP addresses (v4 and v6) so the network connection is there. So this request for the root password had nothing to do with any updates.
I hope the tabooing or PackageKit solved the problem and this startup was not a one-off. If it comes up again and I have further problems I come back to you. In the meantime a big thank you to all of you who came to help!
Regards
Uli