From cf98e689050e851cc4719c4c01fbe8d61e3b3321 Mon Sep 17 00:00:00 2001 From: Martin Vidner Date: Fri, 21 Apr 2006 16:37:01 +0000 Subject: [PATCH] delete only one older version of a xml-store resolvable (half-baked, but the previous attempt was charred) (#160792#c20) --- package/libzypp.changes | 6 ++++++ zypp/target/TargetImpl.cc | 5 ++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/package/libzypp.changes b/package/libzypp.changes index eefb9d8..366b298 100644 --- a/package/libzypp.changes +++ b/package/libzypp.changes @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Apr 21 18:32:00 CEST 2006 - mvidner@suse.cz + +- delete only one older version of a xml-store resolvable + (half-baked, but the previous attempt was charred) + +------------------------------------------------------------------- Fri Apr 21 17:49:18 CEST 2006 - jsrain@suse.de - moved license_to_confirm to primary.xml diff --git a/zypp/target/TargetImpl.cc b/zypp/target/TargetImpl.cc index 73c9961..e547fec 100644 --- a/zypp/target/TargetImpl.cc +++ b/zypp/target/TargetImpl.cc @@ -388,7 +388,10 @@ namespace zypp // #160792 do not just add, also remove older versions if (true) // !installOnly - only on Package?! { - for (PoolItem_Ref old = Helper::findInstalledItem (pool_r, *it); old; ) + // this would delete the same item over and over + //for (PoolItem_Ref old = Helper::findInstalledItem (pool_r, *it); old; ) + PoolItem_Ref old = Helper::findInstalledItem (pool_r, *it); + if (old) { _storage.deleteObject(old.resolvable()); } -- 2.7.4