Change createrepo config options defaults.

CHANGE: createrepo_c is config option now defaults to True.
ACTION: You can safely remove 'createrepo_c = True' from config files.
        Set 'createrepo_c = False' if you need legacy createrepo.

CHANGE: createrepo_checksum config option is now mandatory.
ACTION: Add 'createrepo_checksum = "sha256"' (or "sha") to config files.
This commit is contained in:
Daniel Mach 2015-07-08 08:27:00 -04:00
parent a3d46f5393
commit 90918dc34d
9 changed files with 23 additions and 16 deletions

View File

@ -1,6 +1,7 @@
include AUTHORS
include COPYING
include GPL
include RELEASE-NOTES
include pungi.spec
include share/*
include share/multilib/*

8
RELEASE-NOTES Normal file
View File

@ -0,0 +1,8 @@
DATE: 2015-08-08
CHANGE: createrepo_c is config option now defaults to True.
ACTION: You can safely remove 'createrepo_c = True' from config files.
Set 'createrepo_c = False' if you need legacy createrepo.
DATE: 2015-08-08
CHANGE: createrepo_checksum config option is now mandatory.
ACTION: Add 'createrepo_checksum = "sha256"' (or "sha") to config files.

View File

@ -375,8 +375,8 @@ def prepare_iso(compose, arch, variant, disc_num=1, disc_count=None, split_iso_d
del ti.checksums.checksums["repodata/repomd.xml"]
# rebuild repodata
createrepo_c = compose.conf.get("createrepo_c", False)
createrepo_checksum = compose.conf.get("createrepo_checksum", None)
createrepo_c = compose.conf.get("createrepo_c", True)
createrepo_checksum = compose.conf["createrepo_checksum"]
repo = CreaterepoWrapper(createrepo_c=createrepo_c)
file_list = "%s-file-list" % iso_dir

View File

@ -50,7 +50,7 @@ class CreaterepoPhase(PhaseBase):
{
"name": "createrepo_checksum",
"expected_types": [bool],
"optional": True,
"expected_values": ["sha256", "sha"],
},
{
"name": "product_id",
@ -85,8 +85,8 @@ class CreaterepoPhase(PhaseBase):
def create_variant_repo(compose, arch, variant, pkg_type):
createrepo_c = compose.conf.get("createrepo_c", False)
createrepo_checksum = compose.conf.get("createrepo_checksum", None)
createrepo_c = compose.conf.get("createrepo_c", True)
createrepo_checksum = compose.conf["createrepo_checksum"]
repo = CreaterepoWrapper(createrepo_c=createrepo_c)
if pkg_type == "srpm":
repo_dir_arch = compose.paths.work.arch_repo(arch="global")

View File

@ -151,7 +151,7 @@ def resolve_deps(compose, arch, variant):
# https://bugzilla.redhat.com/show_bug.cgi?id=795137
tmp_dir = tempfile.mkdtemp(prefix="pungi_")
try:
run(cmd, logfile=pungi_log, show_cmd=True, workdir=tmp_dir)
run(cmd, logfile=pungi_log, show_cmd=True, workdir=tmp_dir, env=os.environ)
finally:
rmtree(tmp_dir)
result = pungi_wrapper.get_packages(open(pungi_log, "r").read())

View File

@ -125,7 +125,6 @@ class InitPhase(PhaseBase):
"name": "createrepo_checksum",
"expected_types": [str],
"expected_values": ["sha256", "sha"],
"optional": True,
},
# RUNROOT SETTINGS
@ -252,8 +251,8 @@ def create_comps_repo(compose, arch):
if not compose.has_comps:
return
createrepo_c = compose.conf.get("createrepo_c", False)
createrepo_checksum = compose.conf.get("createrepo_checksum", None)
createrepo_c = compose.conf.get("createrepo_c", True)
createrepo_checksum = compose.conf["createrepo_checksum"]
repo = CreaterepoWrapper(createrepo_c=createrepo_c)
comps_repo = compose.paths.work.comps_repo(arch=arch)
comps_path = compose.paths.work.comps(arch=arch)

View File

@ -39,8 +39,8 @@ def populate_arch_pkgsets(compose, path_prefix, global_pkgset):
def create_global_repo(compose, path_prefix):
createrepo_c = compose.conf.get("createrepo_c", False)
createrepo_checksum = compose.conf.get("createrepo_checksum", None)
createrepo_c = compose.conf.get("createrepo_c", True)
createrepo_checksum = compose.conf["createrepo_checksum"]
repo = CreaterepoWrapper(createrepo_c=createrepo_c)
repo_dir_global = compose.paths.work.arch_repo(arch="global")
msg = "Running createrepo for the global package set"
@ -73,8 +73,8 @@ def create_global_repo(compose, path_prefix):
def create_arch_repos(compose, arch, path_prefix):
createrepo_c = compose.conf.get("createrepo_c", False)
createrepo_checksum = compose.conf.get("createrepo_checksum", None)
createrepo_c = compose.conf.get("createrepo_c", True)
createrepo_checksum = compose.conf["createrepo_checksum"]
repo = CreaterepoWrapper(createrepo_c=createrepo_c)
repo_dir_global = compose.paths.work.arch_repo(arch="global")
repo_dir = compose.paths.work.arch_repo(arch=arch)

View File

@ -19,7 +19,7 @@ from kobo.shortcuts import force_list
class CreaterepoWrapper(object):
def __init__(self, createrepo_c=False):
def __init__(self, createrepo_c=True):
if createrepo_c:
self.createrepo = "createrepo_c"
self.mergerepo = "mergerepo_c"

View File

@ -68,8 +68,7 @@ greedy_method = "build"
# CREATEREPO
# TODO: checksum type - mandatory
createrepo_c = True
createrepo_checksum = "sha256"
# BUILDINSTALL