fix arg order for checksums.add

This commit is contained in:
Adam Miller 2015-06-06 09:15:10 -05:00
parent cc48f6522a
commit f633c04497

View File

@ -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, "sha256", repomd_path)
ti.checksums.add(repomd_path, "sha256", os_tree)
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, "sha256", repomd_path)
ti.checksums.add(repomd_path, "sha256", os_tree)
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, "sha256", ti.stage2.mainimage)
ti.checksums.add(ti.stage2.mainimage, "sha256", os_tree)
# stage2 - instimage
if bi_ti.stage2.instimage:
ti.stage2.instimage = bi_ti.stage2.instimage
ti.checksums.add(os_tree, "sha256", ti.stage2.instimage)
ti.checksums.add(ti.stage2.instimage, "sha256", os_tree)
# 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, "sha256", path)
ti.checksums.add(path, "sha256", os_tree)
# 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, "sha256", product_img_relpath)
ti.checksums.add(product_img_relpath, "sha256", os_tree)
path = os.path.join(compose.paths.compose.os_tree(arch=arch, variant=variant), ".treeinfo")
compose.log_info("Writing treeinfo: %s" % path)