Skip to content

Commit

Permalink
Remove --duplicates and --oldinstallonly exit with 0 when nothing to …
Browse files Browse the repository at this point in the history
…remove

Upstream commit: b77498d
For: https://issues.redhat.com/browse/RHEL-6424
  • Loading branch information
pkratoch committed May 22, 2024
1 parent 06d8c8c commit 011c73c
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
15 changes: 15 additions & 0 deletions dnf-behave-tests/dnf/installonly.feature
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,21 @@ Scenario: Remove all installonly packages but keep the latest and running kernel
| unchanged | kernel-core-0:4.18.16-300.fc29.x86_64 |


Scenario: When there are no old installonly packages to be removed, exit with 0
When I execute dnf with args "remove --oldinstallonly"
Then the exit code is 0
And Transaction is empty
And stderr is empty
And stdout is
"""
<REPOSYNC>
No old installonly packages found for removal.
Dependencies resolved.
Nothing to do.
Complete!
"""


@dnf5
@bz1934499
@bz1921063
Expand Down
17 changes: 17 additions & 0 deletions dnf-behave-tests/dnf/remove-duplicates.feature
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,20 @@ Scenario: Remove a duplicate RPM and reinstall an existing RPM when a copy is av
| Action | Package |
| reinstall | flac-0:1.3.3-3.fc29.x86_64 |
| obsoleted | flac-0:1.3.3-1.fc29.x86_64 |


@RHEL-6424
Scenario: When there are no duplicates to be removed, exit with 0
When I execute dnf with args "remove --duplicates"
Then the exit code is 0
And Transaction is empty
And stderr is empty
And stdout is
"""
<REPOSYNC>
No duplicated packages found for removal.
Dependencies resolved.
Nothing to do.
Complete!
"""

0 comments on commit 011c73c

Please sign in to comment.