summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-18 16:24:48 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-19 08:33:51 +0300
commitd315c9019cf6e43dd7ecfe17e8d3896469396997 (patch)
tree68a54cb549792813700c18f19177bd1c2c52fe56 /test
parentf91b01fea8a0e2b32ccf9d3eea8468d5312633c4 (diff)
downloadapk-tools-d315c9019cf6e43dd7ecfe17e8d3896469396997.tar.bz2
apk-tools-d315c9019cf6e43dd7ecfe17e8d3896469396997.tar.xz
upgrade: new option: --latest (-l)
Select latest version of package (if it is not pinned), and print error if it cannot be installed due to other dependencies. Together with --available, it selects the latest package which is present at least in some repository. This also fixes few solver issues with ordering of package selection that got quite apparent with this flag. Namely, we cannot "lock" a package until it's reverse dependencies are locked or not all of the solver flags are propagated properly.
Diffstat (limited to 'test')
-rw-r--r--test/basic12.test15
-rw-r--r--test/basic13.test10
-rw-r--r--test/error5.test6
3 files changed, 28 insertions, 3 deletions
diff --git a/test/basic12.test b/test/basic12.test
new file mode 100644
index 0000000..f43b8ce
--- /dev/null
+++ b/test/basic12.test
@@ -0,0 +1,15 @@
+@ARGS
+--no-network
+--test-repo basic.repo
+--test-instdb basic.installed
+--test-world a
+--latest
+upgrade
+@EXPECT
+ERROR: unsatisfiable constraints:
+ b-2:
+ masked in: --no-network
+ satisfies: a-2[b]
+ a-2:
+ masked in: --no-network
+ satisfies: world[a]
diff --git a/test/basic13.test b/test/basic13.test
new file mode 100644
index 0000000..40f5bb6
--- /dev/null
+++ b/test/basic13.test
@@ -0,0 +1,10 @@
+@ARGS
+--test-repo basic.repo
+--test-instdb basic.installed
+--test-world a<2
+--latest
+upgrade
+@EXPECT
+ERROR: unsatisfiable constraints:
+ a-2:
+ breaks: world[a<2]
diff --git a/test/error5.test b/test/error5.test
index 949fbe8..4becb3d 100644
--- a/test/error5.test
+++ b/test/error5.test
@@ -3,6 +3,6 @@
add a>2
@EXPECT
ERROR: unsatisfiable constraints:
- d-1.5:
- breaks: a-3[d>1.5]
- satisfies: b-1[d<2.0] c-1[d>1.0]
+ d-2.0:
+ breaks: b-1[d<2.0]
+ satisfies: a-3[d>1.5] c-1[d>1.0]