Fix treeinfo checksums.
This commit is contained in:
parent
0d8ad9a111
commit
19a7394974
@ -236,7 +236,7 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
||||
ti.variants.add(var)
|
||||
|
||||
repomd_path = os.path.join(var.repository, "repodata", "repomd.xml")
|
||||
ti.checksums.add(repomd_path, "sha256", os_tree)
|
||||
ti.checksums.add(repomd_path, "sha256", root_dir=os_tree)
|
||||
|
||||
for i in variant.get_variants(types=["addon"], arch=arch):
|
||||
addon = productmd.treeinfo.Variant(ti)
|
||||
@ -251,7 +251,7 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
||||
var.add(addon)
|
||||
|
||||
repomd_path = os.path.join(addon.repository, "repodata", "repomd.xml")
|
||||
ti.checksums.add(repomd_path, "sha256", os_tree)
|
||||
ti.checksums.add(repomd_path, "sha256", root_dir=os_tree)
|
||||
|
||||
class LoraxProduct(productmd.treeinfo.Release):
|
||||
def _check_short(self):
|
||||
@ -277,12 +277,12 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
||||
# stage2 - mainimage
|
||||
if bi_ti.stage2.mainimage:
|
||||
ti.stage2.mainimage = bi_ti.stage2.mainimage
|
||||
ti.checksums.add(ti.stage2.mainimage, "sha256", os_tree)
|
||||
ti.checksums.add(ti.stage2.mainimage, "sha256", root_dir=os_tree)
|
||||
|
||||
# stage2 - instimage
|
||||
if bi_ti.stage2.instimage:
|
||||
ti.stage2.instimage = bi_ti.stage2.instimage
|
||||
ti.checksums.add(ti.stage2.instimage, "sha256", os_tree)
|
||||
ti.checksums.add(ti.stage2.instimage, "sha256", root_dir=os_tree)
|
||||
|
||||
# images
|
||||
for platform in bi_ti.images.images:
|
||||
@ -290,7 +290,7 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
||||
ti.tree.platforms.add(platform)
|
||||
for image, path in bi_ti.images.images[platform].items():
|
||||
ti.images.images[platform][image] = path
|
||||
ti.checksums.add(path, "sha256", os_tree)
|
||||
ti.checksums.add(path, "sha256", root_dir=os_tree)
|
||||
|
||||
# add product.img to images-$arch
|
||||
product_img = os.path.join(os_tree, "images", "product.img")
|
||||
@ -298,7 +298,7 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
||||
if os.path.isfile(product_img):
|
||||
for platform in ti.images.images:
|
||||
ti.images.images[platform]["product.img"] = product_img_relpath
|
||||
ti.checksums.add(product_img_relpath, "sha256", os_tree)
|
||||
ti.checksums.add(product_img_relpath, "sha256", root_dir=os_tree)
|
||||
|
||||
path = os.path.join(compose.paths.compose.os_tree(arch=arch, variant=variant), ".treeinfo")
|
||||
compose.log_info("Writing treeinfo: %s" % path)
|
||||
|
@ -410,7 +410,7 @@ def prepare_iso(compose, arch, variant, disc_num=1, disc_count=None, split_iso_d
|
||||
cmd = repo.get_createrepo_cmd(tree_dir, update=True, database=True, skip_stat=True, pkglist=file_list, outputdir=iso_dir, workers=3, checksum=createrepo_checksum)
|
||||
run(cmd)
|
||||
# add repodata/repomd.xml back to checksums
|
||||
ti.checksums.add(iso_dir, "repodata/repomd.xml")
|
||||
ti.checksums.add("repodata/repomd.xml", "sha256", root_dir=iso_dir)
|
||||
|
||||
new_ti_path = os.path.join(iso_dir, ".treeinfo")
|
||||
ti.dump(new_ti_path)
|
||||
|
Loading…
Reference in New Issue
Block a user