summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/README2
-rw-r--r--noncore/settings/packagemanager/TODO28
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp7
3 files changed, 31 insertions, 6 deletions
diff --git a/noncore/settings/packagemanager/README b/noncore/settings/packagemanager/README
index 7b6305a..9324f9c 100644
--- a/noncore/settings/packagemanager/README
+++ b/noncore/settings/packagemanager/README
@@ -1,17 +1,17 @@
1/************************************************************************ 1/************************************************************************
2/* 2/*
3/* Opie - Package Manager 3/* Opie - Package Manager
4/* ======================== 4/* ========================
5/* Version 0.2.0 5/* Version 0.3.0
6/* 6/*
7/* A package management client for Opie 7/* A package management client for Opie
8/* 8/*
9/************************************************************************ 9/************************************************************************
10 10
11------------------------------------------------------- 11-------------------------------------------------------
12 Release Notes for Opie-PackageManager - January, 2004 12 Release Notes for Opie-PackageManager - January, 2004
13------------------------------------------------------- 13-------------------------------------------------------
14 14
15====================== 15======================
16= To-do = 16= To-do =
17====================== 17======================
diff --git a/noncore/settings/packagemanager/TODO b/noncore/settings/packagemanager/TODO
new file mode 100644
index 0000000..448ade3
--- a/dev/null
+++ b/noncore/settings/packagemanager/TODO
@@ -0,0 +1,28 @@
1/************************************************************************
2/*
3/* Opie - Package Manager
4/* ========================
5/* Version 0.3.0
6/*
7/* A package management client for Opie
8/*
9/************************************************************************
10
11---------------------------------------------
12 To-do for Opie-PackageManager - April, 2004
13---------------------------------------------
14
15======================
16= Current release =
17======================
18
191. Save configuration information (i.e. /etc/ipkg.conf)
202. Link non-root destination apps
213. Implement QCOP interface for installing, removing, etc.
224. Redesign configuration dialog
23
24======================
25= Future releases =
26======================
27
281. ??? \ No newline at end of file
diff --git a/noncore/settings/packagemanager/oipkg.cpp b/noncore/settings/packagemanager/oipkg.cpp
index 1dc23a4..5c79ba9 100644
--- a/noncore/settings/packagemanager/oipkg.cpp
+++ b/noncore/settings/packagemanager/oipkg.cpp
@@ -27,25 +27,24 @@
27 Inc., 59 Temple Place - Suite 330, 27 Inc., 59 Temple Place - Suite 330,
28 Boston, MA 02111-1307, USA. 28 Boston, MA 02111-1307, USA.
29 29
30*/ 30*/
31 31
32#include "oipkg.h" 32#include "oipkg.h"
33 33
34#include <stdlib.h> 34#include <stdlib.h>
35#include <string.h> 35#include <string.h>
36 36
37#include <qdir.h> 37#include <qdir.h>
38#include <qfile.h> 38#include <qfile.h>
39#include <qmessagebox.h>
40#include <qtextstream.h> 39#include <qtextstream.h>
41 40
42const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file 41const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file
43const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files 42const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files
44const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists 43const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists
45const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location 44const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location
46 45
47OIpkg *oipkg; 46OIpkg *oipkg;
48 47
49// Ipkg callback functions 48// Ipkg callback functions
50 49
51int fsignalIpkgMessage( ipkg_conf_t */*conf*/, message_level_t /*level*/, char *msg ) 50int fsignalIpkgMessage( ipkg_conf_t */*conf*/, message_level_t /*level*/, char *msg )
@@ -73,41 +72,39 @@ int fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_
73} 72}
74 73
75OIpkg::OIpkg( Config *config, QObject *parent, const char *name ) 74OIpkg::OIpkg( Config *config, QObject *parent, const char *name )
76 : QObject( parent, name ) 75 : QObject( parent, name )
77 , m_config( config ) 76 , m_config( config )
78 , m_confInfo( NULL ) 77 , m_confInfo( NULL )
79 , m_ipkgExecOptions( 0 ) 78 , m_ipkgExecOptions( 0 )
80 , m_ipkgExecVerbosity( 1 ) 79 , m_ipkgExecVerbosity( 1 )
81{ 80{
82 oipkg = this; 81 oipkg = this;
83 82
84 // Initialize libipkg 83 // Initialize libipkg
85 if ( ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ) ) 84 ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs );
86 QMessageBox::critical( 0, tr( "OIpkg" ), tr( "Error initialing libipkg" ) );
87 85
88 // Default ipkg run-time arguments 86 // Default ipkg run-time arguments
89 m_ipkgArgs.noaction = false; 87 m_ipkgArgs.noaction = false;
90 m_ipkgArgs.force_defaults = true; 88 m_ipkgArgs.force_defaults = true;
91} 89}
92 90
93OIpkg::~OIpkg() 91OIpkg::~OIpkg()
94{ 92{
95 // Upon destruction, ensure that items in config list are deleted with list 93 // Upon destruction, ensure that items in config list are deleted with list
96 if ( m_confInfo ) 94 if ( m_confInfo )
97 m_confInfo->setAutoDelete( true ); 95 m_confInfo->setAutoDelete( true );
98 96
99 // Free up libipkg resources 97 // Free up libipkg resources
100 if ( ipkg_deinit( &m_ipkgArgs ) ) 98 ipkg_deinit( &m_ipkgArgs );
101 QMessageBox::critical( 0, tr( "OIpkg" ), tr( "Error freeing libipkg" ) );
102} 99}
103 100
104OConfItemList *OIpkg::configItems() 101OConfItemList *OIpkg::configItems()
105{ 102{
106 // Retrieve all configuration items 103 // Retrieve all configuration items
107 return filterConfItems(); 104 return filterConfItems();
108} 105}
109 106
110OConfItemList *OIpkg::servers() 107OConfItemList *OIpkg::servers()
111{ 108{
112 // Retrieve only servers 109 // Retrieve only servers
113 return filterConfItems( OConfItem::Source ); 110 return filterConfItems( OConfItem::Source );