Bug 342600

Summary: incremental "zypper update"
Product: [openSUSE] openSUSE 11.0 Reporter: Dirk Mueller <dmueller>
Component: YaST2Assignee: Jan Kupec <jkupec>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None CC: dmacvicar, kkaempf, ma, schubi, tgoettlicher
Version: Alpha 2   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dirk Mueller 2007-11-18 20:48:27 UTC
It is my understanding that opensuse-updater runs "zypper update" once in a while. 

zypper update takes however more than 2 minutes to notice that nothing has to be done. it seems to do that by pruning the repositories, refreshing all of them, reading all installed packages, and then realizing that nothing has to be done. 

something could be improved here, for example: 

do a DNS query to the update server to figure out if new updates are available. if no new updates are available and nothing was changed in the package database, exit.
Comment 1 Thomas Göttlicher 2007-11-27 09:14:42 UTC
Reassigning to maintainer.
Comment 2 Jan Kupec 2008-01-08 15:48:34 UTC
Unfortunately, currently we don't have a way to identify "update repositories" and any repository is potentially an update repository. What we could do in the current situation is to quick-check all of the repositories for change since the last update (a few second operation).

But whether we do have "update repos" or not, what about a use case where user makes changes to the system using applications other than libzypp (rpm, yum, smart, ...)? Then a mere check for a change in the repository is simply not enough and a normal solver run on a fresh metadata is needed.

As for the refresh/rebuild phase, it happens only if the repo changes. So unless it is changed, zypper update just reads the packages and solves, no refresh. This is still slow ATM, but much less than 2 min on a common machine and a work is being done in libzypp to still improve it.

So unless i'm wrong or i misunderstood you, i'd close this request.
Comment 4 Dirk Mueller 2008-01-09 13:34:54 UTC
if system has changed without libzypp (e.g. via rpm directly), the rpm database has a different timestamp. 

Comment 5 Duncan Mac-Vicar 2008-01-09 23:16:16 UTC
Actually I implemented this for the old zypp-checkpatches, who generated the xml to /var/cache, and created a token which was the concatenation of the repository checksums (which was the checksum of the index) plus the checksum of the rpm database. This token was used then to check if a new solving needed to be done.

This functionality seems to be lost when zypper started to be used for generating the xml and parsing it directly from its output.

I think this code can be rescued from the 10.2 branch.
Comment 6 Jan Kupec 2008-01-14 09:12:35 UTC
OK, i'll look at it.
Comment 7 Jan Kupec 2008-04-29 08:38:30 UTC
after 11.0
Comment 8 Stephan Kulow 2008-06-25 09:10:52 UTC
mass reopening of later+remind bugs of 11.0
Comment 9 Jan Kupec 2008-07-12 20:34:10 UTC
I guess this is no more needed with current libzypp/sat-solver, is it?