Skip to content

Conversation

@silug
Copy link
Contributor

@silug silug commented Feb 28, 2025

Fedora 41 introduced dnf5 which has deprecated the use of the flags -d and -e. This change removes the options.

Credit to @larhauga in puppetlabs/puppet#9536

Closes #19

Fedora 41 introduced dnf5 which has deprecated the use of the flags '-d'
and '-e'. This change removes the options

Signed-off-by: Lars Haugan <lars.haugan@sparebank1.no>
@silug
Copy link
Contributor Author

silug commented Feb 28, 2025

I should note that the -d and -e options have been deprecated in dnf since at least EL8 (the oldest EL currently supported). They were entirely removed in dnf5.

@binford2k
Copy link
Contributor

Are they removed with no replacement or should we find an alternate way to get the same functionality?

@Stricken1670
Copy link
Contributor

Here is the original issue:
puppetlabs/puppet#9506
For which 2 PRs have been created:
puppetlabs/puppet#9520 and puppetlabs/puppet#9536
And IMHO, both are trying to fix code with a lot of duplication, which doesn't make the whole thing any better and the reason we are still staring at this problem.

@nmburgan
Copy link
Member

Agree I don't think we need all the code in the Puppet version. I'm not sure if we should use -q or not. -q is recommended in the dnf docs, but I'm not sure if that gets rid of things we try to parse.

Since we are no longer supporting anything pre-el7, I think this should be fine.

@Stricken1670
Copy link
Contributor

Stricken1670 commented Mar 15, 2025

I'm not sure if we should use -q or not. -q is recommended in the dnf docs, but I'm not sure if that gets rid of things we try to parse.

I don't see anything being parsed from the DNF output. If the installation fails the output is displayed to the user, with -q you see enough details, without -q you will see too many details IMHO.

OTOH, I do not want to overcomplicate this excellent PR. We can add the -q option in a concurrent PR.

@nmburgan
Copy link
Member

@nmburgan nmburgan merged commit 20fd636 into OpenVoxProject:main Mar 17, 2025
@Stricken1670
Copy link
Contributor

We at least parse the output here: https://github.com/OpenVoxProject/puppet/pull/20/files#diff-f1faf8e1a8d06a2175e65b961a10236d362326009dd8d0bd4e93898cc2857f39R313

Ah, I missed that. That's no longer necessary. This is on fedora 41:

%  sudo dnf install foobar
Place your right index finger on the fingerprint reader
Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
No match for argument: foobar
You can try to add to command line:
  --skip-unavailable to skip unavailable packages                                                                                                                                                            
%  echo $?
1

And on centos 7

[root@gollum ~]# dnf install foobar
Extra Packages for Enterprise Linux 7 - x86_64                                                                                                0.0  B/s |   0  B     00:00    
CentOS-7 - Base                                                                                                                               0.0  B/s |   0  B     00:00    
CentOS-7 - Updates                                                                                                                            0.0  B/s |   0  B     00:00    
CentOS-7 - Extras                                                                                                                             0.0  B/s |   0  B     00:00    
Failed to synchronize cache for repo 'base', ignoring this repo.
Failed to synchronize cache for repo 'updates', ignoring this repo.
Failed to synchronize cache for repo 'extras', ignoring this repo.
No match for argument: foobar
Error: Unable to find a match: foobar
[root@gollum ~]# echo $?
1

@silug silug deleted the issue_19 branch June 16, 2025 21:51
nmburgan added a commit that referenced this pull request Sep 5, 2025
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.

[Bug]: puppet agent not working with dnf5

5 participants