Bug 1210376

Summary: yast2 sw_single doesn't manage changes in repos gracefully
Product: [openSUSE] openSUSE Tumbleweed Reporter: Kevin Coonan <kevin.coonan>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED INVALID QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Kevin Coonan 2023-04-12 23:54:44 UTC
I have a long list of things that Yast2 Software needs to address, but the biggest problem is that is does not deal with changes in software in the repository that occur in the time from refreshing the repo and downloading.  

It reports that a specific version of the software isn't available.

And stops.

It just sits there if the user doesn't do something.  

Meanwhile, more and more software is being updated in the repository.  Thus, the longer the user waits to ignore, etc. the notice and continue downloading the more likely they are to run into another case where the software version listed when they refreshed the repo, and the version which is in the repo are off.
installed
With a big update, e.g. 'zypper dup' this then requires that the user sit in front of their computer just waiting to ignore a message.

After all the software which wasn't updated in the time between refreshing the repo and time it was downloaded is done installing you can then refresh the repo, and install the updated software without too much problem.

But this is terrible behavior.  

The Yast software management module should give the user the option to either AUTOMATICALLY refresh the repo and install any newer versions of software found at the time of download, or to ***ignore all*** cases were the specific version of the software cannot be found and go ahead and download the rest and install what it can.  

This is a huge pain in the ass, and drives users new and experienced alike crazy.

This isn't a TW specific issue either, rather just a failure of the Yast software management app to provide for this common use case with options which make sense and help the end user.
Comment 1 Stefan Hundhammer 2023-04-13 07:18:29 UTC
You didn't think that to the end.

Sure, we *could* refresh the repos during package installation (and BTW that's all in libzypp, not in the YaST part). And then what?

When all of a sudden there is a new libfoo-42.0, but the previously installed application foome-7.0 is now no longer compatible with it, then what? Then we start that whole dependency problem reporting etc. process again? Asking the user again which one of two or three equally solutions he'd prefer?

No; that doesn't work. The package installation needs to be a transaction; during that time, the repo may not change.

Yes, that can be bad especially with Tumbleweed (and no, in Leap or SLE that happens rarely or not at all). If we can't rely on that, the whole concept of dependency management falls apart.

Yes, with Tumbleweed that may happen; that's one of the major downsides of a rolling release. The best way to avoid that is this sequence:

  sudo zypper refresh
  sudo zypper dup -y --download-only
  sudo zypper dup -y --download-only
  sudo zypper dup -y

This downloads the changed packages in advance, and it does it twice because something may have changed between the lengthy first download process. The second one should be very quick.

And then the downloaded packages are installed which hopefully doesn't take so long that more packages are updated in the repo again. To be very sure that this isn't the case, I usually do a final

  sudo zypper refresh
  sudo zypper dup
Comment 2 Stefan Hundhammer 2023-04-13 07:19:16 UTC
(In reply to Stefan Hundhammer from comment #1)
> Asking the user again which one of two or three equally solutions
                                                  equally bad
> he'd prefer?
Comment 3 Stefan Hundhammer 2023-04-13 07:47:26 UTC
BTW it's not an option to try installing the previous package versions that the whole dependency resolution was based on; and that's a very Tumbleweed-specific problem: TW does not keep any older versions around, it only has ONE version of each package.

If that sounds like a downside of TW to you, I fully agree; but that would be something you'd have to discuss with the TW maintainers.