brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [05/15] incubator-brooklyn git commit: Derive artefact and directory names from download URL.
Date Fri, 11 Dec 2015 12:39:55 GMT
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/6fcc0e62
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/6fcc0e62
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/6fcc0e62

Branch: refs/heads/master
Commit: 6fcc0e623208a803abb01124384f4b1e91c2b34a
Parents: 89440c3
Author: Alasdair Hodge <github@alasdairhodge.co.uk>
Authored: Wed Dec 9 11:22:04 2015 +0000
Committer: Alasdair Hodge <github@alasdairhodge.co.uk>
Committed: Wed Dec 9 12:57:53 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/6fcc0e62/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 2d14726..7b38cbd 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
@@ -111,14 +111,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