summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp13
1 files changed, 8 insertions, 5 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
@@ -116,15 +116,15 @@ bool Ipkg :: runIpkg( )
116 116
117 if ( package != "" ) 117 if ( package != "" )
118 emit outputText( QString( "Dealing with package " ) + package ); 118 emit outputText( QString( "Dealing with package " ) + package );
119 119
120 qApp->processEvents(); 120 qApp->processEvents();
121 121
122 // If we are removing packages and make links option is selected 122 // If we are removing, reinstalling or upgrading packages and make links option is selected
123 // create the links 123 // create the links
124 if ( option == "remove" || option == "reinstall" ) 124 if ( option == "remove" || option == "reinstall" || option == "upgrade" )
125 { 125 {
126 createLinks = false; 126 createLinks = false;
127 if ( flags & MAKE_LINKS ) 127 if ( flags & MAKE_LINKS )
128 { 128 {
129 emit outputText( QString( "Removing symbolic links...\n" ) ); 129 emit outputText( QString( "Removing symbolic links...\n" ) );
130 linkPackage( Utils::getPackageNameFromIpkFilename( package ), destination, destDir ); 130 linkPackage( Utils::getPackageNameFromIpkFilename( package ), destination, destDir );
@@ -138,13 +138,13 @@ bool Ipkg :: runIpkg( )
138 138
139 ret = executeIpkgCommand( commands, option ); 139 ret = executeIpkgCommand( commands, option );
140 140
141 if ( aborted ) 141 if ( aborted )
142 return false; 142 return false;
143 143
144 if ( option == "install" || option == "reinstall" ) 144 if ( option == "install" || option == "reinstall" || option == "upgrade" )
145 { 145 {
146 // If we are not removing packages and make links option is selected 146 // If we are not removing packages and make links option is selected
147 // create the links 147 // create the links
148 createLinks = true; 148 createLinks = true;
149 if ( flags & MAKE_LINKS ) 149 if ( flags & MAKE_LINKS )
150 { 150 {
@@ -519,14 +519,14 @@ void Ipkg :: processLinkDir( const QString &file, const QString &destDir, const
519 if ( !f.exists() ) 519 if ( !f.exists() )
520 { 520 {
521 emit outputText( QString( "Creating directory " ) + linkFile ); 521 emit outputText( QString( "Creating directory " ) + linkFile );
522 QDir d; 522 QDir d;
523 d.mkdir( linkFile, true ); 523 d.mkdir( linkFile, true );
524 } 524 }
525 else 525// else
526 emit outputText( QString( "Directory " ) + linkFile + " already exists" ); 526// emit outputText( QString( "Directory " ) + linkFile + " already exists" );
527 527
528 } 528 }
529 else 529 else
530 { 530 {
531 int rc = symlink( sourceFile, linkFile ); 531 int rc = symlink( sourceFile, linkFile );
532 text = (rc == 0 ? "Linked " : "Failed to link "); 532 text = (rc == 0 ? "Linked " : "Failed to link ");
@@ -549,14 +549,17 @@ void Ipkg :: processLinkDir( const QString &file, const QString &destDir, const
549 emit outputText( text ); 549 emit outputText( text );
550 } 550 }
551 else if ( f.isDir() ) 551 else if ( f.isDir() )
552 { 552 {
553 QDir d; 553 QDir d;
554 bool rc = d.rmdir( linkFile, true ); 554 bool rc = d.rmdir( linkFile, true );
555 if ( rc )
556 {
555 text = (rc ? "Removed " : "Failed to remove "); 557 text = (rc ? "Removed " : "Failed to remove ");
556 text += linkFile; 558 text += linkFile;
557 emit outputText( text ); 559 emit outputText( text );
558 } 560 }
559 } 561 }
560 } 562 }
563 }
561 564
562} 565}