Skip to content

Commit

Permalink
fileprovides: create fileprovides with already present solv files
Browse files Browse the repository at this point in the history
Since dnf4 now also conditionally load filelists it ran into the
same problem as dnf5 here: For: rpm-software-management/dnf5#520
Backport the test.

For: rpm-software-management/libdnf#1670
  • Loading branch information
kontura authored and ppisar committed Jul 2, 2024
1 parent f51c788 commit ae22372
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
16 changes: 16 additions & 0 deletions dnf-behave-tests/dnf/fileprovides.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
@dnf5
Feature: Adding file provides tests

Scenario: Run repoclosure with already created cache without filelists
Given I enable plugin "repoclosure"
And I use repository "fileprovides"
# We run repoquery --whatprovides to trigger generation of file provides (calling make_provides_ready())
# This command doesn't require filelists.xml
And I successfully execute dnf with args "repoquery --whatprovides htop"
# This command requires filelists.xml
When I execute dnf with args "repoclosure"
Then the exit code is 0
Then stdout is
"""
<REPOSYNC>
"""
19 changes: 19 additions & 0 deletions dnf-behave-tests/fixtures/specs/fileprovides/agua-1.0-1.fc29.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Name: agua
Version: 1.0
Release: 1.fc29
Summary: Made up package

License: GPLv3+
Url: None

%description
agua description

%install
mkdir -p %{buildroot}/a/path/to
touch %{buildroot}/a/path/to/water

%files
/a/path/to/water

%changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Name: planta
Version: 1.0
Release: 1.fc29
Summary: Made up package

License: GPLv3+
Url: None

Requires: /a/path/to/water

%description
planta description

%files

%changelog

0 comments on commit ae22372

Please sign in to comment.