summaryrefslogtreecommitdiff
path: root/noncore/settings/packagemanager/oipkg.cpp
Unidiff
Diffstat (limited to 'noncore/settings/packagemanager/oipkg.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/packagemanager/oipkg.cpp7
1 files changed, 2 insertions, 5 deletions
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
@@ -33,13 +33,12 @@
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
@@ -79,14 +78,13 @@ OIpkg::OIpkg( Config *config, QObject *parent, const char *name )
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
@@ -94,14 +92,13 @@ OIpkg::~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();