summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/server.cpp13
-rw-r--r--noncore/settings/aqpkg/server.h3
2 files changed, 11 insertions, 5 deletions
diff --git a/noncore/settings/aqpkg/server.cpp b/noncore/settings/aqpkg/server.cpp
index 0069a60..7d103a2 100644
--- a/noncore/settings/aqpkg/server.cpp
+++ b/noncore/settings/aqpkg/server.cpp
@@ -79,5 +79,5 @@ void Server :: readStatusFile( vector<Destination> &destList )
packageFile = path + "usr/lib/ipkg/status";
- readPackageFile( 0, false, installingToRoot );
+ readPackageFile( 0, false, installingToRoot, dit );
}
@@ -140,5 +140,5 @@ void Server :: readLocalIpks( Server *local )
}
-void Server :: readPackageFile( Server *local, bool clearAll, bool installingToRoot )
+void Server :: readPackageFile( Server *local, bool clearAll, bool installingToRoot, Destination *dest )
{
ifstream in( packageFile );
@@ -169,5 +169,6 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR
key = k;
value = v;
- key.stripWhiteSpace();
+ key = key.stripWhiteSpace();
+ value = value.stripWhiteSpace();
if ( key == "Package" && newPackage )
{
@@ -179,8 +180,14 @@ void Server :: readPackageFile( Server *local, bool clearAll, bool installingToR
packageList.push_back( Package( value ) );
currPackage = &(packageList.back());
+ currPackage->setInstalledTo( dest );
if ( installingToRoot )
currPackage->setInstalledToRoot( true );
}
+ else
+ {
+ if (currPackage->getStatus().find( "deinstall" ) != -1 )
+ currPackage->setInstalledTo( dest );
+ }
}
else if ( key == "Version" )
diff --git a/noncore/settings/aqpkg/server.h b/noncore/settings/aqpkg/server.h
index 5f83f75..e9f434c 100644
--- a/noncore/settings/aqpkg/server.h
+++ b/noncore/settings/aqpkg/server.h
@@ -38,5 +38,5 @@ public:
void readStatusFile( vector<Destination> &v );
void readLocalIpks( Server *local );
- void readPackageFile( Server *local = 0, bool clearAll = true, bool installedToRoot= false );
+ void readPackageFile( Server *local = 0, bool clearAll = true, bool installedToRoot= false, Destination *dest = 0 );
void buildLocalPackages( Server *local );
Package *getPackage( const char *name );
@@ -60,5 +60,4 @@ private:
bool active;
-
vector<Package> packageList;
};