Summary: | sci-geosciences/gpsd-9999 - empty variable used in sed hackery | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Martin Mokrejš <mmokrejs> |
Component: | Current packages | Assignee: | Sci-geo Project <sci-geosciences> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | jstein, michael, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Martin Mokrejš
2020-04-04 14:38:45 UTC
Ran into this myself. There's a fix for it in the patchset at https://704580.bugs.gentoo.org/attachment.cgi?id=633108 in https://bugs.gentoo.org/show_bug.cgi?id=704580. It's basically this hunk: @@ -101,17 +104,20 @@ src_prepare() { python_prepare_all() { python_setup - python_export # Extract python info out of SConstruct so we can use saner distribute - pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; } - local pybins=$(pyvar python_progs | tail -1) + pyarray() { sed -n "/^ *$1 *= *\\[/,/\\]/p" SConstruct ; } + local pyprogs=$(pyarray python_progs) + local pybins=$("${PYTHON}" -c "${pyprogs}; \ + print(list(set(python_progs) - {'xgps', 'xgpsspeed', 'ubxtool', 'zerk'}))") # Handle conditional tools manually. #666734 use X && pybins+="+ ['xgps', 'xgpsspeed']" use gpsd_protocols_ublox && pybins+="+ ['ubxtool']" use gpsd_protocols_greis && pybins+="+ ['zerk']" - local pysrcs=$(sed -n '/^ *python_extensions = {/,/}/{s:^ *::;s:os[.]sep:"/":g;p}' SConstruct) - local packet=$("${PYTHON}" -c "${pysrcs}; print(python_extensions['gps/packet'])") + local pysrcs=$(pyarray packet_ffi_extension) + local packet=$("${PYTHON}" -c "${pysrcs}; print(packet_ffi_extension)") + + pyvar() { sed -n "/^ *$1 *=/s:.*= *::p" SConstruct ; } # Post 3.19 the clienthelpers were merged into gps.packet sed \ -e "s|@VERSION@|$(pyvar gpsd_version)|" \ I think this is fixed by now, mostly in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d2e1501ab7f3f8353b92edc95d586273a5c01900. |