commit:     b1b36b1a276ebffb1ab161b8ade3d497c897dca4
Author:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun May 15 05:16:33 2016 +0000
Commit:     Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Sun May 15 08:39:18 2016 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b1b36b1a

repoman: Set current working directory in repoman's setup.py

Fixes issues with running it from the portage parent directory.

 .travis.yml      | 6 ++----
 repoman/setup.py | 2 ++
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 53e60bc..c098c4d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -18,9 +18,7 @@ script:
     - sudo rsync -a /tmp/install-root/. /
     - python -b -Wd -m portage.tests.runTests
     # repoman test block
-    - cd repoman
-    - ./setup.py test
-    - ./setup.py install --root=/tmp/install-root
-    - cd ..
+    - repoman/setup.py test
+    - repoman/setup.py install --root=/tmp/install-root
     - sudo rsync -a /tmp/install-root/. /
     - python -b -Wd -m repoman.tests.runTests

diff --git a/repoman/setup.py b/repoman/setup.py
index 62c5b62..a4726ba 100755
--- a/repoman/setup.py
+++ b/repoman/setup.py
@@ -23,6 +23,8 @@ import os.path
 import subprocess
 import sys
 
+# change the cwd to this one
+os.chdir(os.path.dirname(os.path.realpath(__file__)))
 
 # TODO:
 # - smarter rebuilds of docs w/ 'install_docbook' and 'install_epydoc'.

Reply via email to