-rw-r--r-- | noncore/settings/aqpkg/ipkg.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/noncore/settings/aqpkg/ipkg.cpp b/noncore/settings/aqpkg/ipkg.cpp index 29bf40d..51eca8b 100644 --- a/noncore/settings/aqpkg/ipkg.cpp +++ b/noncore/settings/aqpkg/ipkg.cpp @@ -114,19 +114,19 @@ bool Ipkg :: runIpkg( ) commands << package; if ( package != "" ) emit outputText( QString( "Dealing with package " ) + package ); qApp->processEvents(); - // If we are removing packages and make links option is selected + // If we are removing, reinstalling or upgrading packages and make links option is selected // create the links - if ( option == "remove" || option == "reinstall" ) + if ( option == "remove" || option == "reinstall" || option == "upgrade" ) { createLinks = false; if ( flags & MAKE_LINKS ) { emit outputText( QString( "Removing symbolic links...\n" ) ); linkPackage( Utils::getPackageNameFromIpkFilename( package ), destination, destDir ); emit outputText( QString( " " ) ); } @@ -136,17 +136,17 @@ bool Ipkg :: runIpkg( ) dependantPackages = new QList<QString>; dependantPackages->setAutoDelete( true ); ret = executeIpkgCommand( commands, option ); if ( aborted ) return false; - if ( option == "install" || option == "reinstall" ) + if ( option == "install" || option == "reinstall" || option == "upgrade" ) { // 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 ); @@ -517,18 +517,18 @@ void Ipkg :: processLinkDir( const QString &file, const QString &destDir, const { QFileInfo f( linkFile ); if ( !f.exists() ) { emit outputText( QString( "Creating directory " ) + linkFile ); QDir d; d.mkdir( linkFile, true ); } - else - emit outputText( QString( "Directory " ) + linkFile + " already exists" ); +// else +// emit outputText( QString( "Directory " ) + linkFile + " already exists" ); } else { int rc = symlink( sourceFile, linkFile ); text = (rc == 0 ? "Linked " : "Failed to link "); text += sourceFile + " to " + linkFile; emit outputText( text ); @@ -547,16 +547,19 @@ void Ipkg :: processLinkDir( const QString &file, const QString &destDir, const text = (rc ? "Removed " : "Failed to remove "); text += linkFile; emit outputText( text ); } else if ( f.isDir() ) { QDir d; bool rc = d.rmdir( linkFile, true ); - text = (rc ? "Removed " : "Failed to remove "); - text += linkFile; - emit outputText( text ); + if ( rc ) + { + text = (rc ? "Removed " : "Failed to remove "); + text += linkFile; + emit outputText( text ); + } } } } } |