diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-06-04 11:48:53 +0100 |
---|---|---|
committer | Paul Eggleton <paul.eggleton@linux.intel.com> | 2011-06-04 13:08:31 +0100 |
commit | e4060679f35f4cec4af5f9c49247286ea824dfbd (patch) | |
tree | a9af590799ae3dca54f4b94d6bb07fb480428cd3 /recipes/opie-packagemanager | |
parent | 1672042214d87572815d11bc55a04abf86dcbe0c (diff) | |
download | openembedded-e4060679f35f4cec4af5f9c49247286ea824dfbd.tar.gz |
Opie: remove 1.2.4 recipes and obsolete patches
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'recipes/opie-packagemanager')
-rw-r--r-- | recipes/opie-packagemanager/files/opkg.patch | 562 | ||||
-rw-r--r-- | recipes/opie-packagemanager/files/opkg_update.patch | 469 | ||||
-rw-r--r-- | recipes/opie-packagemanager/files/split-config.patch | 334 | ||||
-rw-r--r-- | recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb | 20 |
4 files changed, 0 insertions, 1385 deletions
diff --git a/recipes/opie-packagemanager/files/opkg.patch b/recipes/opie-packagemanager/files/opkg.patch deleted file mode 100644 index bf6b18ab69..0000000000 --- a/recipes/opie-packagemanager/files/opkg.patch +++ /dev/null @@ -1,562 +0,0 @@ -Index: packagemanager/installdlg.cpp -=================================================================== -RCS file: /cvs/opie/noncore/settings/packagemanager/installdlg.cpp,v -retrieving revision 1.16 -diff -u -d -r1.16 installdlg.cpp ---- packagemanager/installdlg.cpp 5 Jun 2005 22:41:15 -0000 1.16 -+++ packagemanager/installdlg.cpp 18 May 2009 21:03:02 -0000 -@@ -45,6 +45,7 @@ - #include <qmap.h> - #include <qmultilineedit.h> - #include <qpushbutton.h> -+#include <qprogressbar.h> - - #include <sys/vfs.h> - -@@ -130,16 +131,21 @@ - groupBoxLayout->addWidget( m_output ); - layout->addMultiCellWidget( groupBox, 2, 2, 0, 1 ); - -+ m_progressBar = new QProgressBar( this ); -+ m_progressBar->setTotalSteps( 100 ); -+ m_progressBar->hide(); -+ layout->addMultiCellWidget( m_progressBar, 3, 3, 0, 1 ); -+ - m_btnStart = new QPushButton( Opie::Core::OResource::loadPixmap( "packagemanager/apply", - Opie::Core::OResource::SmallIcon ), tr( "Start" ), this ); - m_btnStart->setMinimumHeight( AppLnk::smallIconSize() ); -- layout->addWidget( m_btnStart, 3, 0 ); -+ layout->addWidget( m_btnStart, 4, 0 ); - connect( m_btnStart, SIGNAL(clicked()), this, SLOT(slotBtnStart()) ); - - m_btnOptions = new QPushButton( Opie::Core::OResource::loadPixmap( "SettingsIcon", Opie::Core::OResource::SmallIcon ), - tr( "Options" ), this ); - m_btnOptions->setMinimumHeight( AppLnk::smallIconSize() ); -- layout->addWidget( m_btnOptions, 3, 1 ); -+ layout->addWidget( m_btnOptions, 4, 1 ); - connect( m_btnOptions, SIGNAL( clicked() ), this, SLOT(slotBtnOptions()) ); - - // Display packages being acted upon in output widget -@@ -251,13 +257,23 @@ - m_btnStart->setEnabled( false ); - } - -+ connect( m_packman, SIGNAL(signalProgress(const QString &, int)), this, SLOT(slotProgress(const QString &, int)) ); -+ -+ m_progressBar->show(); -+ - for ( m_currCommand = 0; m_currCommand < m_numCommands; m_currCommand++ ) - { -+ m_progressBar->reset(); - // Execute next command - m_packman->executeCommand( m_command[ m_currCommand ], m_packages[ m_currCommand ], dest, - this, SLOT(slotOutput(const QString &)), true ); - } - -+ slotOutput( tr("Completed") ); -+ m_progressBar->hide(); -+ -+ disconnect( m_packman, SIGNAL(signalProgress(const QString &, int)), this, SLOT(slotProgress(const QString &, int)) ); -+ - // All commands executed, allow user to close dialog - m_btnStart->setEnabled( true ); - m_btnStart->setText( tr( "Close" ) ); -@@ -314,3 +330,15 @@ - // Update available space - slotDisplayAvailSpace( QString::null ); - } -+ -+void InstallDlg::slotProgress( const QString &msg, int percentage ) -+{ -+ static QString lastmsg = ""; -+ if( lastmsg != msg ) { -+ slotOutput( msg ); -+ lastmsg = msg; -+ } -+ -+ m_progressBar->setProgress( percentage ); -+} -+ -Index: packagemanager/installdlg.h -=================================================================== -RCS file: /cvs/opie/noncore/settings/packagemanager/installdlg.h,v -retrieving revision 1.9 -diff -u -d -r1.9 installdlg.h ---- packagemanager/installdlg.h 5 Jun 2005 22:18:10 -0000 1.9 -+++ packagemanager/installdlg.h 18 May 2009 21:03:02 -0000 -@@ -39,6 +39,7 @@ - class QLabel; - class QMultiLineEdit; - class QPushButton; -+class QProgressBar; - - class OConfItem; - class OPackageManager; -@@ -69,6 +70,7 @@ - QMultiLineEdit *m_output; // Multi-line edit to display status - QPushButton *m_btnStart; // Start/abort/close button - QPushButton *m_btnOptions; // Installation options button -+ QProgressBar *m_progressBar; - - // Commands and packages to execute - int m_numCommands; // Number of commands to be executed -@@ -85,6 +87,7 @@ - - // Execution slots - void slotOutput( const QString &msg ); -+ void slotProgress( const QString &msg, int percentage ); - - signals: - void closeInstallDlg(); -Index: packagemanager/mainwindow.cpp -=================================================================== -RCS file: /cvs/opie/noncore/settings/packagemanager/mainwindow.cpp,v -retrieving revision 1.18 -diff -u -d -r1.18 mainwindow.cpp ---- packagemanager/mainwindow.cpp 5 Jun 2005 22:41:15 -0000 1.18 -+++ packagemanager/mainwindow.cpp 18 May 2009 21:03:02 -0000 -@@ -178,8 +178,8 @@ - QAction *actionDownload = new QAction( tr( "Download" ), iconDownload, QString::null, 0, this, 0 ); - actionDownload->setWhatsThis( tr( "Tap here to download the currently selected package(s)." ) ); - connect( actionDownload, SIGNAL(activated()), this, SLOT(slotDownload()) ); -- actionDownload->addTo( popup ); -- actionDownload->addTo( &m_toolBar ); -+//X actionDownload->addTo( popup ); -+//X actionDownload->addTo( &m_toolBar ); - - a = new QAction( tr( "Apply changes" ), Opie::Core::OResource::loadPixmap( "packagemanager/apply", - Opie::Core::OResource::SmallIcon ), QString::null, 0, this, 0 ); -Index: packagemanager/oipkg.cpp -=================================================================== -RCS file: /cvs/opie/noncore/settings/packagemanager/oipkg.cpp,v -retrieving revision 1.25 -diff -u -d -r1.25 oipkg.cpp ---- packagemanager/oipkg.cpp 11 May 2009 21:55:52 -0000 1.25 -+++ packagemanager/oipkg.cpp 18 May 2009 21:03:03 -0000 -@@ -39,21 +39,60 @@ - #include <stdlib.h> - #include <unistd.h> - --extern "C" { --#include <libipkg.h> --}; --args_t m_ipkgArgs; // libipkg configuration arguments -- --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 --const QString IPKG_INFO_PATH = "usr/lib/ipkg/info"; // Package file lists location -+const QString IPKG_CONF = "/etc/opkg.conf"; // Fully-qualified name of Ipkg primary configuration file -+const QString IPKG_CONF_DIR = "/etc/opkg"; // Directory of secondary Ipkg configuration files -+const QString IPKG_PKG_PATH = "/usr/lib/opkg/lists"; // Directory containing server package lists -+const QString IPKG_STATUS_PATH = "usr/lib/opkg/status"; // Destination status file location -+const QString IPKG_INFO_PATH = "usr/lib/opkg/info"; // Package file lists location - - OIpkg *oipkg; - - // Ipkg callback functions - -+ -+void fsignalOpkgProgress (opkg_t *opkg, const opkg_progress_data_t *progress, void *user_data) -+{ -+ QString msg; -+ -+ QString pkginfo; -+ if( progress->package ) { -+ pkginfo = progress->package->name; -+ pkginfo += " "; -+ pkginfo += progress->package->version; -+ } -+ switch( progress->action ) { -+ case OPKG_INSTALL: -+ if( pkginfo != "" ) -+ msg = QObject::tr("Installing %1").arg( pkginfo ); -+ else -+ msg = QObject::tr("Installing"); -+ break; -+ case OPKG_REMOVE: -+ if( pkginfo != "" ) -+ msg = QObject::tr("Removing %1").arg( pkginfo ); -+ else -+ msg = QObject::tr("Removing"); -+ break; -+ case OPKG_DOWNLOAD: -+ if( pkginfo != "" ) -+ msg = QObject::tr("Downloading %1").arg( pkginfo ); -+ else -+ msg = QObject::tr("Downloading"); -+ break; -+ default: -+ msg = QObject::tr("Processing"); -+ } -+ msg += "..."; -+ oipkg->progress( (const char *)msg, progress->percentage ); -+} -+ -+void fsignalOpkgPackage (opkg_t *opkg, opkg_package_t *package, void *user_data) -+{ -+ -+} -+ -+ -+/*X - int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg ) - { - // Display message only if it is below the message level threshold -@@ -64,6 +103,7 @@ - - return 0; - } -+*/ - - char *fIpkgResponse( char */*question*/ ) - { -@@ -76,13 +116,41 @@ - return 0; - } - --int fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/, -- void */*userdata*/ ) -+QString opkg_error_message( int err ) - { -- oipkg->ipkgList( desc ); -- return 0; -+ switch(err) { -+ case OPKG_NO_ERROR: -+ return "Success"; -+ case OPKG_UNKNOWN_ERROR: -+ return "Unknown error"; -+ case OPKG_DOWNLOAD_FAILED: -+ return "Download failed"; -+ case OPKG_DEPENDENCIES_FAILED: -+ return "Unable to complete operation due to dependencies"; -+ case OPKG_PACKAGE_ALREADY_INSTALLED: -+ return "Specified package is already installed"; -+ case OPKG_PACKAGE_NOT_AVAILABLE: -+ return "Specified package is not available"; -+ case OPKG_PACKAGE_NOT_FOUND: -+ return "Specified package could not be found"; -+ case OPKG_PACKAGE_NOT_INSTALLED: -+ return "Specified package is not installed"; -+ case OPKG_GPG_ERROR: -+ return "GPG verification failed"; -+ case OPKG_MD5_ERROR: -+ return "MD5 verification failed"; -+ default: -+ return "Unrecognised error code"; -+ } - } - -+//Xint fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/, -+//X void */*userdata*/ ) -+//X{ -+//X oipkg->ipkgList( desc ); -+//X return 0; -+//X} -+ - OIpkg::OIpkg( Config *config, QObject *parent, const char *name ) - : QObject( parent, name ) - , m_config( config ) -@@ -94,11 +162,7 @@ - oipkg = this; - - // Initialize libipkg -- ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); -- -- // Default ipkg run-time arguments -- m_ipkgArgs.noaction = false; -- m_ipkgArgs.force_defaults = true; -+ m_opkg = opkg_new(); - } - - OIpkg::~OIpkg() -@@ -108,7 +172,7 @@ - m_confInfo->setAutoDelete( true ); - - // Free up libipkg resources -- ipkg_deinit( &m_ipkgArgs ); -+ opkg_free( m_opkg ); - } - - OConfItemList *OIpkg::configItems() -@@ -237,10 +301,7 @@ - } - - // Reinitialize libipkg to pick up new configuration -- ipkg_deinit( &m_ipkgArgs ); -- ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); -- m_ipkgArgs.noaction = false; -- m_ipkgArgs.force_defaults = true; -+ opkg_re_read_config_files( m_opkg ); - } - - void OIpkg::saveSettings() -@@ -430,17 +491,29 @@ - bool OIpkg::executeCommand( OPackage::Command command, const QStringList ¶meters, const QString &destination, - const QObject *receiver, const char *slotOutput, bool rawOutput ) - { -+ int optvalue; -+ - if ( command == OPackage::NotDefined ) - return false; - - // Set ipkg run-time options/arguments -- m_ipkgArgs.force_depends = ( m_ipkgExecOptions & FORCE_DEPENDS ); -- m_ipkgArgs.force_reinstall = ( m_ipkgExecOptions & FORCE_REINSTALL ); -- // TODO m_ipkgArgs.force_remove = ( m_ipkgExecOptions & FORCE_REMOVE ); -- m_ipkgArgs.force_overwrite = ( m_ipkgExecOptions & FORCE_OVERWRITE ); -- m_ipkgArgs.force_removal_of_dependent_packages = ( m_ipkgExecOptions & FORCE_RECURSIVE ); -+ optvalue = ( m_ipkgExecOptions & FORCE_DEPENDS ) ? 1 : 0; -+ opkg_set_option( m_opkg, "force_depends", &optvalue ); -+ -+ optvalue = ( m_ipkgExecOptions & FORCE_REINSTALL ) ? 1 : 0; -+ opkg_set_option( m_opkg, "force_reinstall", &optvalue ); -+ -+ optvalue = ( m_ipkgExecOptions & FORCE_OVERWRITE ) ? 1 : 0; -+ opkg_set_option( m_opkg, "force_overwrite", &optvalue ); -+ -+ optvalue = ( m_ipkgExecOptions & FORCE_RECURSIVE ) ? 1 : 0; -+ opkg_set_option( m_opkg, "force_removal_of_dependent_packages", &optvalue ); -+ -+ optvalue = m_ipkgExecVerbosity; -+ opkg_set_option( m_opkg, "verbosity", &optvalue ); -+ -+/*X // TODO m_ipkgArgs.force_remove = ( m_ipkgExecOptions & FORCE_REMOVE ); - m_ipkgArgs.verbose_wget = ( m_ipkgExecOptions & FORCE_VERBOSE_WGET ); -- m_ipkgArgs.verbosity = m_ipkgExecVerbosity; - if ( m_ipkgArgs.dest ) - free( m_ipkgArgs.dest ); - if ( !destination.isNull() ) -@@ -452,7 +525,7 @@ - } - else - m_ipkgArgs.dest = 0l; -- -+*/ - // Connect output signal to widget - - if ( !rawOutput ) -@@ -460,17 +533,29 @@ - // TODO - connect to local slot and parse output before emitting signalIpkgMessage - } - -+ int ret = 0; -+ - switch( command ) - { - case OPackage::Update : { - connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); -- ipkg_lists_update( &m_ipkgArgs ); -+ ret = opkg_update_package_lists( m_opkg, &fsignalOpkgProgress, NULL ); - disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); -+ -+ if( ret != OPKG_NO_ERROR ) { -+ emit signalIpkgMessage( tr("Update failed: ") + opkg_error_message( ret ) ); -+ return false; -+ } - }; - break; - case OPackage::Upgrade : { - connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); -- ipkg_packages_upgrade( &m_ipkgArgs ); -+ ret = opkg_upgrade_all( m_opkg, &fsignalOpkgProgress, NULL ); -+ if( ret != OPKG_NO_ERROR ) { -+ emit signalIpkgMessage( tr("Upgrade failed: ") + opkg_error_message( ret ) ); -+ disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); -+ return false; -+ } - - // Re-link non-root destinations to make sure everything is in sync - OConfItemList *destList = destinations(); -@@ -489,7 +574,12 @@ - connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); - for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) - { -- ipkg_packages_install( &m_ipkgArgs, (*it) ); -+ ret = opkg_install_package( m_opkg, (*it), &fsignalOpkgProgress, NULL ); -+ if( ret != OPKG_NO_ERROR ) { -+ emit signalIpkgMessage( tr("Install failed: ") + opkg_error_message( ret ) ); -+ disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); -+ return false; -+ } - } - if ( destination != "root" ) - linkPackageDir( destination ); -@@ -505,7 +595,18 @@ - for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) - { - unlinkPackage( (*it), destList ); -- ipkg_packages_remove( &m_ipkgArgs, (*it), true ); -+ ret = opkg_remove_package( m_opkg, (*it), &fsignalOpkgProgress, NULL ); -+ if( ret != OPKG_NO_ERROR ) { -+ if ( ret == OPKG_DEPENDENCIES_FAILED || ret == OPKG_UNKNOWN_ERROR ) { -+ emit signalIpkgMessage( tr("Remove failed: other package(s) depend on the specified package") ); -+ } -+ else { -+ emit signalIpkgMessage( tr("Remove failed: ") + opkg_error_message( ret ) ); -+ } -+ delete destList; -+ disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); -+ return false; -+ } - } - - delete destList; -@@ -516,20 +617,38 @@ - connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); - for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) - { -- ipkg_packages_download( &m_ipkgArgs, (*it) ); -+//X ipkg_packages_download( &m_ipkgArgs, (*it) ); - } - disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); - }; - break; - case OPackage::Info : { - connect( this, SIGNAL(signalIpkgStatus(const QString &)), receiver, slotOutput ); -- ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l ); -+//X ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l ); -+ opkg_package_t *pkginfo = opkg_find_package( m_opkg, (*parameters.begin()), NULL, NULL, NULL ); -+ if(pkginfo) { -+ QString msg = tr("Package: %1\n").arg( pkginfo->name ); -+ msg += tr("Version: %1\n").arg( pkginfo->version ); -+ msg += tr("Architecture: %1\n").arg( pkginfo->architecture ); -+ if( pkginfo->repository ) -+ msg += tr("Repository: %1\n").arg( pkginfo->repository ); -+ if( pkginfo->description ) -+ msg += tr("Description: %1\n\n").arg( pkginfo->description ); -+ if( pkginfo->tags ) -+ msg += tr("Tags: %1\n").arg( pkginfo->tags ); -+ if( pkginfo->url ) -+ msg += tr("URL: %1\n").arg( pkginfo->url ); -+ if( pkginfo->size > 0 ) -+ msg += tr("Size: %1\n").arg( pkginfo->size ); -+ msg += tr("Status: %1").arg( pkginfo->installed ? tr("installed") : "" ); -+ emit signalIpkgStatus( msg ); -+ } - disconnect( this, SIGNAL(signalIpkgStatus(const QString &)), 0, 0 ); - }; - break; - case OPackage::Files : { - connect( this, SIGNAL(signalIpkgList(const QString &)), receiver, slotOutput ); -- ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l ); -+//X ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l ); - disconnect( this, SIGNAL(signalIpkgList(const QString &)), 0, 0 ); - }; - break; -@@ -539,7 +658,7 @@ - return true; - } - --void OIpkg::ipkgMessage( char *msg ) -+void OIpkg::ipkgMessage( const char *msg ) - { - emit signalIpkgMessage( msg ); - } -@@ -554,6 +673,11 @@ - emit signalIpkgList( filelist ); - } - -+void OIpkg::progress( const QString &msg, int percentage ) -+{ -+ emit signalProgress( msg, percentage ); -+} -+ - void OIpkg::loadConfiguration() - { - if ( m_confInfo ) -Index: packagemanager/oipkg.h -=================================================================== -RCS file: /cvs/opie/noncore/settings/packagemanager/oipkg.h,v -retrieving revision 1.10 -diff -u -d -r1.10 oipkg.h ---- packagemanager/oipkg.h 17 May 2009 21:33:07 -0000 1.10 -+++ packagemanager/oipkg.h 18 May 2009 21:03:03 -0000 -@@ -38,6 +38,10 @@ - - #include <qobject.h> - -+extern "C" { -+#include <opkg.h> -+}; -+ - // Ipkg execution options (m_ipkgExecOptions) - #define FORCE_DEPENDS 0x0001 - #define FORCE_REMOVE 0x0002 -@@ -86,9 +90,11 @@ - bool rawOutput = true ); - void abortCommand(); - -- void ipkgMessage( char *msg ); -+ void ipkgMessage( const char *msg ); - void ipkgStatus( char *status ); - void ipkgList( char *filelist ); -+ void progressInit(); -+ void progress( const QString &msg, int percentage ); - - private: - Config *m_config; // Pointer to application configuration file -@@ -96,6 +102,7 @@ - int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options - int m_ipkgExecVerbosity; // Ipkg execution verbosity level - QString m_rootPath; // Directory path where the 'root' destination is located -+ opkg_t *m_opkg; - - void loadConfiguration(); - OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined ); -@@ -108,6 +115,8 @@ - void signalIpkgMessage( const QString &msg ); - void signalIpkgStatus( const QString &status ); - void signalIpkgList( const QString &filelist ); -+ void signalProgressInit(); -+ void signalProgress( const QString &msg, int percentage ); - }; - - #endif -Index: packagemanager/opackagemanager.cpp -=================================================================== -RCS file: /cvs/opie/noncore/settings/packagemanager/opackagemanager.cpp,v -retrieving revision 1.10 -diff -u -d -r1.10 opackagemanager.cpp ---- packagemanager/opackagemanager.cpp 5 Jun 2005 22:18:10 -0000 1.10 -+++ packagemanager/opackagemanager.cpp 18 May 2009 21:03:03 -0000 -@@ -43,6 +43,7 @@ - , m_categories() - { - m_packages.setAutoDelete( true ); -+ connect( &m_ipkg, SIGNAL(signalProgress(const QString &, int)), this, SIGNAL(signalProgress(const QString &, int)) ); - } - - void OPackageManager::loadAvailablePackages() -Index: packagemanager/opackagemanager.h -=================================================================== -RCS file: /cvs/opie/noncore/settings/packagemanager/opackagemanager.h,v -retrieving revision 1.6 -diff -u -d -r1.6 opackagemanager.h ---- packagemanager/opackagemanager.h 5 Jun 2005 22:18:10 -0000 1.6 -+++ packagemanager/opackagemanager.h 18 May 2009 21:03:03 -0000 -@@ -89,6 +89,7 @@ - void initStatus( int numSteps ); - void statusText( const QString &status ); - void statusBar( int currStep ); -+ void signalProgress( const QString &msg, int percentage ); - }; - - #endif -Index: packagemanager/packagemanager.pro -=================================================================== -RCS file: /cvs/opie/noncore/settings/packagemanager/packagemanager.pro,v -retrieving revision 1.9 -diff -u -d -r1.9 packagemanager.pro ---- packagemanager/packagemanager.pro 24 Dec 2004 20:13:38 -0000 1.9 -+++ packagemanager/packagemanager.pro 18 May 2009 21:03:03 -0000 -@@ -29,7 +29,7 @@ - TARGET = packagemanager - INCLUDEPATH += $(OPIEDIR)/include - DEPENDPATH += $(OPIEDIR)/include --LIBS += -lqpe -lopiecore2 -lopieui2 -lipkg -+LIBS += -lqpe -lopiecore2 -lopieui2 -lopkg - - include( $(OPIEDIR)/include.pro ) - diff --git a/recipes/opie-packagemanager/files/opkg_update.patch b/recipes/opie-packagemanager/files/opkg_update.patch deleted file mode 100644 index 8da0a847c9..0000000000 --- a/recipes/opie-packagemanager/files/opkg_update.patch +++ /dev/null @@ -1,469 +0,0 @@ ---- packagemanager/oipkg.cpp 2010-03-17 21:43:48.000000000 +0000 -+++ packagemanager/oipkg.cpp 2010-03-17 22:48:03.000000000 +0000 -@@ -39,26 +39,45 @@ - #include <stdlib.h> - #include <unistd.h> - -+#ifdef USE_LIBOPKG -+ - const QString IPKG_CONF = "/etc/opkg.conf"; // Fully-qualified name of Ipkg primary configuration file - const QString IPKG_CONF_DIR = "/etc/opkg"; // Directory of secondary Ipkg configuration files - const QString IPKG_PKG_PATH = "/usr/lib/opkg/lists"; // Directory containing server package lists - const QString IPKG_STATUS_PATH = "usr/lib/opkg/status"; // Destination status file location - const QString IPKG_INFO_PATH = "usr/lib/opkg/info"; // Package file lists location -+#define OPKG_NO_ERROR 0 -+ -+#else -+ -+extern "C" { -+#include <libipkg.h> -+}; -+args_t m_ipkgArgs; // libipkg configuration arguments -+ -+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 -+const QString IPKG_INFO_PATH = "usr/lib/ipkg/info"; // Package file lists location -+ -+#endif - - OIpkg *oipkg; - - // Ipkg callback functions - - --void fsignalOpkgProgress (opkg_t *opkg, const opkg_progress_data_t *progress, void *user_data) -+#ifdef USE_LIBOPKG -+void fsignalOpkgProgress (const opkg_progress_data_t *progress, void *user_data) - { - QString msg; - - QString pkginfo; -- if( progress->package ) { -- pkginfo = progress->package->name; -+ if( progress->pkg ) { -+ pkginfo = progress->pkg->name; - pkginfo += " "; -- pkginfo += progress->package->version; -+ pkginfo += progress->pkg->version; - } - switch( progress->action ) { - case OPKG_INSTALL: -@@ -86,13 +105,21 @@ - oipkg->progress( (const char *)msg, progress->percentage ); - } - --void fsignalOpkgPackage (opkg_t *opkg, opkg_package_t *package, void *user_data) -+void fsignalOpkgPackage (pkg_t *package, void *user_data) - { - - } - -+void fsignalOpkgMessage (int, const char *fmt, va_list ap) -+{ -+ QString msg; -+ msg.sprintf(fmt, ap); -+ oipkg->ipkgMessage( msg ); -+} -+#endif - --/*X -+ -+#ifndef USE_LIBOPKG - int fsignalIpkgMessage( ipkg_conf_t *conf, message_level_t level, char *msg ) - { - // Display message only if it is below the message level threshold -@@ -103,7 +130,8 @@ - - return 0; - } --*/ -+#endif -+ - - char *fIpkgResponse( char */*question*/ ) - { -@@ -116,40 +144,14 @@ - return 0; - } - --QString opkg_error_message( int err ) -+#ifndef USE_LIBOPKG -+int fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/, -+ void */*userdata*/ ) - { -- switch(err) { -- case OPKG_NO_ERROR: -- return "Success"; -- case OPKG_UNKNOWN_ERROR: -- return "Unknown error"; -- case OPKG_DOWNLOAD_FAILED: -- return "Download failed"; -- case OPKG_DEPENDENCIES_FAILED: -- return "Unable to complete operation due to dependencies"; -- case OPKG_PACKAGE_ALREADY_INSTALLED: -- return "Specified package is already installed"; -- case OPKG_PACKAGE_NOT_AVAILABLE: -- return "Specified package is not available"; -- case OPKG_PACKAGE_NOT_FOUND: -- return "Specified package could not be found"; -- case OPKG_PACKAGE_NOT_INSTALLED: -- return "Specified package is not installed"; -- case OPKG_GPG_ERROR: -- return "GPG verification failed"; -- case OPKG_MD5_ERROR: -- return "MD5 verification failed"; -- default: -- return "Unrecognised error code"; -- } -+ oipkg->ipkgList( desc ); -+ return 0; - } -- --//Xint fIpkgFiles( char */*name*/, char *desc, char */*version*/, pkg_state_status_t /*status*/, --//X void */*userdata*/ ) --//X{ --//X oipkg->ipkgList( desc ); --//X return 0; --//X} -+#endif - - OIpkg::OIpkg( Config *config, QObject *parent, const char *name ) - : QObject( parent, name ) -@@ -162,7 +164,17 @@ - oipkg = this; - - // Initialize libipkg -- m_opkg = opkg_new(); -+#ifdef USE_LIBOPKG -+ opkg_new(); -+ opkg_conf_init(); -+ conf->opkg_vmessage = fsignalOpkgMessage; -+#else -+ ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); -+ -+ // Default ipkg run-time arguments -+ m_ipkgArgs.noaction = false; -+ m_ipkgArgs.force_defaults = true; -+#endif - } - - OIpkg::~OIpkg() -@@ -172,7 +184,12 @@ - m_confInfo->setAutoDelete( true ); - - // Free up libipkg resources -- opkg_free( m_opkg ); -+#ifdef USE_LIBOPKG -+ opkg_conf_deinit(); -+ opkg_free(); -+#else -+ ipkg_deinit( &m_ipkgArgs ); -+#endif - } - - OConfItemList *OIpkg::configItems() -@@ -206,13 +223,13 @@ - switch ( item->type() ) - { - case OConfItem::Source : -- case OConfItem::Destination : -+ case OConfItem::Destination : - item->setFile( IPKG_CONF_DIR + "/" + item->name() + ".conf" ); - break; -- case OConfItem::Arch : -+ case OConfItem::Arch : - item->setFile( IPKG_CONF_DIR + "/arch.conf" ); - break; -- default : -+ default : - item->setFile( IPKG_CONF ); - break; - }; -@@ -253,7 +270,7 @@ - break; - } - lastFile = item->file(); -- -+ - confStream = new QTextStream( confFile ); - // (*confStream) << "# Generated by Opie Package Manager\n\n"; - } -@@ -301,7 +318,14 @@ - } - - // Reinitialize libipkg to pick up new configuration -- opkg_re_read_config_files( m_opkg ); -+#ifdef USE_LIBOPKG -+ opkg_re_read_config_files(); -+#else -+ ipkg_deinit( &m_ipkgArgs ); -+ ipkg_init( &fsignalIpkgMessage, &fIpkgResponse, &m_ipkgArgs ); -+ m_ipkgArgs.noaction = false; -+ m_ipkgArgs.force_defaults = true; -+#endif - } - - void OIpkg::saveSettings() -@@ -497,23 +521,30 @@ - return false; - - // Set ipkg run-time options/arguments -+#ifdef USE_LIBOPKG - optvalue = ( m_ipkgExecOptions & FORCE_DEPENDS ) ? 1 : 0; -- opkg_set_option( m_opkg, "force_depends", &optvalue ); -+ opkg_set_option( "force_depends", &optvalue ); - - optvalue = ( m_ipkgExecOptions & FORCE_REINSTALL ) ? 1 : 0; -- opkg_set_option( m_opkg, "force_reinstall", &optvalue ); -+ opkg_set_option( "force_reinstall", &optvalue ); - - optvalue = ( m_ipkgExecOptions & FORCE_OVERWRITE ) ? 1 : 0; -- opkg_set_option( m_opkg, "force_overwrite", &optvalue ); -+ opkg_set_option( "force_overwrite", &optvalue ); - - optvalue = ( m_ipkgExecOptions & FORCE_RECURSIVE ) ? 1 : 0; -- opkg_set_option( m_opkg, "force_removal_of_dependent_packages", &optvalue ); -+ opkg_set_option( "force_removal_of_dependent_packages", &optvalue ); - -+ - optvalue = m_ipkgExecVerbosity; -- opkg_set_option( m_opkg, "verbosity", &optvalue ); -- --/*X // TODO m_ipkgArgs.force_remove = ( m_ipkgExecOptions & FORCE_REMOVE ); -+ opkg_set_option( "verbosity", &optvalue ); -+#else -+ m_ipkgArgs.force_depends = ( m_ipkgExecOptions & FORCE_DEPENDS ); -+ m_ipkgArgs.force_reinstall = ( m_ipkgExecOptions & FORCE_REINSTALL ); -+ // TODO m_ipkgArgs.force_remove = ( m_ipkgExecOptions & FORCE_REMOVE ); -+ m_ipkgArgs.force_overwrite = ( m_ipkgExecOptions & FORCE_OVERWRITE ); -+ m_ipkgArgs.force_removal_of_dependent_packages = ( m_ipkgExecOptions & FORCE_RECURSIVE ); - m_ipkgArgs.verbose_wget = ( m_ipkgExecOptions & FORCE_VERBOSE_WGET ); -+ m_ipkgArgs.verbosity = m_ipkgExecVerbosity; - if ( m_ipkgArgs.dest ) - free( m_ipkgArgs.dest ); - if ( !destination.isNull() ) -@@ -525,7 +556,8 @@ - } - else - m_ipkgArgs.dest = 0l; --*/ -+#endif -+ - // Connect output signal to widget - - if ( !rawOutput ) -@@ -539,23 +571,33 @@ - { - case OPackage::Update : { - connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); -- ret = opkg_update_package_lists( m_opkg, &fsignalOpkgProgress, NULL ); -+#ifdef USE_LIBOPKG -+ ret = opkg_update_package_lists( &fsignalOpkgProgress, NULL ); -+#else -+ ipkg_lists_update( &m_ipkgArgs ); -+#endif - disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); - -+#ifdef USE_LIBOPKG - if( ret != OPKG_NO_ERROR ) { -- emit signalIpkgMessage( tr("Update failed: ") + opkg_error_message( ret ) ); -+ emit signalIpkgMessage( tr("Update failed") ); - return false; - } -+#endif - }; - break; - case OPackage::Upgrade : { - connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); -- ret = opkg_upgrade_all( m_opkg, &fsignalOpkgProgress, NULL ); -+#ifdef USE_LIBOPKG -+ ret = opkg_upgrade_all( &fsignalOpkgProgress, NULL ); - if( ret != OPKG_NO_ERROR ) { -- emit signalIpkgMessage( tr("Upgrade failed: ") + opkg_error_message( ret ) ); -+ emit signalIpkgMessage( tr("Upgrade failed") ); - disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); - return false; - } -+#else -+ ipkg_packages_upgrade( &m_ipkgArgs ); -+#endif - - // Re-link non-root destinations to make sure everything is in sync - OConfItemList *destList = destinations(); -@@ -574,12 +616,16 @@ - connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); - for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) - { -- ret = opkg_install_package( m_opkg, (*it), &fsignalOpkgProgress, NULL ); -+#ifdef USE_LIBOPKG -+ ret = opkg_install_package( (*it), &fsignalOpkgProgress, NULL ); - if( ret != OPKG_NO_ERROR ) { -- emit signalIpkgMessage( tr("Install failed: ") + opkg_error_message( ret ) ); -+ emit signalIpkgMessage( tr("Install failed") ); - disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); - return false; - } -+#else -+ ipkg_packages_install( &m_ipkgArgs, (*it) ); -+#endif - } - if ( destination != "root" ) - linkPackageDir( destination ); -@@ -595,18 +641,17 @@ - for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) - { - unlinkPackage( (*it), destList ); -- ret = opkg_remove_package( m_opkg, (*it), &fsignalOpkgProgress, NULL ); -+#ifdef USE_LIBOPKG -+ ret = opkg_remove_package( (*it), &fsignalOpkgProgress, NULL ); - if( ret != OPKG_NO_ERROR ) { -- if ( ret == OPKG_DEPENDENCIES_FAILED || ret == OPKG_UNKNOWN_ERROR ) { -- emit signalIpkgMessage( tr("Remove failed: other package(s) depend on the specified package") ); -- } -- else { -- emit signalIpkgMessage( tr("Remove failed: ") + opkg_error_message( ret ) ); -- } -+ emit signalIpkgMessage( tr("Remove failed") ); - delete destList; - disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); - return false; - } -+#else -+ ipkg_packages_remove( &m_ipkgArgs, (*it), true ); -+#endif - } - - delete destList; -@@ -614,42 +659,74 @@ - }; - break; - case OPackage::Download : { -+#ifndef USE_LIBOPKG - connect( this, SIGNAL(signalIpkgMessage(const QString &)), receiver, slotOutput ); - for ( QStringList::ConstIterator it = parameters.begin(); it != parameters.end(); ++it ) - { --//X ipkg_packages_download( &m_ipkgArgs, (*it) ); -+ ipkg_packages_download( &m_ipkgArgs, (*it) ); - } - disconnect( this, SIGNAL(signalIpkgMessage(const QString &)), 0, 0 ); -+#endif - }; - break; - case OPackage::Info : { - connect( this, SIGNAL(signalIpkgStatus(const QString &)), receiver, slotOutput ); --//X ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l ); -- opkg_package_t *pkginfo = opkg_find_package( m_opkg, (*parameters.begin()), NULL, NULL, NULL ); -+#ifdef USE_LIBOPKG -+ pkg_t *pkginfo = opkg_find_package( (*parameters.begin()), NULL, NULL, NULL ); - if(pkginfo) { - QString msg = tr("Package: %1\n").arg( pkginfo->name ); - msg += tr("Version: %1\n").arg( pkginfo->version ); - msg += tr("Architecture: %1\n").arg( pkginfo->architecture ); -- if( pkginfo->repository ) -- msg += tr("Repository: %1\n").arg( pkginfo->repository ); -+ if( pkginfo->source ) -+ msg += tr("Source: %1\n").arg( pkginfo->source ); - if( pkginfo->description ) - msg += tr("Description: %1\n\n").arg( pkginfo->description ); - if( pkginfo->tags ) - msg += tr("Tags: %1\n").arg( pkginfo->tags ); -- if( pkginfo->url ) -- msg += tr("URL: %1\n").arg( pkginfo->url ); - if( pkginfo->size > 0 ) - msg += tr("Size: %1\n").arg( pkginfo->size ); -- msg += tr("Status: %1").arg( pkginfo->installed ? tr("installed") : "" ); -+ QString status; -+ switch( pkginfo->state_status ) { -+ case SS_NOT_INSTALLED: -+ status = tr( "Not installed" ); -+ break; -+ case SS_UNPACKED: -+ status = tr( "Unpacked" ); -+ break; -+ case SS_HALF_CONFIGURED: -+ status = tr( "Partially configured" ); -+ break; -+ case SS_INSTALLED: -+ status = tr( "Installed" ); -+ break; -+ case SS_HALF_INSTALLED: -+ status = tr( "Partially installed" ); -+ break; -+// case SS_CONFIG_FILES: -+ case SS_POST_INST_FAILED: -+ status = tr( "Postinst failed" ); -+ break; -+ case SS_REMOVAL_FAILED: -+ status = tr( "Removal failed" ); -+ break; -+ default: -+ status = tr( "Unknown" ); -+ } -+ msg += tr("Status: %1").arg( status ); - emit signalIpkgStatus( msg ); - } -+#else -+ ipkg_packages_info( &m_ipkgArgs, (*parameters.begin()), &fIpkgStatus, 0l ); -+#endif - disconnect( this, SIGNAL(signalIpkgStatus(const QString &)), 0, 0 ); - }; - break; - case OPackage::Files : { -+#ifndef USE_LIBOPKG - connect( this, SIGNAL(signalIpkgList(const QString &)), receiver, slotOutput ); --//X ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l ); -+ ipkg_package_files( &m_ipkgArgs, (*parameters.begin()), &fIpkgFiles, 0l ); - disconnect( this, SIGNAL(signalIpkgList(const QString &)), 0, 0 ); -+#endif - }; - break; - default : break; ---- packagemanager/oipkg.h 2010-03-17 21:43:48.000000000 +0000 -+++ packagemanager/oipkg.h 2010-03-17 22:50:24.000000000 +0000 -@@ -31,6 +31,8 @@ - #ifndef OIPKG_H - #define OIPKG_H - -+#include <cstdio> -+ - #include "oconfitem.h" - #include "opackage.h" - -@@ -38,10 +40,27 @@ - - #include <qobject.h> - -+// Hack for 1.2.4 patch -+#define USE_LIBOPKG -+ -+#ifdef USE_LIBOPKG -+// Some hacks are required due to poor naming in opkg headers -+#ifdef DEBUG -+ #define DEBUG_FIX -+ #undef DEBUG -+#endif -+ - extern "C" { - #include <opkg.h> - }; - -+#ifdef DEBUG_FIX -+ #define DEBUG -+ #undef DEBUG_FIX -+#endif -+ -+#endif -+ - // Ipkg execution options (m_ipkgExecOptions) - #define FORCE_DEPENDS 0x0001 - #define FORCE_REMOVE 0x0002 -@@ -102,7 +121,6 @@ - int m_ipkgExecOptions; // Bit-mapped flags for Ipkg execution options - int m_ipkgExecVerbosity; // Ipkg execution verbosity level - QString m_rootPath; // Directory path where the 'root' destination is located -- opkg_t *m_opkg; - - void loadConfiguration(); - OConfItemList *filterConfItems( OConfItem::Type typefilter = OConfItem::NotDefined ); diff --git a/recipes/opie-packagemanager/files/split-config.patch b/recipes/opie-packagemanager/files/split-config.patch deleted file mode 100644 index 5abe5433aa..0000000000 --- a/recipes/opie-packagemanager/files/split-config.patch +++ /dev/null @@ -1,334 +0,0 @@ -# NOTE: This patch has been applied upstream and will be included in 1.2.5 -# - Paul Eggleton <bluelightning@bluelightning.org> ---- packagemanager/oipkg.cpp 2009-05-11 23:06:48.000000000 +0100 -+++ packagemanager/oipkg.cpp 2009-05-11 23:06:50.000000000 +0100 -@@ -30,6 +30,8 @@ - - #include "oipkg.h" - -+#include <opie2/odebug.h> -+ - #include <qdir.h> - #include <qfile.h> - #include <qtextstream.h> -@@ -133,6 +135,26 @@ - return filterConfItems( OConfItem::Option ); - } - -+void OIpkg::defaultConfItemFile( OConfItem *item ) -+{ -+ if( item->file().isNull() ) -+ { -+ switch ( item->type() ) -+ { -+ case OConfItem::Source : -+ case OConfItem::Destination : -+ item->setFile( IPKG_CONF_DIR + "/" + item->name() + ".conf" ); -+ break; -+ case OConfItem::Arch : -+ item->setFile( IPKG_CONF_DIR + "/arch.conf" ); -+ break; -+ default : -+ item->setFile( IPKG_CONF ); -+ break; -+ }; -+ } -+} -+ - void OIpkg::setConfigItems( OConfItemList *configList ) - { - if ( m_confInfo ) -@@ -140,84 +162,78 @@ - - m_confInfo = configList; - -- // Write out new /etc/ipkg.conf -- QFile confFile( IPKG_CONF ); -- if ( confFile.open( IO_WriteOnly ) ) -+ // Write out new config files -+ QString lastFile = ""; -+ QFile *confFile = NULL; -+ QTextStream *confStream = NULL; -+ OConfItemListIterator it( *m_confInfo ); -+ for ( ; it.current(); ++it ) - { -- QTextStream confStream( &confFile ); -- confStream << "# Generated by Opie Package Manager\n\n"; -+ OConfItem *item = it.current(); - -- OConfItemListIterator it( *m_confInfo ); -- for ( ; it.current(); ++it ) -+ // Only write out valid conf items -+ if ( item->type() != OConfItem::NotDefined ) - { -- OConfItem *item = it.current(); -+ if ( lastFile != item->file() ) { -+ if ( confFile ) { -+ confFile->close(); -+ delete confStream; -+ delete confFile; -+ } -+ odebug << "Opening " << item->file() << oendl; -+ confFile = new QFile( item->file() ); -+ if ( ! confFile->open( IO_WriteOnly ) ) { -+ owarn << "Failed to open " << item->file() << oendl; -+ delete confFile; -+ confFile = NULL; -+ break; -+ } -+ lastFile = item->file(); -+ -+ confStream = new QTextStream( confFile ); -+// (*confStream) << "# Generated by Opie Package Manager\n\n"; -+ } - -- // Only write out valid conf items -- if ( item->type() != OConfItem::NotDefined ) -- { -- QString confLine; -- QString name = item->name(); -- if ( !item->active() ) -- confLine = "#"; -+ QString confLine; -+ QString name = item->name(); -+ if ( !item->active() ) -+ confLine = "#"; - -- switch ( item->type() ) -+ switch ( item->type() ) -+ { -+ case OConfItem::Source : - { -- case OConfItem::Source : -- { -- if ( item->features().contains( "Compressed" ) ) -- confLine.append( "src/gz" ); -- else -- confLine.append( "src" ); -- } -- break; -- case OConfItem::Destination : confLine.append( "dest" ); break; -- case OConfItem::Option : confLine.append( "option" ); break; -- case OConfItem::Arch : confLine.append( "arch" ); break; -- case OConfItem::Other : -- { -- // For options w/type = Other, the mapping is as follows: -- // name = typeStr (e.g. "lists_dir") -- // value = value -- // features = name (from configuration file) -- confLine.append( item->name() ); -- name = item->features(); -- } -- break; -- default : break; -- }; -+ if ( item->features().contains( "Compressed" ) ) -+ confLine.append( "src/gz" ); -+ else -+ confLine.append( "src" ); -+ } -+ break; -+ case OConfItem::Destination : confLine.append( "dest" ); break; -+ case OConfItem::Option : confLine.append( "option" ); break; -+ case OConfItem::Arch : confLine.append( "arch" ); break; -+ case OConfItem::Other : -+ { -+ // For options w/type = Other, the mapping is as follows: -+ // name = typeStr (e.g. "lists_dir") -+ // value = value -+ // features = name (from configuration file) -+ confLine.append( item->name() ); -+ name = item->features(); -+ } -+ break; -+ default : break; -+ }; - -- confStream << confLine << " " << name << " " << item->value() << "\n"; -- } -+ (*confStream) << confLine << " " << name << " " << item->value() << "\n"; - } - -- confFile.close(); - } -- else -- { -- // Problem writing to /etc/ipkg.conf, exit before removing other conf files -- return; -- } -- -- // Delete /etc/ipkg/*.conf files (/etc/ipkg.conf should now have all settings -- QStringList confFiles; -- QDir confDir( IPKG_CONF_DIR ); -- if ( confDir.exists() ) -- { -- confDir.setNameFilter( "*.conf" ); -- confDir.setFilter( QDir::Files ); -- confFiles = confDir.entryList( "*.conf", QDir::Files ); -- -- QStringList::Iterator lastFile = confFiles.end(); -- for ( QStringList::Iterator it = confFiles.begin(); it != lastFile; ++it ) -- { -- // Create absolute file path if necessary -- QString absFile = (*it); -- if ( !absFile.startsWith( "/" ) ) -- absFile.prepend( QString( IPKG_CONF_DIR ) + "/" ); - -- // Delete file -- QFile::remove( absFile ); -- } -+ if ( confFile ) { -+ confFile->close(); -+ delete confStream; -+ delete confFile; - } - - // Reinitialize libipkg to pick up new configuration -@@ -638,7 +654,7 @@ - - // Add to list - if ( recognizedOption ) -- m_confInfo->append( new OConfItem( type, name, value, features, active ) ); -+ m_confInfo->append( new OConfItem( type, name, value, features, absFile, active ) ); - } - } - ---- packagemanager/oconfitem.cpp 2009-05-11 23:09:00.000000000 +0100 -+++ packagemanager/oconfitem.cpp 2009-05-11 23:09:02.000000000 +0100 -@@ -31,11 +31,12 @@ - #include "oconfitem.h" - - OConfItem::OConfItem( Type type, const QString &name, const QString &value, -- const QString &features, bool active ) -+ const QString &features, const QString &file, bool active ) - : m_type( type ) - , m_name( name ) - , m_value( value ) - , m_features( features ) -+ , m_file( file ) - , m_active( active ) - { - } ---- packagemanager/oconfitem.h 2009-05-11 23:08:43.000000000 +0100 -+++ packagemanager/oconfitem.h 2009-05-11 23:08:45.000000000 +0100 -@@ -41,18 +41,20 @@ - - OConfItem( Type type = NotDefined, const QString &name = QString::null, - const QString &value = QString::null, const QString &features = QString::null, -- bool active = true ); -+ const QString &file = 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; } -+ const QString &file() { return m_file; } - bool active() { return m_active; } - - void setType( Type type ) { m_type = type; } - void setName( const QString &name ) { m_name = name; } - void setValue( const QString &value ) { m_value = value; } - void setFeatures( const QString &features ) { m_features = features; } -+ void setFile( const QString &file ) { m_file = file; } - void setActive( bool active ) { m_active = active; } - - private: -@@ -60,6 +62,7 @@ - QString m_name; // Name of item - QString m_value; // Value of item - QString m_features; // Comma-deliminated list of features this item supports -+ QString m_file; // File this item came from - bool m_active; // Indicates whether item is currently active - }; - -@@ -69,23 +72,32 @@ - - int compareItems( QCollection::Item item1, QCollection::Item item2 ) - { -- // Sort by OConfItem location then by type -- OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type(); -- OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type(); -- if ( type1 < type2 ) -+ // Sort by OConfItem file, name, then by type -+ QString file1 = reinterpret_cast<OConfItem*>(item1)->file(); -+ QString file2 = reinterpret_cast<OConfItem*>(item2)->file(); -+ if ( file1 < file2 ) - return -1; -- else if ( type1 == type2 ) -+ else if ( file1 == file2 ) - { -- QString name1 = reinterpret_cast<OConfItem*>(item1)->name(); -- QString name2 = reinterpret_cast<OConfItem*>(item2)->name(); -- if ( name1 < name2 ) -+ OConfItem::Type type1 = reinterpret_cast<OConfItem*>(item1)->type(); -+ OConfItem::Type type2 = reinterpret_cast<OConfItem*>(item2)->type(); -+ if ( type1 < type2 ) - return -1; -- else if ( name1 == name2 ) -- return 0; -- else /*if ( name1 > name2 )*/ -+ else if ( type1 == type2 ) -+ { -+ QString name1 = reinterpret_cast<OConfItem*>(item1)->name(); -+ QString name2 = reinterpret_cast<OConfItem*>(item2)->name(); -+ if ( name1 < name2 ) -+ return -1; -+ else if ( name1 == name2 ) -+ return 0; -+ else /*if ( name1 > name2 )*/ -+ return 1; -+ } -+ else /*if ( type1 > type2 )*/ - return 1; - } -- else /*if ( type1 > type2 )*/ -+ else /*if ( file1 > file2 )*/ - return 1; - } - }; ---- packagemanager/oipkgconfigdlg.cpp 2009-05-11 23:08:21.000000000 +0100 -+++ packagemanager/oipkgconfigdlg.cpp 2009-05-11 23:08:23.000000000 +0100 -@@ -99,7 +99,7 @@ - } - else - m_configs->append( new OConfItem( OConfItem::Option, "http_proxy", -- m_proxyHttpServer->text(), QString::null, -+ m_proxyHttpServer->text(), QString::null, QString::null, - m_proxyHttpActive->isChecked() ) ); - - confItem = m_ipkg->findConfItem( OConfItem::Option, "ftp_proxy" ); -@@ -110,7 +110,7 @@ - } - else - m_configs->append( new OConfItem( OConfItem::Option, "ftp_proxy", -- m_proxyFtpServer->text(), QString::null, -+ m_proxyFtpServer->text(), QString::null, QString::null, - m_proxyFtpActive->isChecked() ) ); - - confItem = m_ipkg->findConfItem( OConfItem::Option, "proxy_username" ); -@@ -472,6 +472,7 @@ - if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) - { - // Add to configuration option list -+ m_ipkg->defaultConfItemFile( server ); - m_configs->append( server ); - m_configs->sort(); - -@@ -532,6 +533,7 @@ - if ( QPEApplication::execDialog( &dlg ) == QDialog::Accepted ) - { - // Add to configuration option list -+ m_ipkg->defaultConfItemFile( dest ); - m_configs->append( dest ); - m_configs->sort(); - ---- packagemanager/oipkg.h 16 Jan 2006 15:07:35 -0000 1.9 -+++ packagemanager/oipkg.h 17 May 2009 21:26:55 -0000 -@@ -76,6 +76,7 @@ - - OConfItem *findConfItem( OConfItem::Type type = OConfItem::NotDefined, - const QString &name = QString::null ); -+ void defaultConfItemFile( OConfItem *item ); - - bool executeCommand( OPackage::Command command = OPackage::NotDefined, - const QStringList ¶meters = QStringList(), diff --git a/recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb b/recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb deleted file mode 100644 index f03906cab4..0000000000 --- a/recipes/opie-packagemanager/opie-packagemanager_1.2.4.bb +++ /dev/null @@ -1,20 +0,0 @@ -require ${PN}.inc - -PR = "r4" - -DEPENDS = "opkg" - -EXTRA_QMAKEVARS_PRE += "LIBIPK_INC_DIR=${STAGING_INCDIR}/libopkg" - -SRC_URI = "http://sources.openembedded.org/opie-1.2.4-split_noncore_settings_${APPNAME}.tar.bz2;name=split_noncore_settings_appname \ - http://sources.openembedded.org/opie-1.2.4-split_pics.tar.bz2;name=split_pics \ - http://sources.openembedded.org/opie-1.2.4-split_apps.tar.bz2;name=split_apps \ - file://split-config.patch \ - file://opkg.patch \ - file://opkg_update.patch" -SRC_URI[split_noncore_settings_appname.md5sum] = "1bcd7dee5e444cacf51bd60ead83be91" -SRC_URI[split_noncore_settings_appname.sha256sum] = "7ee28ca39a37faa12f2b5cc2a18f62076333aefa91f62a0ee977cfe65d4c95c1" -SRC_URI[split_pics.md5sum] = "5499dc84b65395ab99bda6ed9d01ff0f" -SRC_URI[split_pics.sha256sum] = "f22781f36e84e12d51fff1eb68cc3fb98221c7d807a82226813b7e974a604109" -SRC_URI[split_apps.md5sum] = "67a43e8e4bcd9e63b884ea25deea5b34" -SRC_URI[split_apps.sha256sum] = "a33a55efb4ae4c15a8c2c5d6faba6d671a5652da8e216ce35088896fe597215b" |