summaryrefslogtreecommitdiff
authorandyq <andyq>2002-10-29 18:33:34 (UTC)
committer andyq <andyq>2002-10-29 18:33:34 (UTC)
commit45d9a30ec17b5146ffdac8e776003752fe2deeea (patch) (side-by-side diff)
treefeeefaa97320466bd704c3b8253cfa5970616571
parent2c3aa49e64a63f475bd60707c8cc105829691ab1 (diff)
downloadopie-45d9a30ec17b5146ffdac8e776003752fe2deeea.zip
opie-45d9a30ec17b5146ffdac8e776003752fe2deeea.tar.gz
opie-45d9a30ec17b5146ffdac8e776003752fe2deeea.tar.bz2
Removed crap status message after ipkg finishes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp
index 731a336..c762633 100644
--- a/noncore/settings/aqpkg/ipkg.cpp
+++ b/noncore/settings/aqpkg/ipkg.cpp
@@ -112,97 +112,98 @@ bool Ipkg :: runIpkg( )
// If we are removing packages and make links option is selected
// create the links
if ( option == "remove" || option == "reinstall" )
{
createLinks = false;
if ( flags & MAKE_LINKS )
{
emit outputText( QString( "Removing symbolic links...\n" ) );
linkPackage( Utils::getPackageNameFromIpkFilename( package ), destination, destDir );
emit outputText( QString( " " ) );
}
}
emit outputText( cmd );
// Execute command
dependantPackages = new QList<QString>;
dependantPackages->setAutoDelete( true );
ret = executeIpkgCommand( cmd, option );
if ( option == "install" || option == "reinstall" )
{
// If we are not removing packages and make links option is selected
// create the links
createLinks = true;
if ( flags & MAKE_LINKS )
{
emit outputText( " " );
emit outputText( QString( "Creating symbolic links for " )+ package );
linkPackage( Utils::getPackageNameFromIpkFilename( package ), destination, destDir );
// link dependant packages that were installed with this release
QString *pkg;
for ( pkg = dependantPackages->first(); pkg != 0; pkg = dependantPackages->next() )
{
if ( *pkg == package )
continue;
emit outputText( " " );
emit outputText( QString( "Creating symbolic links for " )+ (*pkg) );
linkPackage( Utils::getPackageNameFromIpkFilename( *pkg ), destination, destDir );
}
}
}
delete dependantPackages;
- emit outputText( QString( "Finished - status=" ) + (ret ? "success" : "failure") );
+// emit outputText( QString( "Finished - status=" ) + (ret ? "success" : "failure") );
+ emit outputText( "Finished" );
emit outputText( "" );
return ret;
}
int Ipkg :: executeIpkgCommand( QString &cmd, const QString option )
{
FILE *fp = NULL;
char line[130];
QString lineStr, lineStrOld;
int ret = false;
fp = popen( (const char *) cmd, "r");
if ( fp == NULL )
{
cout << "Couldn't execute " << cmd << "! err = " << fp << endl;
QString text;
text.sprintf( "Couldn't execute %s! See stdout for error code", (const char *)cmd );
emit outputText( text );
}
else
{
while ( fgets( line, sizeof line, fp) != NULL )
{
lineStr = line;
lineStr=lineStr.left( lineStr.length()-1 );
if ( lineStr != lineStrOld )
{
//See if we're finished
if ( option == "install" || option == "reinstall" )
{
// Need to keep track of any dependant packages that get installed
// so that we can create links to them as necessary
if ( lineStr.startsWith( "Installing " ) )
{
int start = lineStr.find( " " ) + 1;
int end = lineStr.find( " ", start );
QString *package = new QString( lineStr.mid( start, end-start ) );
dependantPackages->append( package );
}
}
if ( option == "update" )
{
if (lineStr.contains("Updated list"))
ret = true;
}