Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

override: Add --cache-only flag #3153

Merged
merged 1 commit into from
Dec 16, 2021
Merged

Conversation

cgwalters
Copy link
Member

For the same reason we have it elsewhere. Fetching the repomd
is a fine default, but e.g. someone may want to try overriding
using a local package that doesn't need any dependencies when
the machine is offline, or for some reason the rpm-md repositories
aren't accessible.

Motivated by trying to work around an OpenShift MCO issue where
it only provisions an rpm-md repo transitively.

@openshift-ci
Copy link

openshift-ci bot commented Sep 30, 2021

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@cgwalters
Copy link
Member Author

(not tested)

jlebon
jlebon previously approved these changes Sep 30, 2021
@@ -43,6 +44,7 @@ static GOptionEntry option_entries[] = {
{ "reboot", 'r', 0, G_OPTION_ARG_NONE, &opt_reboot, "Initiate a reboot after operation is complete", NULL },
{ "dry-run", 'n', 0, G_OPTION_ARG_NONE, &opt_dry_run, "Exit after printing the transaction", NULL },
{ "lock-finalization", 0, G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &opt_lock_finalization, "Prevent automatic deployment finalization on shutdown", NULL },
{ "cache-only", 'C', 0, G_OPTION_ARG_NONE, &opt_cache_only, "Do not download latest ostree and RPM data", NULL },
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{ "cache-only", 'C', 0, G_OPTION_ARG_NONE, &opt_cache_only, "Do not download latest ostree and RPM data", NULL },
{ "cache-only", 'C', 0, G_OPTION_ARG_NONE, &opt_cache_only, "Do not download RPM data", NULL },

Copy link
Member Author

Choose a reason for hiding this comment

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

True...today. But, I could imagine us changing this in the future...let's say we detect that in order to solve dependencies, we need to update the base ostree. We don't do this today, but we could.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could perhaps make this more generic and say "Only operate on cached data"?

Copy link
Member

Choose a reason for hiding this comment

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

I feel like us not doing that automatically (unlike dnf) is an advantage. But definitely open to discuss in the future.

We could perhaps make this more generic and say "Only operate on cached data"?

Sure, SGTM!

@cgwalters
Copy link
Member Author

OK this came up again on internal chat; rebased 🏄 fixed the comment and lifting draft.

jmarrero
jmarrero previously approved these changes Dec 10, 2021
Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

This had the change @jlebon said sgtm to, this also lgtm.

@jlebon jlebon enabled auto-merge December 10, 2021 22:32
For the same reason we have it elsewhere.  Fetching the repomd
is a fine default, but e.g. someone may want to try overriding
using a local package that doesn't need any dependencies when
the machine is offline, or for some reason the rpm-md repositories
aren't accessible.

Motivated by trying to work around an OpenShift MCO issue where
it only provisions an rpm-md repo transitively.
@cgwalters
Copy link
Member Author

Rebased 🏄 to pick up CI fixes - this one just needs a re-stamp

Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

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

lgtm

@jlebon jlebon merged commit eaf2f8a into coreos:main Dec 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants