dom0/updates: use Qubes-comps.xml if present
This commit is contained in:
parent
eb5ba60da7
commit
df47ae5e77
@ -35,6 +35,10 @@ updates_repodata_dir = updates_dir + "/repodata"
|
||||
updates_error_file = updates_dir + "/errors"
|
||||
updates_error_file_handle = None
|
||||
|
||||
comps_file = '/usr/share/qubes/Fedora-comps.xml'
|
||||
if os.path.exists('/usr/share/qubes/Qubes-comps.xml'):
|
||||
comps_file = '/usr/share/qubes/Qubes-comps.xml'
|
||||
|
||||
package_regex = re.compile(r"^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789._+-]{1,128}.rpm$")
|
||||
gpg_ok_regex = re.compile(r"pgp md5 OK$")
|
||||
|
||||
@ -84,7 +88,7 @@ def handle_dom0updates(updatevm):
|
||||
if updates_error_file_handle is not None:
|
||||
updates_error_file_handle.close()
|
||||
# After updates received - create repo metadata
|
||||
subprocess.check_call(["/usr/bin/createrepo", "-g", "/usr/share/qubes/Fedora-comps.xml", "-q", updates_dir])
|
||||
subprocess.check_call(["/usr/bin/createrepo", "-g", comps_file, "-q", updates_dir])
|
||||
os.chown(updates_repodata_dir, -1, qubes_gid)
|
||||
os.chmod(updates_repodata_dir, 0775)
|
||||
# Clean old cache
|
||||
|
Loading…
Reference in New Issue
Block a user