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

repoquery --qf newline behavior changed #709

Closed
juhp opened this issue Jul 11, 2023 · 5 comments
Closed

repoquery --qf newline behavior changed #709

juhp opened this issue Jul 11, 2023 · 5 comments
Labels
bug Originally reported in Jira or Bugzilla DNF4 compatibility Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take wontfix
Milestone

Comments

@juhp
Copy link

juhp commented Jul 11, 2023

$ sudo dnf-3 rq -q --qf "%{name}" bash coreutils
bash
coreutils
$ rpm -q dnf5
dnf5-5.0.15-2.fc39.x86_64
$ sudo dnf rq -q --qf "%{name}" bash coreutils
bashcoreutils

Yes it may seem a smaller thing, but this change of behavior breaks scripts etc...
(even if consistent with rpmquery).

@juhp
Copy link
Author

juhp commented Jul 13, 2023

Just want to add that this makes it rather hard to support dnf repoquery across dnf-4 and dnf5 since they behave differently.

@jan-kolarik jan-kolarik added the Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take label Jul 13, 2023
@kontura
Copy link
Contributor

kontura commented Jul 17, 2023

I was thinking that the new behavior is not only consistent with rpm --queryformat but it is also more powerful. Before users had to have the new line even if unwanted now they can choose. The option is more flexible.

Since we are switching to dnf5 which includes other changes I thought it was a good time for such an improvement.

However it is indeed a breaking change.

@jan-kolarik jan-kolarik added this to the Fedora 41 milestone Jan 30, 2024
thozza added a commit to thozza/osbuild that referenced this issue Jul 25, 2024
DNF5 contains a breaking change in the repoquery --qf output,
specifically it does not include the trailing newline. This breaks the
test case e.g. on the latest Fedora Rawhide [1].

As a fix, explicitly use 'dnf4' for now, until the inconsistency is
fixed in the upstream [2].

[1] https://artifacts.dev.testing-farm.io/3a3a2898-0a6a-42eb-8792-660f03c35c3c/
[2] rpm-software-management/dnf5#709

Signed-off-by: Tomáš Hozza <[email protected]>
achilleas-k pushed a commit to osbuild/osbuild that referenced this issue Jul 25, 2024
DNF5 contains a breaking change in the repoquery --qf output,
specifically it does not include the trailing newline. This breaks the
test case e.g. on the latest Fedora Rawhide [1].

As a fix, explicitly use 'dnf4' for now, until the inconsistency is
fixed in the upstream [2].

[1] https://artifacts.dev.testing-farm.io/3a3a2898-0a6a-42eb-8792-660f03c35c3c/
[2] rpm-software-management/dnf5#709

Signed-off-by: Tomáš Hozza <[email protected]>
@jan-kolarik jan-kolarik modified the milestones: Fedora 41, Fedora 42 Nov 26, 2024
@jlebon
Copy link
Contributor

jlebon commented Nov 29, 2024

Additionally, \t is no longer interpreted.

jlebon added a commit to jlebon/coreos-assembler that referenced this issue Nov 29, 2024
Fallout from the move to f41 and dnf5.

A few issues: first, looks like Looks like dnf5 repoquery's `--qf` acts
differently. Not only it no longer implicitly emits a newline, but also
it doesn't interpret `\t` anymore. This is tracked at:

rpm-software-management/dnf5#709

Second, `--quiet` is broken and still includes output from progress bar:

rpm-software-management/dnf5#1915

Work around this by using spaces instead of `\t`, adding `\n`, and
prefixing pkg entries with `pkg:`.
jlebon added a commit to coreos/coreos-assembler that referenced this issue Nov 29, 2024
Fallout from the move to f41 and dnf5.

A few issues: first, looks like Looks like dnf5 repoquery's `--qf` acts
differently. Not only it no longer implicitly emits a newline, but also
it doesn't interpret `\t` anymore. This is tracked at:

rpm-software-management/dnf5#709

Second, `--quiet` is broken and still includes output from progress bar:

rpm-software-management/dnf5#1915

Work around this by using spaces instead of `\t`, adding `\n`, and
prefixing pkg entries with `pkg:`.
@ppisar
Copy link
Contributor

ppisar commented Dec 2, 2024

Additionally, \t is no longer interpreted.

I moved your finding to a separate issue #1916 as it is an independent problem.

@ppisar
Copy link
Contributor

ppisar commented Dec 3, 2024

The new-line issue was already rejected by DNF developer in Bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=2324312. Closing this issue.

@ppisar ppisar closed this as completed Dec 3, 2024
@github-project-automation github-project-automation bot moved this from Backlog to Done in DNF team Dec 3, 2024
@ppisar ppisar added wontfix bug Originally reported in Jira or Bugzilla labels Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Originally reported in Jira or Bugzilla DNF4 compatibility Triaged Someone on the DNF 5 team has read the issue and determined the next steps to take wontfix
Projects
Archived in project
Development

No branches or pull requests

6 participants