-rw-r--r-- | noncore/settings/packagemanager/README | 2 | ||||
-rw-r--r-- | noncore/settings/packagemanager/TODO | 28 | ||||
-rw-r--r-- | noncore/settings/packagemanager/oipkg.cpp | 7 |
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,37 +1,37 @@ /************************************************************************ /* /* Opie - Package Manager /* ======================== -/* Version 0.2.0 +/* Version 0.3.0 /* /* A package management client for Opie /* /************************************************************************ ------------------------------------------------------- Release Notes for Opie-PackageManager - January, 2004 ------------------------------------------------------- ====================== = To-do = ====================== - See $OPIEDIR/noncore/settings/packagemanager/TODO for more info. ====================== = Build = ====================== In order to build opie-packagemanager, libipkg needs to be present on the build system along with the appropriate headers. - libipkg source (best to use version 109 or greater): - Familiar CVS directory: familiar/dist/ipkg/C (e.g. 'cvs co familiar/dist/ipkg/C') - FTP: ftp://handhelds.org/linux/packages/ipkg - before building opie-packagemanager, define the environmental variable IPKGDIR to point to the directory containing the ipkg source code - e.g. 'export IPKGDIR=$HOME/familiar/dist/ipkg/C' ====================== = Run = 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 @@ +/************************************************************************ +/* +/* Opie - Package Manager +/* ======================== +/* Version 0.3.0 +/* +/* A package management client for Opie +/* +/************************************************************************ + +--------------------------------------------- + To-do for Opie-PackageManager - April, 2004 +--------------------------------------------- + +====================== += Current release = +====================== + +1. Save configuration information (i.e. /etc/ipkg.conf) +2. Link non-root destination apps +3. Implement QCOP interface for installing, removing, etc. +4. Redesign configuration dialog + +====================== += Future releases = +====================== + +1. ???
\ 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 @@ -7,127 +7,124 @@ .>+-= _;:, .> :=|. This program is free software; you can .> <`_, > . <= redistribute it and/or modify it under :`=1 )Y*s>-.-- : the terms of the GNU Library General Public .="- .-=="i, .._ License as published by the Free Software - . .-<_> .<> Foundation; either version 2 of the License, ._= =} : or (at your option) any later version. .%`+i> _;_. .i_,=:_. -<s. This program is distributed in the hope that + . -:. = it will be useful, but WITHOUT ANY WARRANTY; : .. .:, . . . without even the implied warranty of =_ + =;=|` MERCHANTABILITY or FITNESS FOR A _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU ..}^=.= = ; Library General Public License for more ++= -. .` .: details. : = ...= . :.=- -. .:....=;==+<; You should have received a copy of the GNU -_. . . )=. = Library General Public License along with -- :-=` this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "oipkg.h" #include <stdlib.h> #include <string.h> #include <qdir.h> #include <qfile.h> -#include <qmessagebox.h> #include <qtextstream.h> const QString IPKG_CONF = "/etc/ipkg.conf"; // Fully-qualified name of Ipkg primary configuration file const QString IPKG_CONF_DIR = "/etc/ipkg"; // Directory of secondary Ipkg configuration files const QString IPKG_PKG_PATH = "/usr/lib/ipkg/lists"; // Directory containing server package lists const QString IPKG_STATUS_PATH = "usr/lib/ipkg/status"; // Destination status file location OIpkg *oipkg; // Ipkg callback functions int fsignalIpkgMessage( ipkg_conf_t */*conf*/, message_level_t /*level*/, char *msg ) { oipkg->ipkgMessage( msg ); return 0; } char *fIpkgResponse( char */*question*/ ) { return 0x0; } int fIpkgStatus( char */*name*/, int /*status*/, char *desc, void */*userdata*/ ) { oipkg->ipkgStatus( desc ); return 0; } int fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/, void */*userdata*/ ) { oipkg->ipkgList( desc ); return 0; } OIpkg::OIpkg( Config *config, QObject *parent, const char *name ) : QObject( parent, name ) , m_config( config ) , m_confInfo( NULL ) , m_ipkgExecOptions( 0 ) , m_ipkgExecVerbosity( 1 ) { oipkg = this; // Initialize libipkg - if ( ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ) ) - QMessageBox::critical( 0, tr( "OIpkg" ), tr( "Error initialing libipkg" ) ); + ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); // Default ipkg run-time arguments m_ipkgArgs.noaction = false; m_ipkgArgs.force_defaults = true; } OIpkg::~OIpkg() { // Upon destruction, ensure that items in config list are deleted with list if ( m_confInfo ) m_confInfo->setAutoDelete( true ); // Free up libipkg resources - if ( ipkg_deinit( &m_ipkgArgs ) ) - QMessageBox::critical( 0, tr( "OIpkg" ), tr( "Error freeing libipkg" ) ); + ipkg_deinit( &m_ipkgArgs ); } OConfItemList *OIpkg::configItems() { // Retrieve all configuration items return filterConfItems(); } OConfItemList *OIpkg::servers() { // Retrieve only servers return filterConfItems( OConfItem::Source ); } OConfItemList *OIpkg::destinations() { // Retrieve only destinations return filterConfItems( OConfItem::Destination ); } OConfItemList *OIpkg::options() { // Retrieve only destinations return filterConfItems( OConfItem::Option ); } void OIpkg::setConfigItems( OConfItemList *configList ) { if ( m_confInfo ) delete m_confInfo; m_confInfo = configList; |