Bug 128379

Summary: YaST doesn't refresh local repository.
Product: [openSUSE] SUSE LINUX 10.0 Reporter: Rafał Polak <rafpolak>
Component: YaST2Assignee: Michael Andres <ma>
Status: RESOLVED FIXED QA Contact: Klaus Kämpf <kkaempf>
Severity: Normal    
Priority: P5 - None CC: forgotten_bwNirt9brK
Version: Final   
Target Milestone: ---   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Attachments: yast.log
local package upgrading testcase

Description Rafał Polak 2005-10-14 11:46:50 UTC
I have local repository with some rpm's, i added it to the YaST and i checked
"refresh on" option but when i entered to the "software management" it said
"installation source not refreshed". I tried to run YaST form console but it
doesn't show any error message.
Comment 1 Michael Gross 2005-10-14 13:18:23 UTC
Please be a bit more verbose and add the yast2-logfiles here. Thanks.
Comment 2 Rafał Polak 2005-10-14 14:42:51 UTC
Created attachment 54127 [details]
yast.log 

Sorry, here is the log.
Comment 3 Michael Gross 2005-10-17 07:00:04 UTC
Jiri: Can you please take care of that?
Comment 4 Michael Andres 2005-10-17 09:13:42 UTC
There's not that much Jiri can do, if the YCPcallback shows the correct message:

  PackageCallbacks.ycp:566 DoneSourceRefresh:   
  $["cause":`REFRESH_NOT_SUPPORTED_BY_SOURCE, "detail":"", "result":`SKIP_REFRESH]

Plain sources don't support refresh. You an use 'createrepo' to create the YUM style metadata for the packages in dir:///home/bugi/RPM/Misc/. Then delete and recreate the source.

YUM supports metadata refresh, I.e. if you recreate the metdata whenever the repository at /home/bugi/RPM/Misc is changed, YaST will reload the updated data if necessary.
Comment 5 Jiri Srain 2005-10-18 09:02:12 UTC
Michael, can package manager provide information whether source supports refresh or not? Then source manager can prevent setting refresh on for these kinds of sources...
Comment 7 Jiri Srain 2005-10-18 12:49:35 UTC
OK, forbidding to set autorefresh on for PlainDir sources.

The remaining problem is that new created PlainDir source has the "autorefresh" entry set to true (in return value of Pkg::SourceGeneralData). I guess this should be fixed on package manager's side.
Comment 8 Gilles Sabourin 2005-11-04 15:01:58 UTC
Michael, Jiri,

This problem is not only an error refreshing message appearing whenever you add a local source. I have performed the following test :

1) deleted préviously installed smb4k 0.6.4 package
2) disabled all distant sources and refreshing actions
3) put only old smb4k 0.5.2 package in a local directory
3) added this local directory as a source and saw the error message " installation source not refreshed "
4) installed smb4k 0.5.2
5) deleted smb4k 0.5.2 in local directory
6) put smb4k 0.6.0 package in local directory
7) have a look in yast packagemanager : smb4k 0.6.0 is not proposed in version tab
8) Forced an update of smb4k package : yast packagemanager complained about smb4k 0.5.2 package not found on this support

Err: 11283:ERROR(Media:file not found)

Package update used to work for local source in SUSE 9.3. As many users are not developper, I don't understand why they have to deal with a script to create a YUM style metadata only to workaround a buggy function...

Should have been tested a little bit more ...

Please have a look at yast log in the following attachment.
Comment 9 Gilles Sabourin 2005-11-04 15:04:43 UTC
Created attachment 56490 [details]
local package upgrading testcase
Comment 10 Thomas Meindl 2005-11-23 20:27:07 UTC
Think I have a similar issue: I alway copy the supplementary kde yast-source directory from ftp to my hard-disk (in case, I have to reinstall or to give the rpms to a friend for update). Up to SL 9.3 I just had to run 'create_package_descr' in the 'suse' directory and tell YAST2 to update the local installation source. But this doesn't work anymore with 10.0 - I have to delete the link to source-directory in the 'Change installation source' option to force YAST to check for the new descr-file. I really think there should be done something about it - is it really that complicated?
Comment 11 Michael Andres 2005-11-23 21:00:22 UTC
(In reply to comment #10)
> done something about it - is it really that complicated?

That's a flaw in create_package_descr. YaST reloads the metadata, if the source
indicates that they have changed. This is done by changing the timestamp in the 
media.1/media file (2nd line; doesn't need to be a timestamp, just needs to be different). Without this, the Source is treated as up to date.
Comment 12 Forgotten User bwNirt9brK 2006-02-16 13:32:25 UTC
(In reply to comment #4)
> Plain sources don't support refresh. 

Is there a reason they should or can not support refresh? As another person mentioned, I also copy files from the FTP repositories to local sources. I don't know anything confirmed about the internal workings of YaST in this regard, but I presume YaST has a list of packages, which include the version numbers. YaST can simply check that list with the list of the existing RPMs in the local directory. If there are any extra or newer files, they can simply be added. This should not be difficult.

As it is, I have to do a replace directory action with the same directory path (and set refresh to off to avoid the annoying warning).
Comment 13 Michael Andres 2007-01-22 14:45:47 UTC
fixed in 10.2 (libzypp plaindir always rereads local repositories).