libsolv/0003-Add-testcases-for-POOL_FLAG_WHATPROVIDESWITHDISABLED.patch
Jaroslav Mracek 60f4ec4304 Backport support of POOL_FLAG_WHATPROVIDESWITHDISABLED
It is required for "dnf builddep --best" with modular repositories.
2019-10-14 14:42:51 +02:00

111 lines
3.3 KiB
Diff

From 7477a28ca57c9fd2df73e24a36d2a0f0734662ef Mon Sep 17 00:00:00 2001
From: Michael Schroeder <mls@suse.de>
Date: Tue, 8 Oct 2019 13:41:45 +0200
Subject: [PATCH] Add testcases for POOL_FLAG_WHATPROVIDESWITHDISABLED
---
test/testcases/whatprovideswithdisabled/dup.t | 14 ++++++++++++++
test/testcases/whatprovideswithdisabled/dup2.t | 14 ++++++++++++++
test/testcases/whatprovideswithdisabled/forcebest_in.t | 19 +++++++++++++++++++
test/testcases/whatprovideswithdisabled/forcebest_up.t | 20 ++++++++++++++++++++
4 files changed, 67 insertions(+)
create mode 100644 test/testcases/whatprovideswithdisabled/dup.t
create mode 100644 test/testcases/whatprovideswithdisabled/dup2.t
create mode 100644 test/testcases/whatprovideswithdisabled/forcebest_in.t
create mode 100644 test/testcases/whatprovideswithdisabled/forcebest_up.t
diff --git a/test/testcases/whatprovideswithdisabled/dup.t b/test/testcases/whatprovideswithdisabled/dup.t
new file mode 100644
index 0000000..825a0c4
--- /dev/null
+++ b/test/testcases/whatprovideswithdisabled/dup.t
@@ -0,0 +1,14 @@
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Vnd: foo
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+system i686 rpm system
+poolflags whatprovideswithdisabled
+
+disable pkg A-2-1.noarch@available
+
+job distupgrade all packages
+result transaction,problems <inline>
+
diff --git a/test/testcases/whatprovideswithdisabled/dup2.t b/test/testcases/whatprovideswithdisabled/dup2.t
new file mode 100644
index 0000000..40fe69e
--- /dev/null
+++ b/test/testcases/whatprovideswithdisabled/dup2.t
@@ -0,0 +1,14 @@
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Vnd: foo
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+system i686 rpm system
+poolflags whatprovideswithdisabled
+
+disable pkg A-1-1.noarch@system
+
+job distupgrade all packages
+result transaction,problems <inline>
+
diff --git a/test/testcases/whatprovideswithdisabled/forcebest_in.t b/test/testcases/whatprovideswithdisabled/forcebest_in.t
new file mode 100644
index 0000000..da5a440
--- /dev/null
+++ b/test/testcases/whatprovideswithdisabled/forcebest_in.t
@@ -0,0 +1,19 @@
+repo system 0 testtags <inline>
+#>=Pkg: D 1 1 noarch
+#>=Vnd: foo
+#>=Con: A = 3-1
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+#>=Pkg: A 3 1 noarch
+#>=Vnd: bar
+system i686 rpm system
+
+poolflags whatprovideswithdisabled
+disable pkg A-3-1.noarch@available
+
+job install name A [forcebest]
+result transaction,problems <inline>
+#>install A-2-1.noarch@available
+
+
diff --git a/test/testcases/whatprovideswithdisabled/forcebest_up.t b/test/testcases/whatprovideswithdisabled/forcebest_up.t
new file mode 100644
index 0000000..f6f5379
--- /dev/null
+++ b/test/testcases/whatprovideswithdisabled/forcebest_up.t
@@ -0,0 +1,20 @@
+repo system 0 testtags <inline>
+#>=Pkg: A 1 1 noarch
+#>=Vnd: foo
+#>=Pkg: D 1 1 noarch
+#>=Vnd: foo
+#>=Con: A = 3-1
+repo available 0 testtags <inline>
+#>=Pkg: A 2 1 noarch
+#>=Vnd: foo
+#>=Pkg: A 3 1 noarch
+#>=Vnd: bar
+system i686 rpm system
+
+poolflags whatprovideswithdisabled
+disable pkg A-3-1.noarch@available
+
+job install name A [forcebest]
+result transaction,problems <inline>
+#>upgrade A-1-1.noarch@system A-2-1.noarch@available
+
--
libgit2 0.28.2