author | tille <tille> | 2002-05-01 15:49:08 (UTC) |
---|---|---|
committer | tille <tille> | 2002-05-01 15:49:08 (UTC) |
commit | da94bce203afca412336a7793ff8e58e18d59108 (patch) (unidiff) | |
tree | 0bc25fd1145459656d8cc7a4897bad51f123daf9 /noncore/unsupported/oipkg/packagelist.cpp | |
parent | fcc0cee7ae337e8179b8ba4d4b6c46b519129daa (diff) | |
download | opie-da94bce203afca412336a7793ff8e58e18d59108.zip opie-da94bce203afca412336a7793ff8e58e18d59108.tar.gz opie-da94bce203afca412336a7793ff8e58e18d59108.tar.bz2 |
handles different versions of the same package
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 ) | |||
35 | { | 35 | { |
36 | if (!pack) return; | ||
36 | Package* p = packageList.find( pack->name() ); | 37 | Package* p = packageList.find( pack->name() ); |
@@ -38,5 +39,13 @@ void PackageList::insertPackage( Package* pack ) | |||
38 | { | 39 | { |
39 | p->copyValues( pack ); | 40 | if ( p->version() == pack->version() ) |
40 | delete pack; | 41 | { |
41 | pack = p; | 42 | p->copyValues( pack ); |
43 | delete pack; | ||
44 | pack = p; | ||
45 | } else { | ||
46 | p->setName( pack->name()+"["+p->version()+"]" ); | ||
47 | pack->setName( pack->name()+"["+pack->version()+"]" ); | ||
48 | packageList.insert( pack->name(), pack ); | ||
49 | origPackageList.insert( pack->name(), pack ); | ||
50 | } | ||
42 | }else{ | 51 | }else{ |
@@ -44,4 +53,4 @@ void PackageList::insertPackage( Package* pack ) | |||
44 | origPackageList.insert( pack->name(), pack ); | 53 | origPackageList.insert( pack->name(), pack ); |
45 | empty=false; | ||
46 | }; | 54 | }; |
55 | empty=false; | ||
47 | updateSections( pack ); | 56 | updateSections( pack ); |