-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
apps: Consider ID_LIKE for mapping AppStream data packages #19283
Conversation
@leomoty do you mind testing this? It should fix metapackage installation on Rocky with the Refresh button for you. |
Yep, works as intended, albeit we might need to double check the text later, for me it just flickered for about a second. Could be a side effect of my CSS changes in the previous PR. |
9aa513a
to
205e1ce
Compare
if (val[c]) { | ||
val = val[c]; | ||
return true; |
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.
Added a test to cover this.
205e1ce
to
66756c5
Compare
This comment was marked as resolved.
This comment was marked as resolved.
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.
Thanks!
d006eb6
to
4dc8ffc
Compare
If the daemon crashes and goes into a "failed" state, it breaks all subsequent tests. Avoid that.
Use f-strings, and drop the unnecessary (and possibly dangerous) `rm -r` option on restoration. This function already does not work for directories.
With only looking at aos-release's `ID` field, we are missing out a lot of derivatives, such as CentOS Stream, Rocky, or Debian-likes. Consider ID_LIKE as well to fix that. E.g. on Ubuntu, `ID_LIKE` is "debian", on CentOS it's "rhel fedora", on Rocky Linux it's "rhel centos fedora". Use that to clean up the manifest map, as Ubuntu and RHEL are now redundant. testBasic covers the "direct package name" case in the manifest. Add a new testOsMap test to check the distroname → packagename map that we use in real life.
4dc8ffc
to
97d8125
Compare
function get_config(name, distro_id, def) { | ||
function get_config(name, os_release, def) { | ||
// ID is a single value, ID_LIKE is a list | ||
const os_list = [os_release.ID || "", ...(os_release.ID_LIKE || "").split(/\s+/)]; |
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.
This added line is not executed by any test. Details
With only looking at aos-release's
ID
field, we are missing out a lot of derivatives, such as CentOS Stream, Rocky, or Debian-likes. Consider ID_LIKE as well to fix that.E.g. on Ubuntu,
ID_LIKE
is "debian", on CentOS it's "rhel fedora", on Rocky Linux it's "rhel centos fedora".Use that to clean up the manifest map, as Ubuntu and RHEL are now redundant.
Spotted in #19281 (comment)