summaryrefslogtreecommitdiffstats
path: root/tests/t-provides
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 14:58:51 +0000
commitcbffab246997fb5a06211dfb706b54e5ae5bb59f (patch)
tree0573c5d96f58d74d76a49c0f2a70398e389a36d3 /tests/t-provides
parentInitial commit. (diff)
downloaddpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.tar.xz
dpkg-cbffab246997fb5a06211dfb706b54e5ae5bb59f.zip
Adding upstream version 1.21.22.upstream/1.21.22upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/t-provides')
-rw-r--r--tests/t-provides/Makefile307
-rw-r--r--tests/t-provides/pkg-a-depends-ge-lt/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-b-provides-10/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-breaks-eq/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-breaks-ge/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-breaks-le/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-breaks/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-c-provides-20/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-conflicts-eq/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-conflicts-ge/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-conflicts-le/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-conflicts/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-depends-eq/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-depends-ge/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-depends-le/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-depends/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-predepends-eq/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-predepends-ge/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-predepends-le/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-predepends/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-provides-10-20/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-provides-10/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-provides-20/DEBIAN/control8
-rw-r--r--tests/t-provides/pkg-provides/DEBIAN/control8
24 files changed, 491 insertions, 0 deletions
diff --git a/tests/t-provides/Makefile b/tests/t-provides/Makefile
new file mode 100644
index 0000000..6794c20
--- /dev/null
+++ b/tests/t-provides/Makefile
@@ -0,0 +1,307 @@
+TESTS_DEB := \
+ pkg-provides pkg-provides-10 pkg-provides-20 pkg-provides-10-20 \
+ pkg-depends pkg-depends-eq pkg-depends-le pkg-depends-ge \
+ pkg-predepends pkg-predepends-eq pkg-predepends-le pkg-predepends-ge \
+ pkg-breaks pkg-breaks-eq pkg-breaks-le pkg-breaks-ge \
+ pkg-conflicts pkg-conflicts-eq pkg-conflicts-le pkg-conflicts-ge \
+ pkg-a-depends-ge-lt pkg-b-provides-10 pkg-c-provides-20
+
+include ../Test.mk
+
+define PURGE_DEPENDS
+$(DPKG_PURGE) pkg-depends
+$(DPKG_PURGE) pkg-depends-le
+$(DPKG_PURGE) pkg-depends-eq
+$(DPKG_PURGE) pkg-depends-ge
+endef
+
+test-depends:
+ # The provided dependency is not present, fail
+ ! $(DPKG_INSTALL) pkg-depends.deb
+ ! $(DPKG_INSTALL) pkg-depends-eq.deb
+ ! $(DPKG_INSTALL) pkg-depends-le.deb
+ ! $(DPKG_INSTALL) pkg-depends-ge.deb
+
+ # Install the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ $(DPKG_INSTALL) pkg-depends.deb
+ ! $(DPKG_INSTALL) pkg-depends-eq.deb
+ ! $(DPKG_INSTALL) pkg-depends-le.deb
+ ! $(DPKG_INSTALL) pkg-depends-ge.deb
+ # Upgrade the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ ! $(DPKG_PURGE) pkg-provides
+
+ $(PURGE_DEPENDS)
+
+ # Install the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+ $(DPKG_INSTALL) pkg-depends.deb
+ $(DPKG_INSTALL) pkg-depends-le.deb
+ ! $(DPKG_INSTALL) pkg-depends-eq.deb
+ ! $(DPKG_INSTALL) pkg-depends-ge.deb
+ # Upgrade the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+
+ $(PURGE_DEPENDS)
+
+ # Install the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+ $(DPKG_INSTALL) pkg-depends.deb
+ $(DPKG_INSTALL) pkg-depends-eq.deb
+ ! $(DPKG_INSTALL) pkg-depends-le.deb
+ $(DPKG_INSTALL) pkg-depends-ge.deb
+ # Upgrade the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+
+ $(PURGE_DEPENDS)
+
+ # Install the providing package (pkg-virtual 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+ $(DPKG_INSTALL) pkg-depends.deb
+ $(DPKG_INSTALL) pkg-depends-eq.deb
+ $(DPKG_INSTALL) pkg-depends-le.deb
+ $(DPKG_INSTALL) pkg-depends-ge.deb
+ # Upgrade the providing package (pkg-virtual 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+
+ $(PURGE_DEPENDS)
+
+ $(DPKG_PURGE) pkg-provides
+
+ # Install the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-c-provides-20.deb
+ ! $(DPKG_INSTALL) pkg-a-depends-ge-lt.deb
+ $(DPKG_PURGE) pkg-a-depends-ge-lt
+ $(DPKG_PURGE) pkg-c-provides
+
+ # Install the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-b-provides-10.deb
+ $(DPKG_INSTALL) pkg-a-depends-ge-lt.deb
+ # Install the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-c-provides-20.deb
+
+ # Cannot purge the only package satisfying the dependency
+ ! $(DPKG_PURGE) pkg-b-provides
+ # Can purge package not satisfying the dependency
+ $(DPKG_PURGE) pkg-c-provides
+
+ $(DPKG_PURGE) pkg-a-depends-ge-lt
+ $(DPKG_PURGE) pkg-b-provides
+
+ # The provided dependency is removed, pass
+ $(DPKG_PURGE) pkg-provides
+
+define PURGE_PREDEPENDS
+$(DPKG_PURGE) pkg-predepends
+$(DPKG_PURGE) pkg-predepends-le
+$(DPKG_PURGE) pkg-predepends-eq
+$(DPKG_PURGE) pkg-predepends-ge
+endef
+
+test-predepends:
+ # The provided predependency is not present, fail
+ ! $(DPKG_UNPACK) pkg-predepends.deb
+ ! $(DPKG_UNPACK) pkg-predepends-eq.deb
+ ! $(DPKG_UNPACK) pkg-predepends-le.deb
+ ! $(DPKG_UNPACK) pkg-predepends-ge.deb
+
+ # Install the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ $(DPKG_UNPACK) pkg-predepends.deb
+ ! $(DPKG_UNPACK) pkg-predepends-eq.deb
+ ! $(DPKG_UNPACK) pkg-predepends-le.deb
+ ! $(DPKG_UNPACK) pkg-predepends-ge.deb
+ # Upgrade the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ ! $(DPKG_PURGE) pkg-provides
+
+ $(PURGE_PREDEPENDS)
+
+ # Install the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+ $(DPKG_UNPACK) pkg-predepends.deb
+ $(DPKG_UNPACK) pkg-predepends-le.deb
+ ! $(DPKG_UNPACK) pkg-predepends-eq.deb
+ ! $(DPKG_UNPACK) pkg-predepends-ge.deb
+ # Upgrade the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+
+ $(PURGE_PREDEPENDS)
+
+ # Install the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+ $(DPKG_UNPACK) pkg-predepends.deb
+ $(DPKG_UNPACK) pkg-predepends-eq.deb
+ ! $(DPKG_UNPACK) pkg-predepends-le.deb
+ $(DPKG_UNPACK) pkg-predepends-ge.deb
+ # Upgrade the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+
+ $(PURGE_PREDEPENDS)
+
+ # Install the providing package (pkg-virtual 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+ $(DPKG_UNPACK) pkg-predepends.deb
+ $(DPKG_UNPACK) pkg-predepends-eq.deb
+ $(DPKG_UNPACK) pkg-predepends-le.deb
+ $(DPKG_UNPACK) pkg-predepends-ge.deb
+ # Upgrade the providing package (pkg-virtual 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+
+ $(PURGE_PREDEPENDS)
+
+ # The provided predependency is removed, pass
+ $(DPKG_PURGE) pkg-provides
+
+define PURGE_BREAKS
+$(DPKG_PURGE) pkg-breaks
+$(DPKG_PURGE) pkg-breaks-le
+$(DPKG_PURGE) pkg-breaks-eq
+$(DPKG_PURGE) pkg-breaks-ge
+endef
+
+test-breaks:
+ # The provided dependency is not present, pass
+ $(DPKG_INSTALL) pkg-breaks.deb
+ $(DPKG_INSTALL) pkg-breaks-eq.deb
+ $(DPKG_INSTALL) pkg-breaks-le.deb
+ $(DPKG_INSTALL) pkg-breaks-ge.deb
+
+ $(PURGE_BREAKS)
+
+ # Install the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ ! $(DPKG_INSTALL) pkg-breaks.deb
+ $(DPKG_INSTALL) pkg-breaks-eq.deb
+ $(DPKG_INSTALL) pkg-breaks-le.deb
+ $(DPKG_INSTALL) pkg-breaks-ge.deb
+ # Upgrade the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ $(DPKG_PURGE) pkg-provides
+
+ $(PURGE_BREAKS)
+
+ # Install the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+ ! $(DPKG_INSTALL) pkg-breaks.deb
+ ! $(DPKG_INSTALL) pkg-breaks-le.deb
+ $(DPKG_INSTALL) pkg-breaks-eq.deb
+ $(DPKG_INSTALL) pkg-breaks-ge.deb
+ # Upgrade the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+
+ $(PURGE_BREAKS)
+
+ # Install the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+ ! $(DPKG_INSTALL) pkg-breaks.deb
+ ! $(DPKG_INSTALL) pkg-breaks-eq.deb
+ $(DPKG_INSTALL) pkg-breaks-le.deb
+ ! $(DPKG_INSTALL) pkg-breaks-ge.deb
+ # Upgrade the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+
+ $(PURGE_BREAKS)
+
+ # Install the providing package (pkg-virtual 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+ ! $(DPKG_INSTALL) pkg-breaks.deb
+ ! $(DPKG_INSTALL) pkg-breaks-eq.deb
+ ! $(DPKG_INSTALL) pkg-breaks-le.deb
+ ! $(DPKG_INSTALL) pkg-breaks-ge.deb
+ # Upgrade the providing package (pkg-virtual 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+
+ $(PURGE_BREAKS)
+
+ # The provided dependency is removed, pass
+ $(DPKG_PURGE) pkg-provides
+
+define PURGE_CONFLICTS
+$(DPKG_PURGE) pkg-conflicts
+$(DPKG_PURGE) pkg-conflicts-le
+$(DPKG_PURGE) pkg-conflicts-eq
+$(DPKG_PURGE) pkg-conflicts-ge
+endef
+
+test-conflicts:
+ # The provided predependency is not present, fail
+ $(DPKG_UNPACK) pkg-conflicts.deb
+ $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ $(DPKG_UNPACK) pkg-conflicts-le.deb
+ $(DPKG_UNPACK) pkg-conflicts-ge.deb
+
+ $(PURGE_CONFLICTS)
+
+ # Install the providing package (versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ ! $(DPKG_UNPACK) pkg-conflicts.deb
+ $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ $(DPKG_UNPACK) pkg-conflicts-le.deb
+ $(DPKG_UNPACK) pkg-conflicts-ge.deb
+ # Upgrade the providing package (pkg-virtual versionless)
+ $(DPKG_INSTALL) pkg-provides.deb
+ $(DPKG_PURGE) pkg-provides
+
+ $(PURGE_CONFLICTS)
+
+ # Install the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+ ! $(DPKG_UNPACK) pkg-conflicts.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-le.deb
+ $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ $(DPKG_UNPACK) pkg-conflicts-ge.deb
+ # Upgrade the providing package (pkg-virtual 10)
+ $(DPKG_INSTALL) pkg-provides-10.deb
+
+ $(PURGE_CONFLICTS)
+
+ # Install the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+ ! $(DPKG_UNPACK) pkg-conflicts.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ $(DPKG_UNPACK) pkg-conflicts-le.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-ge.deb
+ # Upgrade the providing package (pkg-virtual 20)
+ $(DPKG_INSTALL) pkg-provides-20.deb
+
+ $(PURGE_CONFLICTS)
+
+ # Install the providing package (pkg-virtual 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+ ! $(DPKG_UNPACK) pkg-conflicts.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-eq.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-le.deb
+ ! $(DPKG_UNPACK) pkg-conflicts-ge.deb
+ # Upgrade the providing package (pkg-virtual 10 && 20)
+ $(DPKG_INSTALL) pkg-provides-10-20.deb
+
+ $(PURGE_CONFLICTS)
+
+ # The provided predependency is removed, pass
+ $(DPKG_PURGE) pkg-provides
+
+test-case: test-depends test-predepends test-breaks test-conflicts
+
+test-clean:
+ -$(DPKG_PURGE) pkg-depends
+ -$(DPKG_PURGE) pkg-depends-eq
+ -$(DPKG_PURGE) pkg-depends-ge
+ -$(DPKG_PURGE) pkg-depends-le
+ -$(DPKG_PURGE) pkg-predepends
+ -$(DPKG_PURGE) pkg-predepends-eq
+ -$(DPKG_PURGE) pkg-predepends-ge
+ -$(DPKG_PURGE) pkg-predepends-le
+ -$(DPKG_PURGE) pkg-breaks
+ -$(DPKG_PURGE) pkg-breaks-eq
+ -$(DPKG_PURGE) pkg-breaks-ge
+ -$(DPKG_PURGE) pkg-breaks-le
+ -$(DPKG_PURGE) pkg-conflicts
+ -$(DPKG_PURGE) pkg-conflicts-eq
+ -$(DPKG_PURGE) pkg-conflicts-ge
+ -$(DPKG_PURGE) pkg-conflicts-le
+ -$(DPKG_PURGE) pkg-provides
+ -$(DPKG_PURGE) pkg-a-depends-ge-lt
+ -$(DPKG_PURGE) pkg-b-provides
+ -$(DPKG_PURGE) pkg-c-provides
diff --git a/tests/t-provides/pkg-a-depends-ge-lt/DEBIAN/control b/tests/t-provides/pkg-a-depends-ge-lt/DEBIAN/control
new file mode 100644
index 0000000..77cc4b0
--- /dev/null
+++ b/tests/t-provides/pkg-a-depends-ge-lt/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-a-depends-ge-lt
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-virtual (>= 10), pkg-virtual (<< 20)
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides/pkg-b-provides-10/DEBIAN/control b/tests/t-provides/pkg-b-provides-10/DEBIAN/control
new file mode 100644
index 0000000..105d44c
--- /dev/null
+++ b/tests/t-provides/pkg-b-provides-10/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-b-provides
+Version: 1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-virtual (= 10)
+Description: test package - package providing a versioned virtual package
diff --git a/tests/t-provides/pkg-breaks-eq/DEBIAN/control b/tests/t-provides/pkg-breaks-eq/DEBIAN/control
new file mode 100644
index 0000000..67d20b1
--- /dev/null
+++ b/tests/t-provides/pkg-breaks-eq/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-breaks-eq
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Breaks: pkg-virtual (= 20)
+Description: test package - package breaking on a virtual package
diff --git a/tests/t-provides/pkg-breaks-ge/DEBIAN/control b/tests/t-provides/pkg-breaks-ge/DEBIAN/control
new file mode 100644
index 0000000..33caed5
--- /dev/null
+++ b/tests/t-provides/pkg-breaks-ge/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-breaks-ge
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Breaks: pkg-virtual (>= 20)
+Description: test package - package breaking on a virtual package
diff --git a/tests/t-provides/pkg-breaks-le/DEBIAN/control b/tests/t-provides/pkg-breaks-le/DEBIAN/control
new file mode 100644
index 0000000..05152e2
--- /dev/null
+++ b/tests/t-provides/pkg-breaks-le/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-breaks-le
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Breaks: pkg-virtual (<= 10)
+Description: test package - package breaking on a virtual package
diff --git a/tests/t-provides/pkg-breaks/DEBIAN/control b/tests/t-provides/pkg-breaks/DEBIAN/control
new file mode 100644
index 0000000..6857392
--- /dev/null
+++ b/tests/t-provides/pkg-breaks/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-breaks
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Breaks: pkg-virtual
+Description: test package - package breaking on a virtual package
diff --git a/tests/t-provides/pkg-c-provides-20/DEBIAN/control b/tests/t-provides/pkg-c-provides-20/DEBIAN/control
new file mode 100644
index 0000000..a69d26a
--- /dev/null
+++ b/tests/t-provides/pkg-c-provides-20/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-c-provides
+Version: 2
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-virtual (= 20)
+Description: test package - package providing a versioned virtual package
diff --git a/tests/t-provides/pkg-conflicts-eq/DEBIAN/control b/tests/t-provides/pkg-conflicts-eq/DEBIAN/control
new file mode 100644
index 0000000..ca077d1
--- /dev/null
+++ b/tests/t-provides/pkg-conflicts-eq/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-conflicts-eq
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Conflicts: pkg-virtual (= 20)
+Description: test package - package conflicting on a virtual package
diff --git a/tests/t-provides/pkg-conflicts-ge/DEBIAN/control b/tests/t-provides/pkg-conflicts-ge/DEBIAN/control
new file mode 100644
index 0000000..d93415f
--- /dev/null
+++ b/tests/t-provides/pkg-conflicts-ge/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-conflicts-ge
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Conflicts: pkg-virtual (>= 20)
+Description: test package - package conflicting on a virtual package
diff --git a/tests/t-provides/pkg-conflicts-le/DEBIAN/control b/tests/t-provides/pkg-conflicts-le/DEBIAN/control
new file mode 100644
index 0000000..4f62226
--- /dev/null
+++ b/tests/t-provides/pkg-conflicts-le/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-conflicts-le
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Conflicts: pkg-virtual (<= 10)
+Description: test package - package conflicting on a virtual package
diff --git a/tests/t-provides/pkg-conflicts/DEBIAN/control b/tests/t-provides/pkg-conflicts/DEBIAN/control
new file mode 100644
index 0000000..1b03248
--- /dev/null
+++ b/tests/t-provides/pkg-conflicts/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-conflicts
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Conflicts: pkg-virtual
+Description: test package - package conflicting on a virtual package
diff --git a/tests/t-provides/pkg-depends-eq/DEBIAN/control b/tests/t-provides/pkg-depends-eq/DEBIAN/control
new file mode 100644
index 0000000..b0c1bc5
--- /dev/null
+++ b/tests/t-provides/pkg-depends-eq/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-depends-eq
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-virtual (= 20)
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides/pkg-depends-ge/DEBIAN/control b/tests/t-provides/pkg-depends-ge/DEBIAN/control
new file mode 100644
index 0000000..7c874a4
--- /dev/null
+++ b/tests/t-provides/pkg-depends-ge/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-depends-ge
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-virtual (>= 20)
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides/pkg-depends-le/DEBIAN/control b/tests/t-provides/pkg-depends-le/DEBIAN/control
new file mode 100644
index 0000000..706c086
--- /dev/null
+++ b/tests/t-provides/pkg-depends-le/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-depends-le
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-virtual (<= 10)
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides/pkg-depends/DEBIAN/control b/tests/t-provides/pkg-depends/DEBIAN/control
new file mode 100644
index 0000000..57572b8
--- /dev/null
+++ b/tests/t-provides/pkg-depends/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-depends
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Depends: pkg-virtual
+Description: test package - package depending on a virtual package
diff --git a/tests/t-provides/pkg-predepends-eq/DEBIAN/control b/tests/t-provides/pkg-predepends-eq/DEBIAN/control
new file mode 100644
index 0000000..25b1b46
--- /dev/null
+++ b/tests/t-provides/pkg-predepends-eq/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-predepends-eq
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Pre-Depends: pkg-virtual (= 20)
+Description: test package - package pre-depending on a virtual package
diff --git a/tests/t-provides/pkg-predepends-ge/DEBIAN/control b/tests/t-provides/pkg-predepends-ge/DEBIAN/control
new file mode 100644
index 0000000..65d155f
--- /dev/null
+++ b/tests/t-provides/pkg-predepends-ge/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-predepends-ge
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Pre-Depends: pkg-virtual (>= 20)
+Description: test package - package pre-depending on a virtual package
diff --git a/tests/t-provides/pkg-predepends-le/DEBIAN/control b/tests/t-provides/pkg-predepends-le/DEBIAN/control
new file mode 100644
index 0000000..d95d89b
--- /dev/null
+++ b/tests/t-provides/pkg-predepends-le/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-predepends-le
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Pre-Depends: pkg-virtual (<= 10)
+Description: test package - package pre-depending on a virtual package
diff --git a/tests/t-provides/pkg-predepends/DEBIAN/control b/tests/t-provides/pkg-predepends/DEBIAN/control
new file mode 100644
index 0000000..ca1df84
--- /dev/null
+++ b/tests/t-provides/pkg-predepends/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-predepends
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Pre-Depends: pkg-virtual
+Description: test package - package pre-depending on a virtual package
diff --git a/tests/t-provides/pkg-provides-10-20/DEBIAN/control b/tests/t-provides/pkg-provides-10-20/DEBIAN/control
new file mode 100644
index 0000000..ac83a68
--- /dev/null
+++ b/tests/t-provides/pkg-provides-10-20/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-provides
+Version: 3
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-virtual (= 10), pkg-virtual (= 20)
+Description: test package - package providing a versioned virtual package
diff --git a/tests/t-provides/pkg-provides-10/DEBIAN/control b/tests/t-provides/pkg-provides-10/DEBIAN/control
new file mode 100644
index 0000000..d4014e3
--- /dev/null
+++ b/tests/t-provides/pkg-provides-10/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-provides
+Version: 1
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-virtual (= 10)
+Description: test package - package providing a versioned virtual package
diff --git a/tests/t-provides/pkg-provides-20/DEBIAN/control b/tests/t-provides/pkg-provides-20/DEBIAN/control
new file mode 100644
index 0000000..f923647
--- /dev/null
+++ b/tests/t-provides/pkg-provides-20/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-provides
+Version: 2
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-virtual (= 20)
+Description: test package - package providing a versioned virtual package
diff --git a/tests/t-provides/pkg-provides/DEBIAN/control b/tests/t-provides/pkg-provides/DEBIAN/control
new file mode 100644
index 0000000..10f4932
--- /dev/null
+++ b/tests/t-provides/pkg-provides/DEBIAN/control
@@ -0,0 +1,8 @@
+Package: pkg-provides
+Version: 0
+Section: test
+Priority: extra
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Architecture: all
+Provides: pkg-virtual
+Description: test package - package providing a virtual package