Browse Source

* apt-pkg/algorithms.cc:

- mark all installed packages first without auto installation in
    a dist-upgrade to prefer upgrading packages instead of installing
    new packages in versioned or-groups (Closes: #605394)
tags/debian/0.8.10^2
David Kalnischkies 10 years ago
parent
commit
c427b1e218
5 changed files with 144 additions and 1 deletions
  1. +7
    -0
      apt-pkg/algorithms.cc
  2. +7
    -1
      debian/changelog
  3. +71
    -0
      test/integration/Packages-bug-605394-versioned-or-groups
  4. +34
    -0
      test/integration/status-bug-605394-versioned-or-groups
  5. +25
    -0
      test/integration/test-bug-605394-versioned-or-groups

+ 7
- 0
apt-pkg/algorithms.cc View File

@@ -374,6 +374,13 @@ bool pkgDistUpgrade(pkgDepCache &Cache)
{
pkgDepCache::ActionGroup group(Cache);

/* Upgrade all installed packages first without autoinst to help the resolver
in versioned or-groups to upgrade the old solver instead of installing
a new one (if the old solver is not the first one [anymore]) */
for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; ++I)
if (I->CurrentVer != 0)
Cache.MarkInstall(I, false, 0, false);

/* Auto upgrade all installed packages, this provides the basis
for the installation */
for (pkgCache::PkgIterator I = Cache.PkgBegin(); I.end() == false; I++)


+ 7
- 1
debian/changelog View File

@@ -6,7 +6,13 @@ apt (0.8.10) UNRELEASED; urgency=low
will actually test uncompressed indexes regardless of the internal
default value of Acquire::GzipIndexes.

-- Michael Vogt <mvo@debian.org> Thu, 25 Nov 2010 16:08:01 +0100
[ David Kalnischkies ]
* apt-pkg/algorithms.cc:
- mark all installed packages first without auto installation in
a dist-upgrade to prefer upgrading packages instead of installing
new packages in versioned or-groups (Closes: #605394)

-- David Kalnischkies <kalnischkies@gmail.com> Mon, 29 Nov 2010 21:41:56 +0100

apt (0.8.9) unstable; urgency=low



+ 71
- 0
test/integration/Packages-bug-605394-versioned-or-groups View File

@@ -0,0 +1,71 @@
Package: apache2-mpm-prefork
Priority: optional
Section: httpd
Installed-Size: 68
Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org>
Architecture: i386
Source: apache2
Version: 2.2.16-4
Provides: apache2-mpm
Conflicts: apache2-mpm
Filename: pool/main/a/apache2/apache2-mpm-prefork_2.2.16-4_i386.deb
Size: 2276
MD5Sum: c0db3e637052e59dbdb2fa08f4cdcea4
Description: Apache HTTP Server - traditional non-threaded model
Task: web-server

Package: apache2-mpm-worker
Priority: optional
Section: httpd
Installed-Size: 68
Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org>
Architecture: i386
Source: apache2
Version: 2.2.16-4
Provides: apache2-mpm
Conflicts: apache2-mpm
Filename: pool/main/a/apache2/apache2-mpm-worker_2.2.16-4_i386.deb
Size: 2220
MD5Sum: 71bccda875aa0afac700410b951370ba
Description: Apache HTTP Server - high speed threaded model

Package: libapache2-mod-php5
Priority: optional
Section: httpd
Installed-Size: 7588
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: i386
Source: php5
Version: 5.3.3-4
Depends: apache2-mpm-prefork (>> 2.0.52)
Filename: pool/main/p/php5/libapache2-mod-php5_5.3.3-4_i386.deb
Size: 2886980
MD5Sum: b41ec4b98aa08966288570e07cd864ab
Description: server-side, HTML-embedded scripting language (Apache 2 module)
Task: web-server

Package: php5-cgi
Priority: optional
Section: php
Installed-Size: 14672
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: i386
Source: php5
Version: 5.3.3-4
Filename: pool/main/p/php5/php5-cgi_5.3.3-4_i386.deb
Size: 5713726
MD5Sum: 9e579982032c7bb98508e16e314f45e9
Description: server-side, HTML-embedded scripting language (CGI binary)

Package: php5
Priority: optional
Section: php
Installed-Size: 20
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: all
Version: 5.3.3-4
Depends: libapache2-mod-php5 (>= 5.3.3-4) | php5-cgi (>= 5.3.3-4)
Filename: pool/main/p/php5/php5_5.3.3-4_all.deb
Size: 1050
MD5Sum: cbedd95ed5b868ba1ffd10747abc0ee3
Description: server-side, HTML-embedded scripting language (metapackage)

+ 34
- 0
test/integration/status-bug-605394-versioned-or-groups View File

@@ -0,0 +1,34 @@
Package: apache2-mpm-worker
Status: install ok installed
Priority: optional
Section: httpd
Installed-Size: 68
Maintainer: Debian Apache Maintainers <debian-apache@lists.debian.org>
Architecture: i386
Source: apache2
Version: 2.2.16-4
Provides: apache2-mpm
Conflicts: apache2-mpm
Description: Apache HTTP Server - high speed threaded model

Package: php5-cgi
Status: install ok installed
Priority: optional
Section: php
Installed-Size: 14672
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: i386
Source: php5
Version: 5.3.3-3
Description: server-side, HTML-embedded scripting language (CGI binary)

Package: php5
Status: install ok installed
Priority: optional
Section: php
Installed-Size: 20
Maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Architecture: all
Version: 5.3.3-3
Depends: libapache2-mod-php5 (>= 5.3.3-3) | libapache2-mod-php5filter (>= 5.3.3-3) | php5-cgi (>= 5.3.3-3)
Description: server-side, HTML-embedded scripting language (metapackage)

+ 25
- 0
test/integration/test-bug-605394-versioned-or-groups View File

@@ -0,0 +1,25 @@
#!/bin/sh
set -e

local TESTDIR=$(readlink -f $(dirname $0))
. $TESTDIR/framework
setupenvironment
configarchitecture "i386"
setupaptarchive

testequal "Reading package lists...
Building dependency tree...
The following packages will be upgraded:
php5 php5-cgi
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/5715 kB of archives.
After this operation, 0 B of additional disk space will be used.
E: Trivial Only specified but this is not a trivial operation." aptget dist-upgrade --trivial-only

msgtest "Solution process doesn't involve" 'apache2-mpm-prefork'

if aptget dist-upgrade --trivial-only -o Debug::pkgProblemResolver=1 -o Debug::pkgDepCache::Marker=1 2>&1 | grep apache2-mpm-prefork > /dev/null; then
msgfail
else
msgpass
fi

Loading…
Cancel
Save