summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-10-29 05:18:21 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-10-29 05:18:21 +0300
commit500f8d4a7d7b17871647392e79e4c7a17c210534 (patch)
tree47d4b1cd04e374d88e26e352eeac9f51da083451 /test
parente682e6596c101d634b3780a98773c8433b3baadb (diff)
downloadapk-tools-500f8d4a7d7b17871647392e79e4c7a17c210534.tar.gz
apk-tools-500f8d4a7d7b17871647392e79e4c7a17c210534.tar.bz2
apk-tools-500f8d4a7d7b17871647392e79e4c7a17c210534.tar.xz
apk-tools-500f8d4a7d7b17871647392e79e4c7a17c210534.zip
solver, db: implement repository pinning
Improves /etc/apk/repositories format so you can say: http://nl.alpinelinux.org/alpine/v2.3/main @edge http://nl.alpinelinux.org/alpine/edge/main @testing http://nl.alpinelinux.org/alpine/edge/testing After which you can pin dependencies to these tags using: apk add stableapp newapp@edge bleedingapp@testing Apk will now by default only use the untagged repositories, but adding a tag to specific dependency: 1. will prefer that tag for the name 2. allowing pulling in dependencies from that tag (though, it prefers untagged packages to satisfy deps if possible) fixes #575
Diffstat (limited to 'test')
-rw-r--r--test/pinning.repo20
-rw-r--r--test/pinning1.expect2
-rw-r--r--test/pinning1.test2
-rw-r--r--test/pinning2.expect2
-rw-r--r--test/pinning2.test2
-rw-r--r--test/pinning3.expect2
-rw-r--r--test/pinning3.test2
-rw-r--r--test/pinning4.expect3
-rw-r--r--test/pinning4.test2
9 files changed, 37 insertions, 0 deletions
diff --git a/test/pinning.repo b/test/pinning.repo
new file mode 100644
index 0000000..c41ddf7
--- /dev/null
+++ b/test/pinning.repo
@@ -0,0 +1,20 @@
+C:Q1eVpkasfqZAukAXFYbgwt4xffZWU=
+P:a
+V:3
+S:1
+I:1
+D:b
+
+C:Q1hdUpqRv5mYgJEqW52UmVsv23ysE=
+P:b
+V:3
+S:1
+I:1
+
+C:Q1eVpkasfqZAukAXFYbg324xAt4WU=
+P:c
+V:3
+S:1
+I:1
+D:a>=3
+
diff --git a/test/pinning1.expect b/test/pinning1.expect
new file mode 100644
index 0000000..81756fe
--- /dev/null
+++ b/test/pinning1.expect
@@ -0,0 +1,2 @@
+Installing b (2)
+Installing a (2)
diff --git a/test/pinning1.test b/test/pinning1.test
new file mode 100644
index 0000000..4396875
--- /dev/null
+++ b/test/pinning1.test
@@ -0,0 +1,2 @@
+--raw-repository basic.repo --raw-repository +pinning.repo
+a
diff --git a/test/pinning2.expect b/test/pinning2.expect
new file mode 100644
index 0000000..cce6084
--- /dev/null
+++ b/test/pinning2.expect
@@ -0,0 +1,2 @@
+Installing b (2)
+Installing a (3)
diff --git a/test/pinning2.test b/test/pinning2.test
new file mode 100644
index 0000000..69d4f79
--- /dev/null
+++ b/test/pinning2.test
@@ -0,0 +1,2 @@
+--raw-repository basic.repo --raw-repository +pinning.repo
+a@testing
diff --git a/test/pinning3.expect b/test/pinning3.expect
new file mode 100644
index 0000000..a2b2fca
--- /dev/null
+++ b/test/pinning3.expect
@@ -0,0 +1,2 @@
+Installing b (3)
+Installing a (3)
diff --git a/test/pinning3.test b/test/pinning3.test
new file mode 100644
index 0000000..220f128
--- /dev/null
+++ b/test/pinning3.test
@@ -0,0 +1,2 @@
+--raw-repository basic.repo --raw-repository +pinning.repo
+a@testing b@testing
diff --git a/test/pinning4.expect b/test/pinning4.expect
new file mode 100644
index 0000000..5a03102
--- /dev/null
+++ b/test/pinning4.expect
@@ -0,0 +1,3 @@
+Installing b (2)
+Installing a (3)
+Installing c (3)
diff --git a/test/pinning4.test b/test/pinning4.test
new file mode 100644
index 0000000..4bf8d38
--- /dev/null
+++ b/test/pinning4.test
@@ -0,0 +1,2 @@
+--raw-repository basic.repo --raw-repository +pinning.repo
+c@testing