Skip to content

compose: Allow specifying lockfile-repos only#2071

Merged
openshift-merge-robot merged 2 commits intocoreos:masterfrom
jlebon:pr/lockfile-repos-only
Apr 29, 2020
Merged

compose: Allow specifying lockfile-repos only#2071
openshift-merge-robot merged 2 commits intocoreos:masterfrom
jlebon:pr/lockfile-repos-only

Conversation

@jlebon
Copy link
Copy Markdown
Member

@jlebon jlebon commented Apr 28, 2020

For Fedora CoreOS production streams, we want to only source from
lockfile repos. But right now, rpm-ostree doesn't allow not specifying
repos. Relax this restriction and just check that at least one of the
two was provided.

For Fedora CoreOS production streams, we want to *only* source from
lockfile repos. But right now, rpm-ostree doesn't allow not specifying
`repos`. Relax this restriction and just check that at least one of the
two was provided.
@openshift-ci-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlebon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/* at least one of `repos` and `lockfile-repos` should be defined */
if (!json_object_has_member (treedata, "repos") &&
!json_object_has_member (treedata, "lockfile-repos"))
return glnx_null_throw (error, "Treefile has neither \"repos\" nor \"lockfile-repos\" members");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

glnx_throw

Copy link
Copy Markdown
Member Author

@jlebon jlebon Apr 28, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function actually returns a pointer, not a gboolean/int. I added a commit to convert all the return FALSE in here to return NULL.

Even though C happily accepts 0 for NULL, this is ambiguous with our
coding style. E.g. here we're actually returning a pointer, not a
gboolean. So let's be less misleading.
@cgwalters
Copy link
Copy Markdown
Member

/lgtm

@jlebon
Copy link
Copy Markdown
Member Author

jlebon commented Apr 29, 2020

/refresh

@jlebon jlebon added the lgtm label Apr 29, 2020
@openshift-merge-robot openshift-merge-robot merged commit 11af9c4 into coreos:master Apr 29, 2020
@jlebon jlebon deleted the pr/lockfile-repos-only branch April 23, 2023 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants