diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-10-04 00:14:38 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-10-04 00:14:38 +0200 |
commit | 061c58b61ab5aae4689386bd2ab1e36e71470dfc (patch) | |
tree | 6f7f7ee29837399639f1e87fb627e8e7127581e6 | |
parent | a91cb9542572fe5aa279db5ac5d28465bec1905f (diff) |
* apt-pkg/policy.cc:
- accept generic release pin expressions again in -t (Closes: #644166)
-rw-r--r-- | apt-pkg/policy.cc | 3 | ||||
-rw-r--r-- | debian/changelog | 4 | ||||
-rwxr-xr-x | test/integration/test-bug-407511-fail-invalid-default-release | 23 |
3 files changed, 26 insertions, 4 deletions
diff --git a/apt-pkg/policy.cc b/apt-pkg/policy.cc index 6a5130d48..a369bea83 100644 --- a/apt-pkg/policy.cc +++ b/apt-pkg/policy.cc @@ -64,7 +64,8 @@ pkgPolicy::pkgPolicy(pkgCache *Owner) : Pins(0), PFPriority(0), Cache(Owner) { if ((F->Archive != 0 && vm.ExpressionMatches(DefRel, F.Archive()) == true) || (F->Codename != 0 && vm.ExpressionMatches(DefRel, F.Codename()) == true) || - (F->Version != 0 && vm.ExpressionMatches(DefRel, F.Version()) == true)) + (F->Version != 0 && vm.ExpressionMatches(DefRel, F.Version()) == true) || + (DefRel.length() > 2 && DefRel[1] == '=')) found = true; } if (found == false) diff --git a/debian/changelog b/debian/changelog index 3c895813f..6a27ff49a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -15,8 +15,10 @@ apt (0.8.15.9) UNRELEASED; urgency=low - if a package is garbage, don't try to save it with FixByInstall * apt-pkg/init.cc: - silently ignore *.orig and *.save files by default + * apt-pkg/policy.cc: + - accept generic release pin expressions again in -t (Closes: #644166) - -- David Kalnischkies <kalnischkies@gmail.com> Wed, 21 Sep 2011 19:36:45 +0200 + -- David Kalnischkies <kalnischkies@gmail.com> Mon, 03 Oct 2011 23:35:40 +0200 apt (0.8.15.8) unstable; urgency=low diff --git a/test/integration/test-bug-407511-fail-invalid-default-release b/test/integration/test-bug-407511-fail-invalid-default-release index d0a73af7d..7f23a1e82 100755 --- a/test/integration/test-bug-407511-fail-invalid-default-release +++ b/test/integration/test-bug-407511-fail-invalid-default-release @@ -23,18 +23,31 @@ getreleaseversionfromsuite() { fi } +getlabelfromsuite() { + if [ "$SUITE" = 'unstable' ]; then + echo -n 'UnstableTestcases' + else + echo -n 'Testcases' + fi +} + setupaptarchive passdist() { - msgtest "Test that target-release is accepted" $1 + msgtest 'Test that target-release is accepted' $1 aptget dist-upgrade -t $1 -qq && msgpass || msgfail + msgtest 'Test that target-release pins with' $1 + aptcache policy -t $1 | grep -q ' 990' && msgpass || msgfail } faildist() { - msgtest "Test that target-release is refused" $1 + msgtest 'Test that target-release is refused' $1 aptget dist-upgrade -t $1 -qq 2> /dev/null && msgfail || msgpass } +msgtest 'Test that no default-release is active in this test' 'setup' +aptcache policy | grep -q ' 990' && msgfall || msgpass + passdist unstable passdist sid faildist sidd @@ -45,3 +58,9 @@ passdist 42* passdist 4*.0 faildist 21.0 faildist 21* +# we accept, but don't validate the following +passdist a=unstable +passdist n=sid +passdist v=42.0 +passdist c=main +passdist l=UnstableTestcases |