https://bugzilla.novell.com/show_bug.cgi?id=866257 https://bugzilla.novell.com/show_bug.cgi?id=866257#c10 --- Comment #10 from Dominique Leuenberger <dimstar@opensuse.org> 2014-09-17 10:00:55 UTC --- (In reply to comment #9)
(In reply to comment #7)
- once zypp signals that 'all repos are refreshed' (I hope I can get this?
As mentioned above, the applications usually take the repo descriptions one by one and pass it to zypp in order to refresh. Zypp knows that _a_ repo was refreshend but not when _all_ were processed.
Is some zypp trigger required, or would gnome-software be able to execute the script at it's startup?
g-s runs as user and does not have the needed permission to install meta-data to the required location (/usr/share/app-info)
Another issue we may need to solve if we respond to a libzypp trigger, is the fact that the refreshing zypp instance might hold locks which prevent the script (if running as root) from getting the data at that point in time.
Maybe we can work around this by a file being touched upon 'any' refresh and triggering the external script when the locks disappear (I'm sure zypp knows when it's no longer locked)
Assuming the code extract above gives, as it indicates, the location where the metadata is stored, it should be rather simple... only question for me left at this moment:
- for rpm-md, I guess metadataPath() points to /var/cache/zypp/raw/<repo>/repodata (or to <repo>/?)
and for yast2? to /var/cache/zypp/raw/<repo>/ or somewhere deeper?
Metadata path is always the '/var/cache/zypp/raw/<repo>/' level. The files below metadata path are at the same location as they are on the media below repo URL:
<metadatapath>/
*rpmmd* /repodata/repomd.xml ...
*susetags* /content /suse/setup/descr/ ...
for type, i assume repo.type() would be the right thing to identify this as well.
Yes, but keep in mind that type is just a hint. Type is usually UNKNOWN until we probe the repo or we got the value from a serialized description. A known type does not imply metadata are available; UNKNOWN does not imply metadata are missing.
repos that have metadata cached locally are the only ones we care for and those always have a valid type.... good enough -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.