From 018b1439d87c3a6f8599409402e84022702173b0 Mon Sep 17 00:00:00 2001
From: Anders F Bjorklund <afb@users.sourceforge.net>
Date: Thu, 24 Sep 2009 16:10:05 +0200
Subject: [PATCH] also remove upgraded oldversions

---
 src/processarc.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/processarc.c b/src/processarc.c
index 55361a7..ac65269 100644
--- a/src/processarc.c
+++ b/src/processarc.c
@@ -916,6 +916,9 @@ void process_archive(const char *filename) {
    */
   copy_dependency_links(pkg,&pkg->installed.depends,newdeplist,0);
 
+  if (oldversionstatus != stat_notinstalled && oldversionstatus != stat_configfiles)
+    hrmib_cache_remove_package(pkg);
+
   /* The `depended' pointer in the structure doesn't represent anything
    * that is actually specified by this package - it's there so we
    * can find out what other packages refer to this one.  So,
-- 
1.6.0.2

