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: Add journal message for pkg state (repos, solvables) #728

Closed
wants to merge 1 commit into from

Conversation

cgwalters
Copy link
Member

I'm debugging a depsolve failure right now, and just like for
the treecompose case, it's useful to see the information about
enabled repositories. (We should actually maintain this
better in the daemon, but this is a start)

I'm debugging a depsolve failure right now, and just like for
the treecompose case, it's useful to see the information about
enabled repositories.  (We should actually maintain this
better in the daemon, but this is a start)
@cgwalters
Copy link
Member Author

For debugging #720

@cgwalters
Copy link
Member Author

bot, retest this please

@@ -1269,6 +1270,36 @@ rpmostree_context_prepare_install (RpmOstreeContext *self,
hy_goal_install (goal, pkg);
}

{ GPtrArray *repos = dnf_context_get_repos (hifctx);
Copy link
Member

Choose a reason for hiding this comment

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

Could we do this in download_metadata instead? Just so we print it as soon as the information is available.

This will also be triggered in the compose path, right? Not a big deal, though I don't think we actually write anything to the journal right now when composing (and we already print that information on stdout there). Maybe make download_metadata() take a to_stdout to toggle between this and what treecompose is currently printing right now?

Copy link
Member Author

Choose a reason for hiding this comment

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

But a makecache implementation would want to call download_metadata() but not depsolve. That's why I added it to the latter. (And also before we actually do depsolve, so we get it even if the depsolve fails)

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as journal vs stdout...it's a super messy topic right now, and one we need to improve...but I'd like to get more information into the journal today for the client side so we can more easily debug things there. Treecompose is already full of junk to stdout, so more/less doesn't matter too much I'd say.

@jlebon
Copy link
Member

jlebon commented Apr 11, 2017

@rh-atomic-bot r+ 3e58b18

@rh-atomic-bot
Copy link

⌛ Testing commit 3e58b18 with merge 530ab23...

@rh-atomic-bot
Copy link

☀️ Test successful - status-atomicjenkins
Approved by: jlebon
Pushing 530ab23 to master...

jlebon added a commit to jlebon/rpm-ostree that referenced this pull request Apr 13, 2017
In coreos#728, we started querying enabled repos using get_n_solvables().
However, there are different kinds of enabled repos, and
`dnf_repo_get_enabled()` reflects that through the bitmask it returns:
  - DNF_REPO_ENABLED_NONE: repo disabled
  - DNF_REPO_ENABLED_PACKAGES: repo enabled for package installs
  - DNF_REPO_ENABLED_METADATA: repo enabled for metadata

We were treating it as a boolean, though really, we should only print
data about repos with ENABLED_PACKAGES on, which are the actual repos
libdnf can fetch packages from. Repos with only ENABLED_METADATA on are
not fetched by default, and thus will cause SIGSEGV when trying to
get_n_solvables().

I ran into this while trying to debug coreos#720 on F25 AH, which has this
repo by default:

  [fedora-cisco-openh264]
  name=Fedora $releasever openh264 (From Cisco) - $basearch
  baseurl=https://codecs.fedoraproject.org/openh264/$releasever/$basearch/
  enabled=0
  enabled_metadata=1
rh-atomic-bot pushed a commit that referenced this pull request Apr 13, 2017
In #728, we started querying enabled repos using get_n_solvables().
However, there are different kinds of enabled repos, and
`dnf_repo_get_enabled()` reflects that through the bitmask it returns:
  - DNF_REPO_ENABLED_NONE: repo disabled
  - DNF_REPO_ENABLED_PACKAGES: repo enabled for package installs
  - DNF_REPO_ENABLED_METADATA: repo enabled for metadata

We were treating it as a boolean, though really, we should only print
data about repos with ENABLED_PACKAGES on, which are the actual repos
libdnf can fetch packages from. Repos with only ENABLED_METADATA on are
not fetched by default, and thus will cause SIGSEGV when trying to
get_n_solvables().

I ran into this while trying to debug #720 on F25 AH, which has this
repo by default:

  [fedora-cisco-openh264]
  name=Fedora $releasever openh264 (From Cisco) - $basearch
  baseurl=https://codecs.fedoraproject.org/openh264/$releasever/$basearch/
  enabled=0
  enabled_metadata=1

Closes: #736
Approved by: cgwalters
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