summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuis Araujo <luis.araujo@collabora.co.uk>2014-12-02 11:56:42 (GMT)
committerLuis Araujo <luis.araujo@collabora.co.uk>2014-12-02 12:28:41 (GMT)
commitd23e4c4e9c52fbc0961d7c1fd8d8ede4570ec7d5 (patch)
tree93acde69e37f9e5817fd161971b3e4938c3e806a
parente4da960e31bbc09fbf17e4b64233f1de32158ba1 (diff)
downloadlava-dispatcher-d23e4c4e9c52fbc0961d7c1fd8d8ede4570ec7d5.tar.gz
lava-dispatcher-d23e4c4e9c52fbc0961d7c1fd8d8ede4570ec7d5.tar.xz
HACK: Use a simple echo command to add apt repositoryadd-apt-repo
This allows to add apt repositories in the test image without using the add-apt-repository command and requiring the extra package python-software-properties. NOTE: This patch should be dropped once the transition to the new test format is done.
-rw-r--r--lava_dispatcher/actions/lava_test.py11
1 files changed, 3 insertions, 8 deletions
diff --git a/lava_dispatcher/actions/lava_test.py b/lava_dispatcher/actions/lava_test.py
index 41df3eb..e4405e4 100644
--- a/lava_dispatcher/actions/lava_test.py
+++ b/lava_dispatcher/actions/lava_test.py
@@ -190,7 +190,6 @@ class cmd_add_apt_repository(BaseAction):
"""
add apt repository to test image rootfs by chroot
arg could be 'deb uri distribution [component1] [component2][...]'
- or ppa:<ppa_name>
"""
parameters_schema = {
@@ -206,12 +205,8 @@ class cmd_add_apt_repository(BaseAction):
def run(self, arg):
with self.client.reliable_session() as session:
-
- # install add-apt-repository
- session.run('%s -y install python-software-properties' %
- self.client.aptget_cmd)
-
- # add ppa
+ # add apt repository
for repository in arg:
- session.run('add-apt-repository %s < /dev/null' % repository)
+ session.run("echo '%s' >> /etc/apt/sources.list.d/test_repo.list"
+ % repository)
session.run('%s update' % self.client.aptget_cmd)