summaryrefslogtreecommitdiff
authorandyq <andyq>2003-01-18 12:40:22 (UTC)
committer andyq <andyq>2003-01-18 12:40:22 (UTC)
commit2ad938f8470eb460ea5dae6ca3844c4dcc6cd991 (patch) (side-by-side diff)
tree52235c5f9f4ecc469b1d0ae57f1482e1cf2c475a
parent1c9b38eaee495c13d5d3fcbd818965339cc6d0ce (diff)
downloadopie-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
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/aqpkg/ipkg.cpp19
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
@@ -120,7 +120,7 @@ bool Ipkg :: runIpkg( )
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;
@@ -142,5 +142,5 @@ bool Ipkg :: runIpkg( )
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
@@ -523,6 +523,6 @@ void Ipkg :: processLinkDir( const QString &file, const QString &destDir, const
d.mkdir( linkFile, true );
}
- else
- emit outputText( QString( "Directory " ) + linkFile + " already exists" );
+// else
+// emit outputText( QString( "Directory " ) + linkFile + " already exists" );
}
@@ -553,7 +553,10 @@ void Ipkg :: processLinkDir( const QString &file, const QString &destDir, const
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 );
+ }
}
}