author | andyq <andyq> | 2003-01-18 12:40:22 (UTC) |
---|---|---|
committer | andyq <andyq> | 2003-01-18 12:40:22 (UTC) |
commit | 2ad938f8470eb460ea5dae6ca3844c4dcc6cd991 (patch) (unidiff) | |
tree | 52235c5f9f4ecc469b1d0ae57f1482e1cf2c475a | |
parent | 1c9b38eaee495c13d5d3fcbd818965339cc6d0ce (diff) | |
download | opie-2ad938f8470eb460ea5dae6ca3844c4dcc6cd991.zip opie-2ad938f8470eb460ea5dae6ca3844c4dcc6cd991.tar.gz opie-2ad938f8470eb460ea5dae6ca3844c4dcc6cd991.tar.bz2 |
Fixed relinking of files when upgrade selected (now removes old links first and recreates them after), also cut down on spurious failed to link errors on linking
-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 | |||
@@ -119,9 +119,9 @@ bool Ipkg :: runIpkg( ) | |||
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 ) |
@@ -141,7 +141,7 @@ bool Ipkg :: runIpkg( ) | |||
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 |
@@ -522,8 +522,8 @@ void Ipkg :: processLinkDir( const QString &file, const QString &destDir, const | |||
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 |
@@ -552,9 +552,12 @@ void Ipkg :: processLinkDir( const QString &file, const QString &destDir, const | |||
552 | { | 552 | { |
553 | QDir d; | 553 | QDir d; |
554 | bool rc = d.rmdir( linkFile, true ); | 554 | bool rc = d.rmdir( linkFile, true ); |
555 | text = (rc ? "Removed " : "Failed to remove "); | 555 | if ( rc ) |
556 | text += linkFile; | 556 | { |
557 | emit outputText( text ); | 557 | text = (rc ? "Removed " : "Failed to remove "); |
558 | text += linkFile; | ||
559 | emit outputText( text ); | ||
560 | } | ||
558 | } | 561 | } |
559 | } | 562 | } |
560 | } | 563 | } |