Commit f633c04 fix arg order for checksums.add

1 file Authored and Committed by Adam Miller 2 years ago
fix arg order for checksums.add

    
 1 @@ -141,7 +141,7 @@
 2       ti.variants.add(var)
 3   
 4       repomd_path = os.path.join(var.repository, "repodata", "repomd.xml")
 5 -     ti.checksums.add(os_tree, "sha256", repomd_path)
 6 +     ti.checksums.add(repomd_path, "sha256", os_tree)
 7   
 8       for i in variant.get_variants(types=["addon"], arch=arch):
 9           addon = productmd.treeinfo.Variant(ti)
10 @@ -156,7 +156,7 @@
11           var.add(addon)
12   
13           repomd_path = os.path.join(addon.repository, "repodata", "repomd.xml")
14 -         ti.checksums.add(os_tree, "sha256", repomd_path)
15 +         ti.checksums.add(repomd_path, "sha256", os_tree)
16   
17       class LoraxProduct(productmd.treeinfo.Release):
18           def _check_short(self):
19 @@ -182,12 +182,12 @@
20               # stage2 - mainimage
21               if bi_ti.stage2.mainimage:
22                   ti.stage2.mainimage = bi_ti.stage2.mainimage
23 -                 ti.checksums.add(os_tree, "sha256", ti.stage2.mainimage)
24 +                 ti.checksums.add(ti.stage2.mainimage, "sha256", os_tree)
25   
26               # stage2 - instimage
27               if bi_ti.stage2.instimage:
28                   ti.stage2.instimage = bi_ti.stage2.instimage
29 -                 ti.checksums.add(os_tree, "sha256", ti.stage2.instimage)
30 +                 ti.checksums.add(ti.stage2.instimage, "sha256", os_tree)
31   
32               # images
33               for platform in bi_ti.images.images:
34 @@ -195,7 +195,7 @@
35                   ti.tree.platforms.add(platform)
36                   for image, path in bi_ti.images.images[platform].items():
37                       ti.images.images[platform][image] = path
38 -                     ti.checksums.add(os_tree, "sha256", path)
39 +                     ti.checksums.add(path, "sha256", os_tree)
40   
41           # add product.img to images-$arch
42           product_img = os.path.join(os_tree, "images", "product.img")
43 @@ -203,7 +203,7 @@
44           if os.path.isfile(product_img):
45               for platform in ti.images.images:
46                   ti.images.images[platform]["product.img"] = product_img_relpath
47 -                 ti.checksums.add(os_tree, "sha256", product_img_relpath)
48 +                 ti.checksums.add(product_img_relpath, "sha256", os_tree)
49   
50       path = os.path.join(compose.paths.compose.os_tree(arch=arch, variant=variant), ".treeinfo")
51       compose.log_info("Writing treeinfo: %s" % path)