https://bugzilla.novell.com/show_bug.cgi?id=866257
https://bugzilla.novell.com/show_bug.cgi?id=866257#c8
--- Comment #8 from Dominique Leuenberger 2014-09-12 14:05:52 UTC ---
python-zypp is now in the mirrors..
so my very first attempt, that does something useful (yes, it is ugly):
======
#! /usr/bin/python
import zypp
import os
for repo in zypp.RepoManager().knownRepositories():
if not repo.enabled():
continue
print ("Installing appdata for repository %-40s..." % (repo.alias()))
if str(repo.type()) == 'rpm-md':
os.system("appstream-util install-origin %s %s/repodata/*appdata.xml.gz
%s/repodata/*app-icons.tar.gz" % (repo.alias(), repo.metadataPath(),
repo.metadataPath()))
if str(repo.type()) == 'yast2':
os.system("appstream-util install-origin %s
%s/suse/setup/descr/*appdata.xml.gz %s/suse/setup/descr/*app-icons.tar.gz" %
(repo.alias(), repo.metadataPath(), repo.metadataPath()))
======
If goes through all the repos and just tries to install all available data
(appstream-util fails if not found; that's ok)
What's still missing is a cleanup; I think simply cleaning up 'everything'
before installing everything new would be the cleanest
my shell magic for that is
for file in /usr/share/app-info/xmls/*; do appstream-util uninstall $(echo
$(basename $file) | sed "s:.xml.gz::"); done
Seems if we manage to hook this into libzypp at the right point, this should be
a workable solution in the end
--
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.