summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-10-20 11:44:44 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2011-10-20 11:44:44 +0200
commitcf4f17a9d87a36b20ef5afa2cb5145e466d8ad3b (patch)
treeef98bfe313fb16147be056d248885b535e7b2fd4
parentb83f0f06f611657c39dd6d141ce4ff7280ccadf3 (diff)
parentcd5e84440a9bb75a9cc2c142ac8bc214ba57685a (diff)
merged from donkult
-rw-r--r--apt-pkg/packagemanager.cc11
-rw-r--r--debian/changelog9
-rwxr-xr-xtest/integration/test-conflicts-loop19
-rwxr-xr-xtest/integration/test-package-reinstallation8
-rwxr-xr-xtest/integration/test-provides-gone-with-upgrade22
5 files changed, 37 insertions, 32 deletions
diff --git a/apt-pkg/packagemanager.cc b/apt-pkg/packagemanager.cc
index b9ef0f5d7..a97ce4833 100644
--- a/apt-pkg/packagemanager.cc
+++ b/apt-pkg/packagemanager.cc
@@ -551,14 +551,6 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
cout << endl;
}
- // Check if it is already unpacked
- if (Pkg.State() == pkgCache::PkgIterator::NeedsConfigure &&
- Cache[Pkg].Keep() == true)
- {
- cout << OutputInDepth(Depth) << "SmartUnPack called on Package " << Pkg.Name() << " but its unpacked" << endl;
- return false;
- }
-
VerIterator const instVer = Cache[Pkg].InstVerIter(Cache);
/* PreUnpack Checks: This loop checks and attempts to rectify and problems that would prevent the package being unpacked.
@@ -768,7 +760,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg, bool const Immediate, int c
return false;
}
}
- else if (Install(Pkg,FileNames[Pkg->ID]) == false)
+ // packages which are already unpacked don't need to be unpacked again
+ else if (Pkg.State() != pkgCache::PkgIterator::NeedsConfigure && Install(Pkg,FileNames[Pkg->ID]) == false)
return false;
if (Immediate == true) {
diff --git a/debian/changelog b/debian/changelog
index 552597405..98a561698 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+apt (0.8.16~exp8) experimental; urgency=low
+
+ [ David Kalnischkies ]
+ * apt-pkg/packagemanager.cc:
+ - do not fail on unpacked packages in SmartUnPack, just don't
+ shedule them for unpack, but do all checks and configure them
+
+ -- David Kalnischkies <kalnischkies@gmail.com> Mon, 17 Oct 2011 11:21:21 +0200
+
apt (0.8.16~exp7) experimental; urgency=low
[ David Kalnischkies ]
diff --git a/test/integration/test-conflicts-loop b/test/integration/test-conflicts-loop
index f76c016fb..7b5724d74 100755
--- a/test/integration/test-conflicts-loop
+++ b/test/integration/test-conflicts-loop
@@ -15,4 +15,21 @@ insertpackage 'unstable' 'openjdk-6-jre-headless' 'i386' '6b20-1.9.8-0ubuntu1~10
setupaptarchive
-aptget dist-upgrade -s -o Debug::pkgPackageManager=true -o Debug::pkgDpkgPM=true -o APT::Immediate-Configure-All=true
+testequal 'Reading package lists...
+Building dependency tree...
+The following packages will be upgraded:
+ openjdk-6-jre openjdk-6-jre-headless openjdk-6-jre-lib
+3 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
+ openjdk-6-jre-lib conflicts with openjdk-6-jre
+ openjdk-6-jre conflicts with openjdk-6-jre-headless
+ openjdk-6-jre-headless conflicts with openjdk-6-jre
+Remv openjdk-6-jre [6b16-1.8-0ubuntu1]
+ openjdk-6-jre-headless conflicts with openjdk-6-jre-lib
+Remv openjdk-6-jre-lib [6b16-1.8-0ubuntu1]
+Inst openjdk-6-jre-headless [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386])
+ openjdk-6-jre conflicts with openjdk-6-jre-lib
+Inst openjdk-6-jre [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386])
+Inst openjdk-6-jre-lib [6b16-1.8-0ubuntu1] (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386])
+Conf openjdk-6-jre-lib (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386])
+Conf openjdk-6-jre (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386])
+Conf openjdk-6-jre-headless (6b20-1.9.8-0ubuntu1~10.04.1 unstable [i386])' aptget dist-upgrade -s -o APT::Immediate-Configure-All=true
diff --git a/test/integration/test-package-reinstallation b/test/integration/test-package-reinstallation
index 359f69284..b4f2061ec 100755
--- a/test/integration/test-package-reinstallation
+++ b/test/integration/test-package-reinstallation
@@ -14,4 +14,10 @@ insertinstalledpackage 'apt' 'i386' '0.8.15' 'Depends: libc6'
setupaptarchive
-aptget install --reinstall libc6 libc-bin -s -o Debug::pkgPackageManager=1
+testequal 'Reading package lists...
+Building dependency tree...
+0 upgraded, 0 newly installed, 2 reinstalled, 0 to remove and 0 not upgraded.
+Inst libc-bin [2.13-8] (2.13-8 unstable [i386])
+Conf libc-bin (2.13-8 unstable [i386])
+Inst libc6 [2.13-8] (2.13-8 unstable [i386])
+Conf libc6 (2.13-8 unstable [i386])' aptget install --reinstall libc6 libc-bin -s
diff --git a/test/integration/test-provides-gone-with-upgrade b/test/integration/test-provides-gone-with-upgrade
index ece2eaa41..70384ce29 100755
--- a/test/integration/test-provides-gone-with-upgrade
+++ b/test/integration/test-provides-gone-with-upgrade
@@ -13,26 +13,6 @@ Replaces: apt (<< 0.8.15)'
setupaptarchive
-#testequal 'Reading package lists...
-#Building dependency tree...
-#The following NEW packages will be installed:
-# libapt-pkg4.10
-#The following packages will be upgraded:
-# apt
-#1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
-#Inst libapt-pkg4.10 (0.8.15 unstable [i386]) [libapt-pkg4.10:i386 on apt:i386] []
-#Conf libapt-pkg4.10:i386 broken
-# Breaks:apt:i386
-# []
-#Inst apt [0.8.14] (0.8.15 unstable [i386])
-#Conf apt (0.8.15 unstable [i386])
-#E: Conf Broken libapt-pkg4.10:i386'
-aptget dist-upgrade -s -o Debug::pkgPackageManager=1
-# the solution by dpkg will be to deconfigure apt with the configuration of libapt-pkg4.10
-
-exit 0
-
-#FIXME: a good result would be this instead, but it requires that APT can delay his immediate configuration…
testequal 'Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
@@ -40,7 +20,7 @@ The following NEW packages will be installed:
The following packages will be upgraded:
apt
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
+Inst apt [0.8.14] (0.8.15 unstable [i386]) []
Inst libapt-pkg4.10 (0.8.15 unstable [i386])
Conf libapt-pkg4.10 (0.8.15 unstable [i386])
-Inst apt [0.8.14] (0.8.15 unstable [i386])
Conf apt (0.8.15 unstable [i386])' aptget dist-upgrade -s