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

core: Don't try to update libdnf _TYPE_MEDIA repos #1703

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cgwalters
Copy link
Member

Ref: https://discussion.fedoraproject.org/t/rpm-ostree-giving-error/772/2
Currently plugging in a live USB will auto-create a media repo
and then cause rpm-ostree to error out.

I think we should really change libdnf to silently do nothing for
this rather than error out, but that blocks on the rebase.

Ref: https://discussion.fedoraproject.org/t/rpm-ostree-giving-error/772/2
Currently plugging in a live USB will auto-create a `media` repo
and then cause rpm-ostree to error out.

I think we should really change libdnf to silently do nothing for
this rather than error out, but that blocks on the rebase.
if (dnf_repo_get_kind (repo) != DNF_REPO_KIND_MEDIA)
{
if (!dnf_repo_update (repo, DNF_REPO_UPDATE_FLAG_FORCE, hifstate, error))
return FALSE;
Copy link
Member

Choose a reason for hiding this comment

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

Were you able to test this out?
ISTM like dnf_repo_update would still be called on that repo when we do dnf_context_setup_sack_with_flags() below, no? The flow there is similar to what we have here:

    ret = dnf_repo_check(repo,
                         permissible_cache_age,
                         state_local,
                         &error_local);
    if (!ret) {
        g_debug("failed to check, attempting update: %s",
                error_local->message);
        g_clear_error(&error_local);
        dnf_state_reset(state_local);
        ret = dnf_repo_update(repo,
                              DNF_REPO_UPDATE_FLAG_FORCE,
                              state_local,
                              &error_local);

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah yeah, should have noted I didn't test it beyond compilation. Looks like you're right.

@sramkrishna
Copy link

This problem occurs if you have an opensuse tumbleweed net install image on an usb stick.

@cgwalters
Copy link
Member Author

A google search led me to https://bugzilla.redhat.com/show_bug.cgi?id=1716067 which links to rpm-software-management/libdnf#838 which claims to fix this.

@openshift-ci-robot
Copy link
Collaborator

@cgwalters: PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci
Copy link

openshift-ci bot commented Jun 6, 2023

@cgwalters: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/build 29a16d3 link /test build
ci/prow/unit 29a16d3 link /test unit
ci/prow/images 29a16d3 link true /test images
ci/prow/clang-analyzer 29a16d3 link true /test clang-analyzer
ci/prow/build-clang 29a16d3 link true /test build-clang
ci/prow/fcos-e2e 29a16d3 link true /test fcos-e2e
ci/prow/kola-upgrade 29a16d3 link true /test kola-upgrade

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

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