author | tille <tille> | 2002-05-04 14:09:41 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-04 14:09:41 (UTC) |
commit | 27f8629d4e6e16e9a33410ffe650f4a6d0bb17be (patch) (side-by-side diff) | |
tree | 924a9449cff5d062d421f580644ea98ab8f42429 /noncore/unsupported/oipkg/packagelist.cpp | |
parent | 4eddfebd1b4f70bbfe9106a16e9a3eeb6601f653 (diff) | |
download | opie-27f8629d4e6e16e9a33410ffe650f4a6d0bb17be.zip opie-27f8629d4e6e16e9a33410ffe650f4a6d0bb17be.tar.gz opie-27f8629d4e6e16e9a33410ffe650f4a6d0bb17be.tar.bz2 |
version handling
Diffstat (limited to 'noncore/unsupported/oipkg/packagelist.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/unsupported/oipkg/packagelist.cpp | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/noncore/unsupported/oipkg/packagelist.cpp b/noncore/unsupported/oipkg/packagelist.cpp index be20c71..2fc4c41 100644 --- a/noncore/unsupported/oipkg/packagelist.cpp +++ b/noncore/unsupported/oipkg/packagelist.cpp @@ -9,2 +9,4 @@ +static QDict<Package> *packageListAll; + PackageList::PackageList() @@ -13,2 +15,3 @@ PackageList::PackageList() empty=true; + if (!packageListAll) packageListAll = new QDict<Package>(); sections << "All"; @@ -36,6 +39,7 @@ void PackageList::insertPackage( Package* pack ) if (!pack) return; - Package* p = packageList.find( pack->name() ); + Package* p = packageListAll->find( pack->name() ); if ( p ) { - if ( p->version() == pack->version() ) + if ( (p->version() == pack->version()) + && (p->dest() == pack->dest()) ) { @@ -45,4 +49,14 @@ void PackageList::insertPackage( Package* pack ) } else { - p->setName( pack->name()+"["+p->version()+"]" ); + QDict<Package> *packver = p->getOtherVersions(); +// p->setName( pack->name()+"["+p->version()+"]" ); + if (!packver) + { + packver = new QDict<Package>; + packver->insert( pack->name(), p ); + p->setOtherVersions( packver ); + } pack->setName( pack->name()+"["+pack->version()+"]" ); + pack->setOtherVersions( packver ); + packver->insert( pack->name(), pack ); + packageListAll->insert( pack->name(), pack ); packageList.insert( pack->name(), pack ); @@ -51,2 +65,3 @@ void PackageList::insertPackage( Package* pack ) }else{ + packageListAll->insert( pack->name(), pack ); packageList.insert( pack->name(), pack ); |