update for productmd checksums.add to TreeInfo

This commit is contained in:
Adam Miller 2015-06-06 08:57:43 -05:00
parent 989b018090
commit cc48f6522a

View File

@ -141,7 +141,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(os_tree, repomd_path) ti.checksums.add(os_tree, "sha256", repomd_path)
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)
@ -156,7 +156,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(os_tree, repomd_path) ti.checksums.add(os_tree, "sha256", repomd_path)
class LoraxProduct(productmd.treeinfo.Release): class LoraxProduct(productmd.treeinfo.Release):
def _check_short(self): def _check_short(self):
@ -182,12 +182,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(os_tree, ti.stage2.mainimage) ti.checksums.add(os_tree, "sha256", ti.stage2.mainimage)
# 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(os_tree, ti.stage2.instimage) ti.checksums.add(os_tree, "sha256", ti.stage2.instimage)
# images # images
for platform in bi_ti.images.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) 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(os_tree, path) ti.checksums.add(os_tree, "sha256", path)
# 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")
@ -203,7 +203,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(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") 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)