Diffstat (limited to 'noncore/settings/packagemanager') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/settings/packagemanager/oconfitem.h | 7 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkg.cpp | 7 | ||||
-rw-r--r-- | noncore/settings/packagemanager/opie-packagemanager.control | 4 |
3 files changed, 13 insertions, 5 deletions
diff --git a/noncore/settings/packagemanager/oconfitem.h b/noncore/settings/packagemanager/oconfitem.h index 9972c00..7b52ce4 100644 --- a/noncore/settings/packagemanager/oconfitem.h +++ b/noncore/settings/packagemanager/oconfitem.h @@ -29,25 +29,30 @@ _;:, .> :=|. This program is free software; you can */ #ifndef OCONFITEM_H #define OCONFITEM_H #include <qlist.h> #include <qstring.h> class OConfItem { public: - enum Type { Source, Destination, Option, Arch, NotDefined }; + enum Type { Source=0x01, + GzSource=0x02, + Destination=0x04, + Option=0x08, + Arch=0x10, + NotDefined=0x20 }; OConfItem( Type type = NotDefined, const QString &name = QString::null, const QString &value = QString::null, const QString &features = QString::null, bool active = true ); Type type() { return m_type; } const QString &name() { return m_name; } const QString &value() { return m_value; } const QString &features() { return m_features; } bool active() { return m_active; } void setType( Type type ) { m_type = type; } diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp index f2d7e39..a885ef8 100644 --- a/noncore/settings/packagemanager/oipkg.cpp +++ b/noncore/settings/packagemanager/oipkg.cpp @@ -105,25 +105,26 @@ OIpkg::~OIpkg() ipkg_deinit( &m_ipkgArgs ); } OConfItemList *OIpkg::configItems() { // Retrieve all configuration items return filterConfItems(); } OConfItemList *OIpkg::servers() { // Retrieve only servers - return filterConfItems( OConfItem::Source ); + return filterConfItems( (OConfItem::Type)((int)OConfItem::Source | + (int)OConfItem::GzSource) ); } OConfItemList *OIpkg::destinations() { // Retrieve only destinations return filterConfItems( OConfItem::Destination ); } OConfItemList *OIpkg::options() { // Retrieve only destinations return filterConfItems( OConfItem::Option ); @@ -534,24 +535,25 @@ void OIpkg::loadConfiguration() { QTextStream s( &f ); while ( !s.eof() ) { QString line = s.readLine().simplifyWhiteSpace(); // Parse line and save info to the conf options list if ( !line.isEmpty() ) { if ( !line.startsWith( "#" ) || line.startsWith( "#src" ) || + line.startsWith( "#src/gz" ) || line.startsWith( "#dest" ) || line.startsWith( "#arch" ) || line.startsWith( "#option" ) ) { int pos = line.find( ' ', 1 ); // Type QString typeStr = line.left( pos ); OConfItem::Type type; QString features; if ( typeStr == "src" || typeStr == "#src" ) type = OConfItem::Source; @@ -609,25 +611,26 @@ OConfItemList *OIpkg::filterConfItems( OConfItem::Type typefilter ) // Build new server list (caller is responsible for deleting) OConfItemList *sl = new OConfItemList; // If typefilter is empty, retrieve all items bool retrieveAll = ( typefilter == OConfItem::NotDefined ); // Parse configuration info for servers OConfItemListIterator it( *m_confInfo ); for ( ; it.current(); ++it ) { OConfItem *item = it.current(); - if ( retrieveAll || item->type() == typefilter ) + if ( retrieveAll || + ( item->type() & typefilter ) ) { sl->append( item ); } } return sl; } const QString &OIpkg::rootPath() { if ( m_rootPath.isEmpty() ) { diff --git a/noncore/settings/packagemanager/opie-packagemanager.control b/noncore/settings/packagemanager/opie-packagemanager.control index da3ddfe..0153d40 100644 --- a/noncore/settings/packagemanager/opie-packagemanager.control +++ b/noncore/settings/packagemanager/opie-packagemanager.control @@ -1,10 +1,10 @@ Package: opie-packagemanager Files: plugins/application/libpackagemanager.so* bin/packagemanager pics/packagemanager apps/Settings/packagemanager.desktop Priority: optional Section: opie/settings -Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg (>=0.99.120) +Depends: task-opie-minimal, libopiecore2, libopieui2, libipkg0 (>=0.99.120), ipkg-link Replaces: packagemanager Architecture: arm Maintainer: Dan Williams (drw@handhelds.org) Description: Opie package management client -Version: 0.6.1$EXTRAVERSION +Version: $QPE_VERSION$EXTRAVERSION |