Merge #23 fix treeinfo checksums
This commit is contained in:
commit
5432d3fa74
@ -236,7 +236,7 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
|||||||
ti.variants.add(var)
|
ti.variants.add(var)
|
||||||
|
|
||||||
repomd_path = os.path.join(var.repository, "repodata", "repomd.xml")
|
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):
|
for i in variant.get_variants(types=["addon"], arch=arch):
|
||||||
addon = productmd.treeinfo.Variant(ti)
|
addon = productmd.treeinfo.Variant(ti)
|
||||||
@ -251,7 +251,7 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
|||||||
var.add(addon)
|
var.add(addon)
|
||||||
|
|
||||||
repomd_path = os.path.join(addon.repository, "repodata", "repomd.xml")
|
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):
|
class LoraxProduct(productmd.treeinfo.Release):
|
||||||
def _check_short(self):
|
def _check_short(self):
|
||||||
@ -277,12 +277,12 @@ def write_tree_info(compose, arch, variant, timestamp=None):
|
|||||||
# stage2 - mainimage
|
# stage2 - mainimage
|
||||||
if bi_ti.stage2.mainimage:
|
if bi_ti.stage2.mainimage:
|
||||||
ti.stage2.mainimage = 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
|
# stage2 - instimage
|
||||||
if bi_ti.stage2.instimage:
|
if bi_ti.stage2.instimage:
|
||||||
ti.stage2.instimage = 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
|
# images
|
||||||
for platform in bi_ti.images.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)
|
ti.tree.platforms.add(platform)
|
||||||
for image, path in bi_ti.images.images[platform].items():
|
for image, path in bi_ti.images.images[platform].items():
|
||||||
ti.images.images[platform][image] = path
|
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
|
# add product.img to images-$arch
|
||||||
product_img = os.path.join(os_tree, "images", "product.img")
|
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):
|
if os.path.isfile(product_img):
|
||||||
for platform in ti.images.images:
|
for platform in ti.images.images:
|
||||||
ti.images.images[platform]["product.img"] = product_img_relpath
|
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")
|
path = os.path.join(compose.paths.compose.os_tree(arch=arch, variant=variant), ".treeinfo")
|
||||||
compose.log_info("Writing treeinfo: %s" % path)
|
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)
|
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)
|
run(cmd)
|
||||||
# add repodata/repomd.xml back to checksums
|
# 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")
|
new_ti_path = os.path.join(iso_dir, ".treeinfo")
|
||||||
ti.dump(new_ti_path)
|
ti.dump(new_ti_path)
|
||||||
|
Loading…
Reference in New Issue
Block a user