commit:     9ac72d9bb80c9993794ccea2aeea86c6ae055055
Author:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Mon Mar  1 11:23:43 2021 +0000
Commit:     Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Mon Mar  1 11:26:43 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ac72d9b

sys-apps/systemd-tmpfiles: enforce shebangs in .py files

Closes: https://bugs.gentoo.org/767403
Package-Manager: Portage-3.0.16, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>

 sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild 
b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
index d12d038db90..d243c5691c3 100644
--- a/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
+++ b/sys-apps/systemd-tmpfiles/systemd-tmpfiles-246.ebuild
@@ -31,6 +31,7 @@ RDEPEND="${DEPEND}
 "
 
 BDEPEND="
+       ${PYTHON_DEPS}
        app-text/docbook-xml-dtd:4.2
        app-text/docbook-xml-dtd:4.5
        app-text/docbook-xsl-stylesheets
@@ -40,13 +41,12 @@ BDEPEND="
        >=sys-apps/coreutils-8.16
        sys-devel/m4
        virtual/pkgconfig
-       test? ( ${PYTHON_DEPS} )
 "
 
 S="${WORKDIR}/systemd-${PV}"
 
 pkg_setup() {
-       use test && python-any-r1_pkg_setup
+       python-any-r1_pkg_setup
 }
 
 src_prepare() {
@@ -55,6 +55,10 @@ src_prepare() {
        use elibc_musl && eapply "${WORKDIR}/${P}-musl"
        use elibc_musl && eapply "${FILESDIR}/musl-1.2.2.patch" # 
https://bugs.gentoo.org/766833
        default
+
+       # https://bugs.gentoo.org/767403
+       python_fix_shebang src/test/*.py
+       python_fix_shebang tools/*.py
 }
 
 src_configure() {
@@ -188,7 +192,6 @@ src_install() {
 
 src_test() {
        # 'meson test' will compile full systemd, but we can still outsmart it
-       python_fix_shebang src/test/test-systemd-tmpfiles.py
        "${EPYTHON}" src/test/test-systemd-tmpfiles.py \
                "${BUILD_DIR}"/systemd-tmpfiles.standalone || die "${FUNCNAME} 
failed"
 }

Reply via email to