Skip to content

Commit

Permalink
Tweaks after some testing. refs: #47
Browse files Browse the repository at this point in the history
  • Loading branch information
spanezz committed Aug 8, 2022
1 parent 428784b commit 5a8b30f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Section: python
Priority: optional
Maintainer: Enrico Zini <[email protected]>
Build-Depends: debhelper (>= 13), dh-python,
python3-all, python3-yaml
python3-all, python3-setuptools, python3-yaml
Standards-Version: 4.2.0

Package: moncic-ci
Expand Down
9 changes: 6 additions & 3 deletions moncic/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,9 @@ def build(self) -> Optional[int]:

# Move to a temporary directory
with tempfile.TemporaryDirectory() as workdir:
dsc_fname = os.path.abspath(os.path.join("..", srcinfo.dsc_fname))
with cd(workdir):
run(["dpkg-source", "-x", srcinfo.dsc_fname])
run(["dpkg-source", "-x", dsc_fname])

# Find the newly created build directory
for de in os.scandir("."):
Expand All @@ -232,8 +233,10 @@ def build(self) -> Optional[int]:
# Install build dependencies
env = dict(os.environ)
env.update(DEBIAN_FRONTEND="noninteractive")
run(["apt", "--assume-yes", "--quiet", "--show-upgraded",
"-o", 'Dpkg::Options::="--force-confnew"',
run(["apt-get", "--assume-yes", "--quiet", "--show-upgraded",
# The space after -o is odd but required, and I could
# not find a better working syntax
'-o Dpkg::Options::="--force-confnew"',
"build-dep", "./"], env=env)

# TODO: Disconnect from network namespace here
Expand Down
1 change: 1 addition & 0 deletions moncic/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,5 +129,6 @@ def cd(path: str):
cwd = os.getcwd()
try:
os.chdir(path)
yield
finally:
os.chdir(cwd)

0 comments on commit 5a8b30f

Please sign in to comment.