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

Remove --duplicates and --oldinstallonly exit with 0 when nothing to remove #1481

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions dnf-behave-tests/dnf/installonly.feature
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,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!
"""


# TODO(jkolarik): autoremove not yet available in dnf5
# @dnf5
@bz1934499
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!
"""

Loading