Skip to content

Conversation

@liulinC
Copy link
Collaborator

@liulinC liulinC commented Feb 24, 2025

dnf has been updated to dnf5 during clean rebuild event for XS9, The command line interface changed and we need to update accordingly https://dnf5.readthedocs.io/en/latest/changes_from_dnf4.7.html

Following commands update are necessary for DNF5 update

  • updateinfo -> advisory
  • config-manager "--save --setopt" -> "setopt"
  • reposync removed "--downloadcomps" as it is the default behavior
  • repoquery format output no longer has line breaker, add \n in format argument to bring it back and align with YUM
  • repoquery drop "-a" option as it is default behavior Also improve the code with strong type checking
  • Available|Updates for two kinds of updateinfo instead of string

@liulinC
Copy link
Collaborator Author

liulinC commented Feb 24, 2025

  • No regression issue, XS8: 212913 (Dev Run) Repository update pass
  • Fix some XS9 issue, but reminding some issues will be fixed later. 213074 (Dev Run)

dnf has been updated to dnf5 during clean rebuild event for XS9,
The command line interface changed and we need to update accordingly
https://dnf5.readthedocs.io/en/latest/changes_from_dnf4.7.html

Following commands update are necessary for DNF5 update
- updateinfo -> advisory
- config-manager "--save --setopt" -> "setopt"
- reposync removed "--downloadcomps" as it is the default behavior
- repoquery format output no longer has line breaker, add `\n` in
  format argument to bring it back and align with YUM
- repoquery drop "-a" option as it is default behavior
Also improve the code with strong type checking
- Available|Updates for two kinds of updateinfo instead of string

Signed-off-by: Lin Liu <[email protected]>
@psafont
Copy link
Member

psafont commented Feb 24, 2025

I'm urprised all this changes still work with XS8, is it using DNF5 interface in a backwards compatible fashion, so it works with both the old and the new cli interface?

@liulinC
Copy link
Collaborator Author

liulinC commented Feb 24, 2025

I'm urprised all this changes still work with XS8, is it using DNF5 interface in a backwards compatible fashion, so it works with both the old and the new cli interface?

No, XS8 use yum, thus, the command line interface compatibility is broken,
Thus, we use Pkg_mgr to dispatch the command line.

@psafont
Copy link
Member

psafont commented Feb 24, 2025

Ah, yes, I forgot xs8 wasn't using dnf at all

in
ignore (Helpers.call_script ~log_output:Helpers.On_failure cmd params)
let config_repo config =
if List.length config <> 0 then (* Set params to yum/dnf *)
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to test against [].

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

xenrt has covered that.

@liulinC liulinC added this pull request to the merge queue Feb 25, 2025
Merged via the queue into xapi-project:master with commit cadb6d0 Feb 25, 2025
15 checks passed
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