X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d61960d9244340956a27f4ca46aecd15cc75e18b..9bfb1136abfd58e48545304507dedceb2fe87a36:/test/integration/test-apt-cache diff --git a/test/integration/test-apt-cache b/test/integration/test-apt-cache index f47c0e08b..7927686fc 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 @@ -42,83 +45,132 @@ testsuccess aptcache dump cp rootdir/tmp/testsuccess.output dump.output testsuccess test -s dump.output -testequal 'dpkg +testsuccessequal 'dpkg bar +specific fancy foo' aptcache pkgnames -testequal 'bar' aptcache pkgnames bar -testequal 'fancy +testsuccessequal 'bar' aptcache pkgnames bar +testsuccessequal 'fancy foo' aptcache pkgnames f -testequal " foo | 1 | file:$(readlink -f .)/aptarchive/ unstable/main amd64 Packages" aptcache madison foo +testsuccessequal " foo | 1 | file:$(readlink -f .)/aptarchive unstable/main amd64 Packages + foo | 1 | file:$(readlink -f .)/aptarchive unstable/main i386 Packages" aptcache madison foo ### depends -testequal 'foo +testsuccessequal 'foo Depends: bar + Conflicts: |Recommends: - Recommends: + Recommends: ' aptcache depends foo +testsuccessequal 'foo + Depends: bar Conflicts: - Conflicts: ' aptcache depends foo -testequal 'foo + |Recommends: + Recommends: ' aptcache depends foo --implicit +testsuccessequal 'foo Depends: bar - Recommends: Conflicts: - Conflicts: ' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1 -testequal 'foo + Recommends: ' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1 +testsuccessequal 'foo Depends: bar - |Recommends: (>= 2) - Recommends: (<< 5) Conflicts: - Conflicts: ' aptcache depends foo -o APT::Cache::ShowVersion=1 -testequal 'foo + Recommends: ' aptcache depends foo -o APT::Cache::ShowOnlyFirstOr=1 --implicit +testsuccessequal 'foo Depends: bar Conflicts: - Conflicts: ' aptcache depends foo --no-recommends -testequal 'foo - Depends: bar' aptcache depends foo --important -testequal 'foo + |Recommends: (>= 2) + Recommends: (<< 5)' aptcache depends foo -o APT::Cache::ShowVersion=1 +testsuccessequal 'foo + Depends: bar Conflicts: - Conflicts: ' aptcache depends foo --important --no-depends --conflicts -testequal 'foo + |Recommends: (>= 2) + Recommends: (<< 5)' aptcache depends foo -o APT::Cache::ShowVersion=1 --implicit +testsuccessequal 'foo Depends: bar + Conflicts: ' aptcache depends foo --no-recommends +testsuccessequal 'foo + Depends: bar + Conflicts: ' aptcache depends foo --no-recommends --implicit +testsuccessequal 'foo + Depends: bar' aptcache depends foo --important --implicit +testsuccessequal 'foo + Conflicts: ' aptcache depends foo --important --no-depends --conflicts +testsuccessequal 'foo + Conflicts: ' aptcache depends foo --important --no-depends --conflicts --implicit +testsuccessequal 'foo + Depends: bar + Conflicts: |Recommends: Recommends: - Conflicts: - Conflicts: bar Depends: bar Breaks: foo - Breaks: Replaces: foo - Replaces: - - - -' aptcache depends foo --recurse -testequal 'foo + +' aptcache depends foo --recurse +testsuccessequal 'foo Depends: bar + Conflicts: + |Recommends: + Recommends: bar Depends: bar + Breaks: foo Replaces: foo - Replaces: -' aptcache depends foo --recurse --important --replaces + + +' 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' aptcache depends foo --recurse --important --replaces --implicit +testsuccessequal 'bar + Depends: bar + Breaks: foo + Replaces: foo' aptcache depends bar +testsuccessequal 'bar + Depends: bar + Breaks: foo + Replaces: foo' aptcache depends bar --implicit + +testsuccessequal 'specific + Depends: + Depends: + specific + Breaks: + Replaces: ' aptcache depends specific +testsuccessequal 'specific + Depends: + Depends: + specific + Breaks: + Replaces: ' aptcache depends specific --implicit -## rdpends +## rdepends -testequal 'foo +# Note that specific does not appear in this list as it doesn't depend on foo, +# but on an arch-specific foo! +testsuccessequal 'foo Reverse Depends: bar bar' aptcache rdepends foo -testequal 'foo +testsuccessequal 'foo Reverse Depends: - Replaces: bar - Breaks: bar' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -testequal 'foo + Breaks: bar + Replaces: bar' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 +testsuccessequal 'foo Reverse Depends: - Replaces: bar (<< 1) - Breaks: bar (<< 1)' aptcache rdepends foo -o APT::Cache::ShowDependencyType=1 -o APT::Cache::ShowVersion=1 -testequal 'foo + Breaks: bar (<< 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