#816 ostree: Add force_new_commit option
Closed 6 years ago by onosek. Opened 6 years ago by walters.
walters/pungi ostree-force-nocache  into  master

ostree: Add force_new_commit option
Colin Walters • 6 years ago  
file modified
+3
@@ -1220,6 +1220,9 @@ 

        deliverable is not release blocking.

      * ``update_summary`` -- (*bool*) Update summary metadata after tree composing.

        Defaults to ``False``.

+     * ``force_new_commit`` -- (*bool*) Do not use rpm-ostree's built in change

+       detection.

+       Defaults to ``False``.

      * ``version`` -- (*str*) Version string to be added as versioning metadata.

        If this option is set to ``!OSTREE_VERSION_FROM_LABEL_DATE_TYPE_RESPIN``,

        a value will be generated automatically as ``$VERSION.$RELEASE``.

file modified
+1
@@ -887,6 +887,7 @@ 

                                      "arches": {"$ref": "#/definitions/list_of_strings"},

                                      "failable": {"$ref": "#/definitions/list_of_strings"},

                                      "update_summary": {"type": "boolean"},

+                                     "force_new_commit": {"type": "boolean"},

                                      "version": {"type": "string"},

                                      "config_branch": {"type": "string"},

                                      "tag_ref": {"type": "boolean"},

file modified
+5
@@ -33,6 +33,10 @@ 

          if self.version:

              # Add versioning metadata

              cmd.append('--add-metadata-string=version=%s' % self.version)

+         # Note renamed from rpm-ostree --force-nocache since it's a better

+         # name; more clearly describes what we're doing here.

+         if self.force_new_commit:

+             cmd.append('--force-nocache')

          cmd.append(self.treefile)

  

          shortcuts.run(cmd, show_cmd=True, stdout=True, logfile=log_file)
@@ -84,6 +88,7 @@ 

          self.update_summary = self.args.update_summary

          self.extra_config = self.args.extra_config

          self.ostree_ref = self.args.ostree_ref

+         self.force_new_commit = self.args.force_new_commit

  

          if self.extra_config:

              self.extra_config = json.load(open(self.extra_config, 'r'))

Followup from discussion in: https://pagure.io/pungi/issue/811

It's likely now that for Fedora Atomic Host we'll use this, to work
around other issues, after we fix the FAW change detection.

(Like all my pungi patches, not tested locally...at some point I may figure out how to get a devel environment for this set up)

Unit tests were failing, therefore I opened new PR to continue on this:
https://pagure.io/pungi/pull-request/827
So we can close this PR.

Pull-Request has been closed by onosek

6 years ago