Newbie question re patching Leap / keeping Leap up-to-date

I zypper dup to keep Tumbleweed up to date. I will not do this with Leap. Instead, I believe that all I need to do for Leap is:

YAST → Online Update

Is this correct?

Apologies for a remedial question. I remember the grief of learning my way around Tumbleweed, want to be sure I know how to update Leap properly.

I will install with the Cinnamon desktop, and so won’t have the KDE updater mini-app.

To keep Leap proper up-to-date, indeed YaST > Online update or

zypper patch

is enough.

But if youhave more repos (like Packman, which most of us have), you have to update there with e.g. with YaST > Software Management, then from the View menu > Repositories; select Packman (example) in the list at right use Right-Click" and choose “Update if a newer version is available”. This checks the packages, Continue. Equivalent:

zypper up --repo Packman

Many do this in one step:

zypper up

which will do the step explained for Packman for all enabled repos and will include the zypper patch action.

You can also use zypper:

zypper up

or

Yast —Software Management—Packages-----All Packages----Update if newer Versions avaible

You need to check that, the Package Kit cron job runs daily: /etc/cron.daily/packagekit-background.cron

If for some reason Package Kit hasn’t been installed then, you’ll either have to execute “zypper refresh” manually or, in a daily cron job.

That cron job is disabled by default.

You can enable/configure it in /etc/sysconfig/packagekit-background to have updates installed automatically.
Another option for this would be YaST->Online Update Configuration, which sets up a cron job running zypper.

If for some reason Package Kit hasn’t been installed then, you’ll either have to execute “zypper refresh” manually or, in a daily cron job.

Wrong.
zypper will refresh the repos automatically if necessary.

And even if you do have PackageKit installed, it will not periodically refresh the repos. (unless you are running some frontend/applet that does it, or you explicitly enable that cron job)

PS: you probably can install/run pk-update-icon if you want an update applet in Cinnamon.
(that’s the one XFCE uses, but it should work on any desktop that has a system tray I think)

wolfi@amiga:~/Desktop> LANG=C zypper info pk-update-icon
Loading repository data...
Reading installed packages...

Information for package pk-update-icon:
---------------------------------------
Repository     : openSUSE-42.3-0                             
Name           : pk-update-icon                              
Version        : 2-6.2                                       
Arch           : x86_64                                      
Vendor         : openSUSE                                    
Installed Size : 56.2 KiB                                    
Installed      : No                                          
Status         : not installed                               
Source package : pk-update-icon-2-6.2.src                    
Summary        : Software Update Notifier based on PackageKit
Description    :                                             
    pk-update-icon displays notifications and an icon in the tray area of the
    panel
    when package updates are available.

Thank you for the feedback, Henk, Sauerland, dcurtisfra and wolfi323!

My impression from reading these threads is that:

zypper ref; zypper up

(and emphatically not zypper dup)

… should cover all bases for me. The zypper ref might not be necessary, but won’t hurt.

If you disagree, please let me know!

zypper ref is done 10 Minutes after the last Refresh was done automatically:

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 = 10

/etc/zypp/zypp.conf

In other words, “zypper ref” only makes any sense if your repos have been refreshed less than 10 minutes ago.
But even then, it should normally not be needed, unless you encounter problems (packages not found) because the repos actually changed meanwhile.

Sure, it doesn’t harm, but it takes some time and can cause (unnecessary) network traffic… :wink:

Then it sounds like:

zypper up

will do the trick. Just like Tumbleweed, but without the critical ‘d’ in front of the ‘up.’ Merci!

Indeed.
There is absolutely no difference between “zypper up” and “zypper dup” in this regard (i.e. refreshing the repos)… :wink:

I simply use

zypper up

Does everything desired, has since the stone age.:stuck_out_tongue:

As @Fraser_Bell (and I above) said, many simply use

zypper up

It will include zypper ref, except when it was already done (either by itself or by inclusion) in another zypper/YaST action a short time (I think 10 minutes) ago. That will save time and you would only force a new zypper ref in such a short time span if you think new software is published within that time span.

But we are now jumping into all sorts of personal preferences, where it is up to you to do what you like most.

E.g. many would like to change your suggestion into

zypper ref && zypper up

