From: Elan Ruusamäe Date: Sat, 20 Apr 2013 10:38:49 +0000 (+0300) Subject: py_postclean - do not use relative paths X-Git-Tag: auto/th/rpm-build-macros-1.661-3 X-Git-Url: http://git.pld-linux.org/gitweb.cgi?a=commitdiff_plain;h=5ed24c89dfdc7a137ae10bdb4113f187b3b65c1b;p=packages%2Frpm-build-macros.git py_postclean - do not use relative paths somehow i686 builder fails with negative priority: /tmp/B.53c70a4e-e1f2-4783-a355-9a2777bab4c6/BUILD/tmp/rpm-tmp.33435[258]: can't create __rpm_pyc: No such file or directory --- diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec index 496157b..a0094bc 100644 --- a/rpm-build-macros.spec +++ b/rpm-build-macros.spec @@ -4,7 +4,7 @@ Summary: PLD Linux RPM build macros Summary(pl.UTF-8): Makra do budowania pakietów RPM dla Linuksa PLD Name: rpm-build-macros Version: %{rpm_macros_rev} -Release: 2 +Release: 3 License: GPL Group: Development/Building Source0: rpm.macros diff --git a/rpm.macros b/rpm.macros index 3bcd3c5..de56584 100644 --- a/rpm.macros +++ b/rpm.macros @@ -1077,9 +1077,9 @@ fi \ %__spec_install_post_py_hardlink {\ %{!?no_install_post_py_hardlink: __spec_install_post_py_hardlink() { \ %{!?debug:set +x;} \ -local a b c=0 t=0; \ +local a b c=0 t=0 pyc=%{tmpdir}/%{name}-%{version}-%{release}__rpm_pyc; \ if [ -d "$RPM_BUILD_ROOT" ]; then \ - find "$RPM_BUILD_ROOT" -name '*.pyc' > __rpm_pyc; \ + find "$RPM_BUILD_ROOT" -name '*.pyc' > $pyc; \ while read a; do \ b="${a%.pyc}.pyo"; \ if cmp -s "$a" "$b"; then \ @@ -1087,9 +1087,9 @@ if [ -d "$RPM_BUILD_ROOT" ]; then \ c=$((c + 1)); \ fi; \ t=$((t + 1)); \ - done < __rpm_pyc; \ + done < $pyc; \ [ $t -gt 0 ] && printf "Hardlink Python files: %d/%d files hardlinked\n" $c $t; \ - rm -f __rpm_pyc; \ + rm -f $pyc; \ fi; \ }; __spec_install_post_py_hardlink } }