From cc48f6522a95ae7c6beab5460e0ba62554a78518 Mon Sep 17 00:00:00 2001 From: Adam Miller Date: Sat, 6 Jun 2015 08:57:43 -0500 Subject: [PATCH] update for productmd checksums.add to TreeInfo --- pungi/metadata.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pungi/metadata.py b/pungi/metadata.py index f8318eda..74f7a95c 100644 --- a/pungi/metadata.py +++ b/pungi/metadata.py @@ -141,7 +141,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(os_tree, repomd_path) + ti.checksums.add(os_tree, "sha256", repomd_path) for i in variant.get_variants(types=["addon"], arch=arch): addon = productmd.treeinfo.Variant(ti) @@ -156,7 +156,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(os_tree, repomd_path) + ti.checksums.add(os_tree, "sha256", repomd_path) class LoraxProduct(productmd.treeinfo.Release): def _check_short(self): @@ -182,12 +182,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(os_tree, ti.stage2.mainimage) + ti.checksums.add(os_tree, "sha256", ti.stage2.mainimage) # stage2 - instimage if bi_ti.stage2.instimage: ti.stage2.instimage = bi_ti.stage2.instimage - ti.checksums.add(os_tree, ti.stage2.instimage) + ti.checksums.add(os_tree, "sha256", ti.stage2.instimage) # images for platform in bi_ti.images.images: @@ -195,7 +195,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(os_tree, path) + ti.checksums.add(os_tree, "sha256", path) # add product.img to images-$arch product_img = os.path.join(os_tree, "images", "product.img") @@ -203,7 +203,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(os_tree, product_img_relpath) + ti.checksums.add(os_tree, "sha256", product_img_relpath) path = os.path.join(compose.paths.compose.os_tree(arch=arch, variant=variant), ".treeinfo") compose.log_info("Writing treeinfo: %s" % path)