diff options
author | Roman Shaposhnik <rvs@apache.org> | 2012-03-24 00:33:47 +0000 |
---|---|---|
committer | Roman Shaposhnik <rvs@apache.org> | 2012-03-24 00:33:47 +0000 |
commit | 724db8753b158cfa53ecf988ab5c4c6ba0ad915c (patch) | |
tree | 0c8e36c674029778a4986cf53013620e6b9fc153 /bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy | |
parent | de84122b280a1ad909d87335bed2877996a1e7ac (diff) |
BIGTOP-481. fix the way to handle repo key for Debian like system (Johnny Zhang via rvs)
git-svn-id: https://svn.apache.org/repos/asf/incubator/bigtop/trunk@1304685 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy')
-rw-r--r-- | bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy b/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy index 15a802ff..0ab726c2 100644 --- a/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy +++ b/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy @@ -29,6 +29,18 @@ class AptCmdLinePackageManager extends PackageManager { shRoot.exec("debconf-set-selections <<__EOT__\n${defaults}\n__EOT__"); } + public int addBinRepo(String record, String url, String key) { + if (key) { + def text = key.toURL().text; + shRoot.exec("apt-key add - <<__EOT__\n${text}\n__EOT__"); + if (shRoot.getRet()) { + return shRoot.getRet(); + } + } else { + return addBinRepo(record, url); + } + } + public int addBinRepo(String record, String url, String key, String cookie) { if (!url) url = ROOT_URL; |