You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bigtop.apache.org by rv...@apache.org on 2012/03/24 01:33:23 UTC
svn commit: r1304684 - in /incubator/bigtop/branches/hadoop-0.23:
bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/
bigtop-tests/test-artifacts/package/src/main/groovy/org/apache/bigtop/itest/packagesmoke/
Author: rvs
Date: Sat Mar 24 00:33:23 2012
New Revision: 1304684
URL: http://svn.apache.org/viewvc?rev=1304684&view=rev
Log:
BIGTOP-481. fix the way to handle repo key for Debian like system (Johnny Zhang via rvs)
Modified:
incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy
incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/PackageManager.groovy
incubator/bigtop/branches/hadoop-0.23/bigtop-tests/test-artifacts/package/src/main/groovy/org/apache/bigtop/itest/packagesmoke/PackageTestRepoMgr.groovy
Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy?rev=1304684&r1=1304683&r2=1304684&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/AptCmdLinePackageManager.groovy Sat Mar 24 00:33:23 2012
@@ -29,6 +29,18 @@ class AptCmdLinePackageManager extends P
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;
Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/PackageManager.groovy
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/PackageManager.groovy?rev=1304684&r1=1304683&r2=1304684&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/PackageManager.groovy (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-test-framework/src/main/groovy/org/apache/bigtop/itest/pmanager/PackageManager.groovy Sat Mar 24 00:33:23 2012
@@ -42,6 +42,17 @@ public abstract class PackageManager {
*/
abstract public int addBinRepo(String record, String url, String key, String cookie)
/**
+ * Register a binary package repository so that packages can be accessed from it.
+ * NOTE: repository management is assumed to follow a KVP API with unique implementation
+ * specific keys (records) referencing tuples of information describing a repository
+ *
+ * @param record a package manager specific KEY portion of the repository registration (null is default)
+ * @param url a URL containing the packages constituting the repository (null is default)
+ * @param key an optional (can be null) cryptographic key for authenticating the content of the repository
+ * @return int return code of the operation: o in case of success, non-zero otherwise
+ */
+ abstract public int addBinRepo(String record, String url, String key)
+ /**
* Register a binary package repository so that packages can be accessed from it.
* NOTE: repository management is assumed to follow a KVP API with unique implementation
* specific keys (records) referencing tuples of information describing a repository
Modified: incubator/bigtop/branches/hadoop-0.23/bigtop-tests/test-artifacts/package/src/main/groovy/org/apache/bigtop/itest/packagesmoke/PackageTestRepoMgr.groovy
URL: http://svn.apache.org/viewvc/incubator/bigtop/branches/hadoop-0.23/bigtop-tests/test-artifacts/package/src/main/groovy/org/apache/bigtop/itest/packagesmoke/PackageTestRepoMgr.groovy?rev=1304684&r1=1304683&r2=1304684&view=diff
==============================================================================
--- incubator/bigtop/branches/hadoop-0.23/bigtop-tests/test-artifacts/package/src/main/groovy/org/apache/bigtop/itest/packagesmoke/PackageTestRepoMgr.groovy (original)
+++ incubator/bigtop/branches/hadoop-0.23/bigtop-tests/test-artifacts/package/src/main/groovy/org/apache/bigtop/itest/packagesmoke/PackageTestRepoMgr.groovy Sat Mar 24 00:33:23 2012
@@ -72,7 +72,7 @@ class PackageTestRepoMgr {
pm.cleanup();
try {
String repoText = cdhRepoFileURL.toURL().text;
- if (pm.addBinRepo(repoName, repoText)) {
+ if (pm.addBinRepo(repoName, repoText, cdhKeyURL)) {
return false;
}