From ec34aa2256501493d2b0ea01380dd2ce09e68ffb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= Date: Tue, 25 Jul 2023 14:53:49 +0200 Subject: [PATCH] fileprovides: create fileprovides with already present solv files Since dnf4 now also conditionally load filelists it ran into the same problem as dnf5 here: For: https://github.com/rpm-software-management/dnf5/issues/520 Backport the test. For: https://github.com/rpm-software-management/libdnf/pull/1670 --- dnf-behave-tests/dnf/fileprovides.feature | 16 ++++++++++++++++ .../specs/fileprovides/agua-1.0-1.fc29.spec | 19 +++++++++++++++++++ .../specs/fileprovides/planta-1.0-1.fc29.spec | 16 ++++++++++++++++ 3 files changed, 51 insertions(+) create mode 100644 dnf-behave-tests/dnf/fileprovides.feature create mode 100644 dnf-behave-tests/fixtures/specs/fileprovides/agua-1.0-1.fc29.spec create mode 100644 dnf-behave-tests/fixtures/specs/fileprovides/planta-1.0-1.fc29.spec diff --git a/dnf-behave-tests/dnf/fileprovides.feature b/dnf-behave-tests/dnf/fileprovides.feature new file mode 100644 index 000000000..8db7e660e --- /dev/null +++ b/dnf-behave-tests/dnf/fileprovides.feature @@ -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 + """ + + """ diff --git a/dnf-behave-tests/fixtures/specs/fileprovides/agua-1.0-1.fc29.spec b/dnf-behave-tests/fixtures/specs/fileprovides/agua-1.0-1.fc29.spec new file mode 100644 index 000000000..c02d9bca7 --- /dev/null +++ b/dnf-behave-tests/fixtures/specs/fileprovides/agua-1.0-1.fc29.spec @@ -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 diff --git a/dnf-behave-tests/fixtures/specs/fileprovides/planta-1.0-1.fc29.spec b/dnf-behave-tests/fixtures/specs/fileprovides/planta-1.0-1.fc29.spec new file mode 100644 index 000000000..550c4a190 --- /dev/null +++ b/dnf-behave-tests/fixtures/specs/fileprovides/planta-1.0-1.fc29.spec @@ -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