I'm very tempted to just reject this patch: There's no description other than "sync ... from mandriva" ...
... and you've rearranged everything so I have to compare this eye-scratchy macro gunk of a vendor peculier dialect knowing full well that all I'm gonna hear about going "forward" is @rpm5.org is incompatible! which is a crock. But let's try to be positive ... 1) you've fixed a few cases to use %{__python} which can only be a good thing to have, considering the bleariness of multiple versions of python. Of course in uglix, we tend to rely on PATH being set correctly and just type "python", but linux != uglix so I'll let it slide ... 2) you've added "... || echo PYTHON-NOT-FOUND" in-band error messages. This has _NEVER_ been the right thing to do. There needs to be out-of-band, not in-band, errors added to macros because most package monkeys can't find the error messages in existing logs because of the very very confusing jusxtaposition of compilers and make and scripts and rpmbuild all trying to say Danger! Danger! Danger! Will Robinson protect yourself! All that really happens with nag ware is that the monkeys get trained to ignore everything they see, including "PYTHON-NOT-FOUND". It would not be impossibly hard to add a macro exception mechanism using setjmp(1)/longjmp(1), and then add a try: except(e): mechanism to at least get a line number in the *.spec (when available) and enough information about what macro failed, triggered by the non-zero exit code of an executable, and FAIL THE BUILD IMMEDIATELY with sufficient information that a reasonable person had a prayer of identifying what needs fixing. Whatever ... "... || echo DANGER_DANGER_DANGER" in-band is "best effort" building, ship it! and let the "community" be socially involved reporting bugs. This is the "rawhide" model and RPM sux! 73 de Jeff On Apr 10, 2011, at 7:19 AM, Per Øyvind Karlsen wrote: > RPM Package Manager, CVS Repository > http://rpm5.org/cvs/ > ____________________________________________________________________________ > > Server: rpm5.org Name: Per Øyvind Karlsen > Root: /v/rpm/cvs Email: pkarl...@rpm5.org > Module: rpm Date: 10-Apr-2011 13:19:24 > Branch: HEAD Handle: 2011041011192400 > > Modified files: > rpm CHANGES > rpm/macros python.in > > Log: > macros: sync with updated python macros from mandriva. > > Summary: > Revision Changes Path > 1.3609 +1 -0 rpm/CHANGES > 1.8 +28 -20 rpm/macros/python.in > ____________________________________________________________________________ > > patch -p0 <<'@@ .' > Index: rpm/CHANGES > ============================================================================ > $ cvs diff -u -r1.3608 -r1.3609 CHANGES > --- rpm/CHANGES 10 Apr 2011 10:50:13 -0000 1.3608 > +++ rpm/CHANGES 10 Apr 2011 11:19:24 -0000 1.3609 > @@ -1,4 +1,5 @@ > 5.4.0 -> 5.4.1: > + - proyvind: macros: sync with updated python macros from mandriva. > - proyvind: rpmfc: add internel dep generator helper for kernel modules. > - provyind: kmod-deps.sh: add dependency extractor from mandriva. > - proyvind: rpmds: implement devel(libfoo) symlink dependencies from > @@ . > patch -p0 <<'@@ .' > Index: rpm/macros/python.in > ============================================================================ > $ cvs diff -u -r1.7 -r1.8 python.in > --- rpm/macros/python.in 1 Apr 2011 02:11:13 -0000 1.7 > +++ rpm/macros/python.in 10 Apr 2011 11:19:24 -0000 1.8 > @@ -6,35 +6,43 @@ > > # Path to scripts to autogenerate python package dependencies, > # > -# Note: Used iff _use_internal_dependency_generator is non-zero. The > +# Note: Used if _use_internal_dependency_generator is non-zero. The > # helpers are also used by %{_rpmhome}/rpmdeps {--provides|--requires}. > %__python_provides %{_rpmhome}/pythoneggs.py --provides > %__python_requires %{_rpmhome}/pythoneggs.py --requires > # > +%python_sitearch %(%{__python} -c "import os; from distutils.sysconfig > import get_python_lib; lib=get_python_lib(1); print os.path.islink(lib) and > os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib") > +%python_sitelib %(%{__python} -c "import os; from distutils.sysconfig > import get_python_lib; lib=get_python_lib(); print os.path.islink(lib) and > os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib") > +%python_version %(%{__python} -c "import sys; print(sys.version[0:3])") > + > # python main version > -%py_ver %(echo `python -c "import sys; print sys.version[:3]"`) > +%py_ver %(%{__python} -c "import sys; > v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo > PYTHON-NOT-FOUND) > +%py_prefix %(%{__python} -c "import sys; print sys.prefix" > 2>/dev/null || echo PYTHON-NOT-FOUND) > +%py_platlibdir %(%{__python} -c 'import distutils.sysconfig; print > distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=1)' > 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND) > +%py_purelibdir %(%{__python} -c 'import distutils.sysconfig; print > distutils.sysconfig.get_python_lib(standard_lib=1,plat_specific=0)' > 2>/dev/null || echo PYTHON-LIBDIR-NOT-FOUND) > +# backward compatibility > +%py_libdir %py_purelibdir > + > +%py_platsitedir %(%{__python} -c 'import distutils.sysconfig; print > distutils.sysconfig.get_python_lib(plat_specific=1)' 2>/dev/null || echo > PYTHON-LIBDIR-NOT-FOUND) > +%py_puresitedir %(%{__python} -c 'import distutils.sysconfig; print > distutils.sysconfig.get_python_lib()' 2>/dev/null || echo > PYTHON-LIBDIR-NOT-FOUND) > +%py_sitedir %py_puresitedir > > -# directories > -%py_prefix %(echo `python -c "import sys; print sys.prefix"`) > -%py_libdir %{py_prefix}/lib/python%{py_ver} > -%py_incdir @oldincludedir@/python%{py_ver} > -%py_sitedir %{py_libdir}/site-packages > -%py_dyndir %{py_libdir}/lib-dynload > +%py_dyndir %{py_libdir}/lib-dynload > > -# pure python modules compilation > -%py_comp %{__python} -c "import compileall; import sys; > compileall.compile_dir(sys.argv[1], > ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])" > +%py_incdir %(%{__python} -c 'import distutils.sysconfig; print > distutils.sysconfig.get_python_inc()' 2>/dev/null || echo > PYTHON-INCLUDEDIR-NOT-FOUND) > > -%py_ocomp %{__python} -O -c "import compileall; import sys; > compileall.compile_dir(sys.argv[1], > ddir=sys.argv[1][len('$RPM_BUILD_ROOT'):])" > +%py_compile(O) \ > +find %1 -name '*.pyc' -exec rm -f {} \\; \ > +%{__python} -c "import sys, os, compileall; br='%{buildroot}'; > compileall.compile_dir(sys.argv[1], ddir=br and > (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ > +%{-O: \ > +find %1 -name '*.pyo' -exec rm -f {} \\; \ > +%{__python} -O -c "import sys, os, compileall; br='%{buildroot}'; > compileall.compile_dir(sys.argv[1], ddir=br and > (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ > +} > > -%python_sitearch %(%{__python} -c "import os; from distutils.sysconfig > import get_python_lib; lib=get_python_lib(1); print os.path.islink(lib) and > os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib") > -%python_sitelib %(%{__python} -c "import os; from distutils.sysconfig > import get_python_lib; lib=get_python_lib(); print os.path.islink(lib) and > os.path.abspath(os.path.join(os.path.dirname(lib),os.readlink(lib))) or lib") > -%python_version %(%{__python} -c "import sys; print(sys.version[0:3])") > +# pure python modules compilation > +%py_comp %{__python} -c "import compileall; import sys; > compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('%{buildroot}'):])" > > -%py_compile(O) \ > -find %1 -name '*.pyc' -name '*.pyo' -exec rm -f {} \\; \ > -%{__python} %{?O:-O} -c "import sys, os, compileall; br='%{buildroot}'; > compileall.compile_dir(sys.argv[1], ddir=br and > (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \ > +%py_ocomp %{__python} -O -c "import compileall; import sys; > compileall.compile_dir(sys.argv[1], ddir=sys.argv[1][len('%{buildroot}'):])" > > %py_requires(d) \ > -%define maxver %(%{__python} -c "import sys; a,b=sys.version_info[:2]; > print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \ > -BuildRequires: python %{-d:python-devel} \ > -PreReq: python >= %{python_version}, python < %{maxver} > +BuildRequires: %{__python} %{-d:python-devel} > @@ . > ______________________________________________________________________ > RPM Package Manager http://rpm5.org > CVS Sources Repository rpm-...@rpm5.org
smime.p7s
Description: S/MIME cryptographic signature