#23 fix treeinfo checksums
Merged 8 years ago by ausil. Opened 8 years ago by dmach.
dmach/pungi fix-treeinfo  into  master

file modified
+6 -6
@@ -236,7 +236,7 @@ 

      ti.variants.add(var)

  

      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):

          addon = productmd.treeinfo.Variant(ti)
@@ -251,7 +251,7 @@ 

          var.add(addon)

  

          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):

          def _check_short(self):
@@ -277,12 +277,12 @@ 

              # stage2 - mainimage

              if 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

              if 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

              for platform in bi_ti.images.images:
@@ -290,7 +290,7 @@ 

                  ti.tree.platforms.add(platform)

                  for image, path in bi_ti.images.images[platform].items():

                      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

          product_img = os.path.join(os_tree, "images", "product.img")
@@ -298,7 +298,7 @@ 

          if os.path.isfile(product_img):

              for platform in ti.images.images:

                  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")

      compose.log_info("Writing treeinfo: %s" % path)

file modified
+1 -1
@@ -410,7 +410,7 @@ 

              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)

              # 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")

      ti.dump(new_ti_path)

no initial comment