Repositories is out-of-date

I find a weird situation.
If I ran

@mypc:~> sudo zypper ref
Repository 'openSUSE-Tumbleweed-Non-Oss' is up to date.                                                                                             
Repository 'Open H.264 Codec (openSUSE Tumbleweed)' is up to date.                                                                                  
Repository 'openSUSE-Tumbleweed-Oss' is up to date.                                                                                                 
Repository 'openSUSE-Tumbleweed-Update' is up to date.                                                                                              
All repositories have been refreshed.

I still got all my enable repositories out-of-date.

cykuo@mypc:~> zypper pa --unneeded 
Repository 'openSUSE-Tumbleweed-Non-Oss' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Open H.264 Codec (openSUSE Tumbleweed)' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE-Tumbleweed-Oss' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE-Tumbleweed-Update' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...

But after waiting several minutes, all out-of-date repositories automatically becomes up-to-date without running “zypper ref”.

@mypc:~> sudo zypper pa --unneeded 
[sudo] password for root: 
Loading repository data...
Reading installed packages...

I find this happened after running YAST software management.

Any ideal how could this be happened?

You are running one command as sudo and the other not.

This zypper is run by user cykuo .

This zypper is run by user root .

@hui , sorry you were faster :wink:

:joy: I see. Thanks for pointing that out.

So is it normal for getting repositories out-of-date by running zypper not with root?

You don‘t have write permissions for the database/cache as normal user.

You can get expect all sorts of messages when running zypper as “normal” user.

No, it is not normal. My only guess is too restrictive permissions for zypper cache directories. You could check

ls -ld /var/cache/zypp
ls -lR /var/zache/zypp

Hmm … apparently something changed in Tumbleweed recently.

andrei@leap155:~> zypper pa --unneeded
Loading repository data...
Reading installed packages...

but

andrei@tumbleweed:~> zypper pa --unneeded
Repository 'openSUSE-Tumbleweed-Non-Oss (20240325)' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE-Tumbleweed-Oss (20240325)' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE-Tumbleweed-Update' is out-of-date. You can run 'zypper refresh' as root to update it.

There is a timer in /etc/zypp/zypp.conf:

##
## Amount of time in minutes that must pass before another refresh.
##
## Valid values: Integer
## Default value: 10
##
## If you have autorefresh enabled for a repository, it is checked for
## up-to-date metadata not more often than every <repo.refresh.delay>
## minutes. If an automatic request for refresh comes before <repo.refresh.delay>
## minutes passed since the last check, the request is ignored.
##
## A value of 0 means the repository will always be checked. To get the opposite
## effect, disable autorefresh for your repositories.
##
## This option has no effect for repositories with autorefresh disabled, nor for
## user-requested refresh.
##
repo.refresh.delay = 5

https://bugzilla.opensuse.org/show_bug.cgi?id=1222086

1 Like

Sorry, my fault.