summaryrefslogtreecommitdiff
path: root/test/integration/test-apt-cache
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-07-16 11:15:25 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:27:58 +0200
commit8c7af4d4c95d0423fbd0f3baa979792504f4f45f (patch)
tree545fdadc93065512092790b9517b77e4501151e8 /test/integration/test-apt-cache
parentdfe66c72ffc010e019e96b35154e1ad4ab506a6e (diff)
hide implicit deps in apt-cache again by default
Before MultiArch implicits weren't a thing, so they were hidden by default by definition. Adding them for MultiArch solved many problems, but having no reliable way of detecting which dependency (and provides) is implicit or not causes problems everytime we want to output dependencies without confusing our observers with unneeded implementation details. The really notworthy point here is actually that we keep now a better record of how a dependency came to be so that we can later reason about it more easily, but that is hidden so deep down in the library internals that change is more the problems it solves than the change itself.
Diffstat (limited to 'test/integration/test-apt-cache')
-rwxr-xr-xtest/integration/test-apt-cache78
1 files changed, 71 insertions, 7 deletions
diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache
index a22b08c20..a8ddfd889 100755
--- a/test/integration/test-apt-cache
+++ b/test/integration/test-apt-cache
@@ -16,6 +16,9 @@ Recommends: cool (>= 2) | cooler (<< 5)' "$DESCR"
insertpackage 'unstable' 'bar' 'all' '1' 'Depends: bar
Breaks: foo (<< 1)
Replaces: foo (<< 1)' "$DESCR"
+insertpackage 'unstable' 'specific' 'all' '1' 'Depends: bar:i386, specific:amd64
+Breaks: foo:amd64 (<< 1)
+Replaces: foo:i386 (<< 1)' "$DESCR"
setupaptarchive
@@ -44,6 +47,7 @@ testsuccess test -s dump.output
testsuccessequal 'dpkg
bar
+specific
fancy
foo' aptcache pkgnames
testsuccessequal 'bar' aptcache pkgnames bar
@@ -57,29 +61,60 @@ testsuccessequal " foo | 1 | file:$(readlink -f .)/aptarchive uns
testsuccessequal 'foo
Depends: bar
Conflicts: <foobar>
- Conflicts: <foobar:i386>
|Recommends: <cool>
Recommends: <cooler>' aptcache depends foo
testsuccessequal 'foo
Depends: bar
Conflicts: <foobar>
Conflicts: <foobar:i386>
+ |Recommends: <cool>
+ Recommends: <cooler>' aptcache depends foo --implicit
+testsuccessequal 'foo
+ Depends: bar
+ Conflicts: <foobar>
Recommends: <cool>' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1
testsuccessequal 'foo
Depends: bar
Conflicts: <foobar>
Conflicts: <foobar:i386>
+ Recommends: <cool>' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1 --implicit
+testsuccessequal 'foo
+ Depends: bar
+ Conflicts: <foobar>
|Recommends: <cool> (>= 2)
Recommends: <cooler> (<< 5)' aptcache depends foo -o APT::Cache::ShowVersion=1
testsuccessequal 'foo
Depends: bar
Conflicts: <foobar>
- Conflicts: <foobar:i386>' aptcache depends foo --no-recommends
+ Conflicts: <foobar:i386>
+ |Recommends: <cool> (>= 2)
+ Recommends: <cooler> (<< 5)' aptcache depends foo -o APT::Cache::ShowVersion=1 --implicit
testsuccessequal 'foo
- Depends: bar' aptcache depends foo --important
+ Depends: bar
+ Conflicts: <foobar>' aptcache depends foo --no-recommends
+testsuccessequal 'foo
+ Depends: bar
+ Conflicts: <foobar>
+ Conflicts: <foobar:i386>' aptcache depends foo --no-recommends --implicit
+testsuccessequal 'foo
+ Depends: bar' aptcache depends foo --important --implicit
testsuccessequal 'foo
+ Conflicts: <foobar>' aptcache depends foo --important --no-depends --conflicts
+testsuccessequal 'foo
+ Conflicts: <foobar>
+ Conflicts: <foobar:i386>' aptcache depends foo --important --no-depends --conflicts --implicit
+testsuccessequal 'foo
+ Depends: bar
Conflicts: <foobar>
- Conflicts: <foobar:i386>' aptcache depends foo --important --no-depends --conflicts
+ |Recommends: <cool>
+ Recommends: <cooler>
+bar
+ Depends: bar
+ Breaks: foo
+ Replaces: foo
+<foobar>
+<cool>
+<cooler>' aptcache depends foo --recurse
testsuccessequal 'foo
Depends: bar
Conflicts: <foobar>
@@ -96,29 +131,58 @@ bar
<foobar:i386>
<cool>
<cooler>
-<foo:i386>' aptcache depends foo --recurse
+<foo:i386>' aptcache depends foo --recurse --implicit
+testsuccessequal 'foo
+ Depends: bar
+bar
+ Depends: bar
+ Replaces: foo' aptcache depends foo --recurse --important --replaces
testsuccessequal 'foo
Depends: bar
bar
Depends: bar
Replaces: foo
Replaces: <foo:i386>
-<foo:i386>' aptcache depends foo --recurse --important --replaces
+<foo:i386>' aptcache depends foo --recurse --important --replaces --implicit
+testsuccessequal 'bar
+ Depends: bar
+ Breaks: foo
+ Replaces: foo' aptcache depends bar
+testsuccessequal 'bar
+ Depends: bar
+ Breaks: foo
+ Breaks: <foo:i386>
+ Replaces: foo
+ Replaces: <foo:i386>' aptcache depends bar --implicit
+testsuccessequal 'specific
+ Depends: <bar:i386>
+ Depends: specific:amd64
+ Breaks: foo:amd64
+ Replaces: <foo:i386>' aptcache depends specific
+testsuccessequal 'specific
+ Depends: <bar:i386>
+ Depends: specific:amd64
+ Breaks: foo:amd64
+ Replaces: <foo:i386>' aptcache depends specific --implicit
## rdpends
testsuccessequal 'foo
Reverse Depends:
bar
+ specific
bar' aptcache rdepends foo
testsuccessequal 'foo
Reverse Depends:
Breaks: bar
+ Breaks: specific
Replaces: bar' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1
testsuccessequal 'foo
Reverse Depends:
Breaks: bar (<< 1)
+ Breaks: specific (<< 1)
Replaces: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1
testsuccessequal 'foo
Reverse Depends:
- Breaks: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks
+ Breaks: bar (<< 1)
+ Breaks: specific (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 --important --breaks