summaryrefslogtreecommitdiff
path: root/noncore
authortille <tille>2002-05-31 12:11:02 (UTC)
committer tille <tille>2002-05-31 12:11:02 (UTC)
commit40eac37ff82dd4499a95adb786eb063fd0b81584 (patch) (side-by-side diff)
treedbcfe08a966ed02575897a722ddaa05b2450d7c6 /noncore
parentb0c81bac3828ed8b5a5f03e1e3910c4722c6689a (diff)
downloadopie-40eac37ff82dd4499a95adb786eb063fd0b81584.zip
opie-40eac37ff82dd4499a95adb786eb063fd0b81584.tar.gz
opie-40eac37ff82dd4499a95adb786eb063fd0b81584.tar.bz2
parses "not-installed" from /usr/lib/ipkg/list
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/unsupported/oipkg/TODO3
-rw-r--r--noncore/unsupported/oipkg/package.cpp10
2 files changed, 11 insertions, 2 deletions
diff --git a/noncore/unsupported/oipkg/TODO b/noncore/unsupported/oipkg/TODO
index b92cbb0..e7b017c 100644
--- a/noncore/unsupported/oipkg/TODO
+++ b/noncore/unsupported/oipkg/TODO
@@ -1,12 +1,13 @@
+* check for networt before installing from network
* Settings Class
* parse "to install" and "to remove" from status
* install local file dialog
* qcop
* error handling
* manage links
* dependency checking
* create dest if it does not exist
* allow reinstalling
* different types of filters and searches
i.e. name, desc, files etc
-* display new list after update \ No newline at end of file
+* display new list after update
diff --git a/noncore/unsupported/oipkg/package.cpp b/noncore/unsupported/oipkg/package.cpp
index bfb48b3..4a09b40 100644
--- a/noncore/unsupported/oipkg/package.cpp
+++ b/noncore/unsupported/oipkg/package.cpp
@@ -87,97 +87,105 @@ void Package::setValue( QString n, QString t )
}else if ( n == "Version")
{
_version = t;
// }else if ( n == "Pre-Depends")
// {
//
// }else if ( n == "Depends")
// {
}else if ( n == "Filename")
{
_fileName = t;
// }else if ( n == "Size")
// {
//
// }else if ( n == "MD5Sum")
// {
}else if ( n == "Description")
{
setDesc( t );
}else if ( n == "Status")
{
if ( installed() ) return;
_status = t;
// }else if ( n == "Essential")
// {
}else{
_values.insert(n,new QString(t));
}
}
QString Package::name()
{
if (_displayName.isEmpty() ) return _name;
else return _displayName;
}
QString Package::installName()
{
if (_useFileName) return _fileName;
else return _name;
}
bool Package::installed()
{
- if (_status.contains("installed")) return true;
+ if (_status.contains("installed"))
+ {
+ if (_status.contains("not-installed"))
+ {
+ _toProcess = true;
+ return false;
+ }
+ else return true;
+ }
else
if (_versions)
{
QDictIterator<Package> other( *_versions );
while ( other.current() )
{
if (other.current()->status().contains("installed")
&& other.current()->version() == version())
return true;
++other;
}
}
return false;
}
bool Package::otherInstalled()
{
if (_versions)
{
QDictIterator<Package> other( *_versions );
while ( other.current() )
{
if (other.current()->installed()) return true;
++other;
}
}
return false;
}
void Package::setDesc( QString s )
{
_desc = s;
_shortDesc = s.left( s.find("\n") );
}
QString Package::desc()
{
return _desc;
}
QString Package::shortDesc()
{
return _shortDesc;
}
QString Package::size()
{
return _size;