summaryrefslogtreecommitdiff
path: root/noncore
authorandyq <andyq>2002-10-20 16:48:26 (UTC)
committer andyq <andyq>2002-10-20 16:48:26 (UTC)
commita24218529668ca387827ed520cea6d1890df7a88 (patch) (side-by-side diff)
tree0d9b03c671b57e636fe003dbd185922297396b5a /noncore
parent1f106a8b44ae659f30361588f53354e8f1985974 (diff)
downloadopie-a24218529668ca387827ed520cea6d1890df7a88.zip
opie-a24218529668ca387827ed520cea6d1890df7a88.tar.gz
opie-a24218529668ca387827ed520cea6d1890df7a88.tar.bz2
fixed bug with removing from local IPKGS folder
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/networkpkgmgr.cpp8
-rw-r--r--noncore/settings/aqpkg/package.cpp17
-rw-r--r--noncore/settings/aqpkg/package.h3
-rw-r--r--noncore/settings/aqpkg/server.cpp12
4 files changed, 31 insertions, 9 deletions
diff --git a/noncore/settings/aqpkg/networkpkgmgr.cpp b/noncore/settings/aqpkg/networkpkgmgr.cpp
index 3aee7bd..d84fb4b 100644
--- a/noncore/settings/aqpkg/networkpkgmgr.cpp
+++ b/noncore/settings/aqpkg/networkpkgmgr.cpp
@@ -484,11 +484,17 @@ InstallData NetworkPackageManager :: dealWithItem( QCheckListItem *item )
{
InstallData item;
item.option = "D";
- item.packageName = name;
+ item.packageName = p->getInstalledPackageName();
if ( p->getInstalledTo() )
+ {
item.destination = p->getInstalledTo();
+ cout << "dest - " << p->getInstalledTo()->getDestinationName() << endl;
+ cout << "dest - " << p->getInstalledTo()->getDestinationPath() << endl;
+ }
else
+ {
item.destination = p->getLocalPackage()->getInstalledTo();
+ }
// Sticky option not implemented yet, but will eventually allow
// the user to say something like 'remove all'
diff --git a/noncore/settings/aqpkg/package.cpp b/noncore/settings/aqpkg/package.cpp
index 48b6934..fd75450 100644
--- a/noncore/settings/aqpkg/package.cpp
+++ b/noncore/settings/aqpkg/package.cpp
@@ -23,14 +23,21 @@ Package::Package( QString &name )
packageName = name;
localPackage = 0;
installed = false;
- packageStoredLocally = false;
+ packageStoredLocally = false;
installedToRoot = false;
+ installed = false;
+ installedTo = 0;
}
Package::Package( char *name )
{
packageName = name;
localPackage = 0;
+ installed = false;
+ packageStoredLocally = false;
+ installedToRoot = false;
+ installed = false;
+ installedTo = 0;
}
Package::~Package()
@@ -103,6 +110,14 @@ QString Package :: getInstalledVersion()
return getVersion();
}
+QString Package :: getInstalledPackageName()
+{
+ if ( localPackage )
+ return localPackage->getPackageName();
+ else
+ return getPackageName();
+}
+
bool Package :: isInstalled()
{
return installed || ( localPackage && localPackage->isInstalled() );
diff --git a/noncore/settings/aqpkg/package.h b/noncore/settings/aqpkg/package.h
index 8ba5a6a..2f2a165 100644
--- a/noncore/settings/aqpkg/package.h
+++ b/noncore/settings/aqpkg/package.h
@@ -55,6 +55,7 @@ public:
bool isPackageStoredLocally() { return packageStoredLocally; }
bool isInstalledToRoot() { return installedToRoot; }
QString getInstalledVersion();
+ QString getInstalledPackageName();
Destination *getInstalledTo() { return installedTo; }
QString toString();
@@ -68,7 +69,7 @@ private:
QString status;
QString description;
QString filename;
- bool packageStoredLocally;
+ bool packageStoredLocally;
bool installedToRoot;
bool installed;
bool differentVersionAvailable;
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 7d103a2..8bca892 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -106,16 +106,16 @@ void Server :: readLocalIpks( Server *local )
for ( ; it.current() ; ++it )
{
- // OK, we have a local IPK file, I think the standard naming conventions
- // for these are packagename_version_arm.ipk
- QString file = (*it)->file();
+ // OK, we have a local IPK file, I think the standard naming conventions
+ // for these are packagename_version_arm.ipk
+ QString file = (*it)->file();
QString packageName = Utils::getPackageNameFromIpkFilename( file );
QString ver = Utils::getPackageVersionFromIpkFilename( file );
packageList.push_back( Package( packageName ) );
- packageList.back().setVersion( ver );
- packageList.back().setFilename( file );
- packageList.back().setPackageStoredLocally( true );
+ packageList.back().setVersion( ver );
+ packageList.back().setFilename( file );
+ packageList.back().setPackageStoredLocally( true );
}
#else