brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/4] incubator-brooklyn git commit: Derive artefact and directory names from download URL.
Date Fri, 11 Dec 2015 15:49:42 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/0.8.x a046f433b -> b3e523d2a


Derive artefact and directory names from download URL.


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/87673df4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/87673df4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/87673df4

Branch: refs/heads/0.8.x
Commit: 87673df4939a9470820f1ae1f8ce072155e26b61
Parents: 09bfa07
Author: Alasdair Hodge <github@alasdairhodge.co.uk>
Authored: Wed Dec 9 11:22:04 2015 +0000
Committer: Alasdair Hodge <github@alasdairhodge.co.uk>
Committed: Fri Dec 11 13:06:52 2015 +0000

----------------------------------------------------------------------
 .../brooklyn/entity/database/mysql/MySqlSshDriver.java      | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/87673df4/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java
----------------------------------------------------------------------
diff --git a/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java
b/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java
index 313a583..1ce6ddd 100644
--- a/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java
+++ b/software/database/src/main/java/org/apache/brooklyn/entity/database/mysql/MySqlSshDriver.java
@@ -107,14 +107,15 @@ public class MySqlSshDriver extends AbstractSoftwareProcessSshDriver
implements
         return "mymysql.cnf";
     }
 
-    public String getInstallFilename() {
-        return String.format("mysql-%s-%s.tar.gz", getVersion(), getOsTag());
+    public String getDefaultUnpackedDirectoryName() {
+        return Strings.removeAllFromEnd(resolver.getFilename(), ".tar.gz");
     }
 
     @Override
     public void preInstall() {
-        resolver = Entities.newDownloader(this, ImmutableMap.of("filename", getInstallFilename()));
-        setExpandedInstallDir(Os.mergePaths(getInstallDir(), resolver.getUnpackedDirectoryName(format("mysql-%s-%s",
getVersion(), getOsTag()))));
+        resolver = Entities.newDownloader(this);
+        String unpackedDirectoryName = resolver.getUnpackedDirectoryName(getDefaultUnpackedDirectoryName());
+        setExpandedInstallDir(Os.mergePaths(getInstallDir(), unpackedDirectoryName));
     }
 
     @Override


Mime
View raw message