Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.cpp | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp index b892b30..be20c71 100644 --- a/noncore/unsupported/oipkg/packagelist.cpp +++ b/noncore/unsupported/oipkg/packagelist.cpp @@ -35,2 +35,3 @@ void PackageList::insertPackage( Package* pack ) { + if (!pack) return; Package* p = packageList.find( pack->name() ); @@ -38,5 +39,13 @@ void PackageList::insertPackage( Package* pack ) { - p->copyValues( pack ); - delete pack; - pack = p; + if ( p->version() == pack->version() ) + { + p->copyValues( pack ); + delete pack; + pack = p; + } else { + p->setName( pack->name()+"["+p->version()+"]" ); + pack->setName( pack->name()+"["+pack->version()+"]" ); + packageList.insert( pack->name(), pack ); + origPackageList.insert( pack->name(), pack ); + } }else{ @@ -44,4 +53,4 @@ void PackageList::insertPackage( Package* pack ) origPackageList.insert( pack->name(), pack ); - empty=false; }; + empty=false; updateSections( pack ); |