-
Notifications
You must be signed in to change notification settings - Fork 198
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
Conversation
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)
For debugging #720 |
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
☀️ Test successful - status-atomicjenkins |
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
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
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)