because then the second command will only run when the first finished successful.

Personal, while doing a lot with the CLI, I am a YaST fan for many things, including using YaST > Software > Online Update (the equivalent of zypper patch), because I then see short descriptions about what the security and recommended updates are for. I can then still deselect some (which I btw almost never do).
I have only one extra repo: Packman. And for that I use YaST > Software > Software Management > View > Repositories. Then select Packman and do the “Update if a newer version is available”. Again by, after that selection, clicking on Installation Summary, I can see what will be done. Gives me a feeling of being the boss. :wink:

Going back to Wolfi323’s explanation and, taking the KDE Plasma 5 case with the “plasma5-pk-updates” package installed – the KDE Software Manager (PackageKit) plasmoid:AFAICS from the package source and, from personal experience with a Laptop with WLAN, the plasmoid checks for:

isNetworkOnline
isNetworkMobile
isOnBattery

Also, I seem to remember that, the KDE plasmoid was recently modified to only check once per day (once every 86 400 seconds) for updates.

The thought is, is there a “doing things twice” conflict here between the KDE plasmoid and “zypp”?

  • “zypp” is checking all repositories which have “autorefresh” enabled for updates once every “repo.refresh.delay” minutes.
  • The KDE Software Manager plasmoid is checking for updates once a day.

[HR][/HR]I’ll be checking the Laptop’s behaviour over the next few weeks with the (zypp) “autorefresh” of all the repositories disabled.

It additionally checked on every login in the past (i.e. when it got “started”), but this got fixed for 42.2.

The thought is, is there a “doing things twice” conflict here between the KDE plasmoid and “zypp”?

Why should it conflict?
There is only one package management system underneath, that all other options use.

“zypp” is checking all repositories which have “autorefresh” enabled for updates once every “repo.refresh.delay” minutes.

No, it does not check anything automatically (or once every xxx minutes) at all.

It will only refresh repos if you actually run something like “zypper up”.

IMHO, you are making it much more complicated than it is.
The point is: repos are refreshed automatically whenever something checks for updates.

(unless auto-refresh is disabled for a repo)

Given that the KDE Software Manager (PackageKit) plasmoid is indicating “Last update 22 hours ago” and no updates pending, this “zypper search” output seems to be indicating that, ZYpp has found some changes in the repositories flagged with ‘autorefresh’:


 > LANG=C zypper search fdhgd
Repository 'openSUSE BuildService - PHP:Applications' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Aktualisierungs-Repository (DEBUG)' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Hauptaktualisierungs-Repository' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE Virtualization' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Packman Repository' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...
No matching items found.
 > 

My interpretation of the comment text in /etc/zypp/zypp.conf related to “repo.refresh.delay” and the “Refresh” section of the “zypper” (8) man page is:

  • If, there were no zypper commands issued within the last “repo.refresh.delay” minutes then, the indexes of repositories will be checked for any changes made since the last “zypper refresh”.
  • If, any zypper commands are issued within “repo.refresh.delay” minutes of the last zypper command which checked the repositories for changes then, the repositories will ** NOT
    ** be checked again. - This behaviour also applies to “zypper update” and “zypper patch” despite the intrinsic behaviour that these two commands execute a “zypper refresh” before attempting to apply either the pending patches and/or updates.

In other words, if you apply “no” to “zypper update” and then, wait at least 10 minutes before re-executing “zypper update”, another implicit “zypper refresh” will be performed.

Question: is this interpretation correct?

That has nothing to do with when the repos have been refreshed the last time.
It just means what it says, that the update applet checked for updates 22 hours ago (which of course did refresh the repos as well).

this “zypper search” output seems to be indicating that, ZYpp has found some changes in the repositories flagged with ‘autorefresh’:

Yes, and as you are running it as user, so it cannot refresh the repos.
This needs root privileges.

PackageKit can do it (if it’s not disallowed via polkit rules), as it does run as root. (but it is only started if the applet checks for updates)

Question: is this interpretation correct?

More or less, yes.

Except that it doesn’t matter whether you ran zypper commands in the last “repo.refresh.delay” minutes or not, only when the repos actually have been refreshed the last time (you could also have run YaST->Software Management e.g.).