Package: release.debian.org Severity: normal Tags: stretch User: release.debian....@packages.debian.org Usertags: pu
yosys-smtbmc cannot find its private modules. #904752 This is a cherry-pick of the change in sid that updated the searchpath. Andreas
diff -Nru yosys-0.7/debian/changelog yosys-0.7/debian/changelog --- yosys-0.7/debian/changelog 2016-11-06 15:40:47.000000000 +0100 +++ yosys-0.7/debian/changelog 2019-02-10 03:33:31.000000000 +0100 @@ -1,3 +1,18 @@ +yosys (0.7-2+deb9u1) stretch; urgency=medium + + [ Andreas Beckmann ] + * Non-maintainer upload. + * Backport the patch fixing the search path from 0.7-5. + + [ Ruben Undheim ] + * debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch + - Fix "ModuleNotFoundError: No module named 'smtio'" (Closes: #904752) + * debian/tests/smtbc: + - Added CI test to check that 'yosys-smtbmc' can be started with no + import errors + + -- Andreas Beckmann <a...@debian.org> Sun, 10 Feb 2019 03:33:31 +0100 + yosys (0.7-2) unstable; urgency=medium * debian/control: diff -Nru yosys-0.7/debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch yosys-0.7/debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch --- yosys-0.7/debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch 1970-01-01 01:00:00.000000000 +0100 +++ yosys-0.7/debian/patches/0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch 2019-02-10 03:07:38.000000000 +0100 @@ -0,0 +1,21 @@ +From: Ruben Undheim <ruben.undh...@gmail.com> +Date: Fri, 27 Jul 2018 18:46:13 +0000 +Subject: Fix adding of sys.path in yosys-smtbmc + +--- + backends/smt2/Makefile.inc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/backends/smt2/Makefile.inc b/backends/smt2/Makefile.inc +index eacda27..f98e610 100644 +--- a/backends/smt2/Makefile.inc ++++ b/backends/smt2/Makefile.inc +@@ -6,7 +6,7 @@ ifneq ($(CONFIG),emcc) + TARGETS += yosys-smtbmc + + yosys-smtbmc: backends/smt2/smtbmc.py +- $(P) sed 's|##yosys-sys-path##|sys.path += [os.path.dirname(__file__) + p for p in ["/share/python3", "/../share/yosys/python3"]]|;' < $< > $@.new ++ $(P) sed 's|##yosys-sys-path##|sys.path += ["/usr/share/yosys"]|;' < $< > $@.new + $(Q) chmod +x $@.new + $(Q) mv $@.new $@ + diff -Nru yosys-0.7/debian/patches/series yosys-0.7/debian/patches/series --- yosys-0.7/debian/patches/series 2016-11-06 11:19:59.000000000 +0100 +++ yosys-0.7/debian/patches/series 2019-02-10 03:08:33.000000000 +0100 @@ -4,3 +4,4 @@ switch-to-free-font.patch manual-build.patch kfreebsd-support.patch +0010-Fix-adding-of-sys.path-in-yosys-smtbmc.patch diff -Nru yosys-0.7/debian/tests/control yosys-0.7/debian/tests/control --- yosys-0.7/debian/tests/control 2016-11-06 10:12:54.000000000 +0100 +++ yosys-0.7/debian/tests/control 2019-02-10 03:07:38.000000000 +0100 @@ -1,2 +1,2 @@ -Tests: ice +Tests: ice, smtbc Depends: @ diff -Nru yosys-0.7/debian/tests/smtbc yosys-0.7/debian/tests/smtbc --- yosys-0.7/debian/tests/smtbc 1970-01-01 01:00:00.000000000 +0100 +++ yosys-0.7/debian/tests/smtbc 2019-02-10 03:07:38.000000000 +0100 @@ -0,0 +1,12 @@ +#!/bin/bash + +# Just verify that there are no Python import errors when starting yosys-smtbmc + +yosys-smtbmc 2>&1 | grep --quiet ImportError +RET=$? + +if [ "$RET" = "0" ]; then + exit 1 +else + exit 0 +fi