[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#36574: glibc_2.1.1-0.2(unstable): Little error in debian/rules



Package: glibc
Version: 2.1.1-0.2

While trying to compile this glibc version for m68k, I stubled over
the following (a retried build after the first one failed):

> make[1]: Entering directory `/usr/local/build/buildd/glibc-2.1.1'
> for stamp in none `ls -1t /usr/local/build/buildd/glibc-2.1.1/build/stamps-m68k/patched-*`; do \
> 	case "$stamp" in none|/usr/local/build/buildd/glibc-2.1.1/build/stamps-m68k/patched-\*) continue; esac; \
> 	patch=`echo $stamp | sed -e 's//usr/local/build/buildd/glibc-2.1.1/build/stamps-m68k\/patched-//'`; \
> 	echo "trying to revert patch $patch ..."; \
> 	if [ -x /usr/local/build/buildd/glibc-2.1.1/debian/patches/$patch.dpatch ]; then true; else \
> 	  chmod +x /usr/local/build/buildd/glibc-2.1.1/debian/patches/$patch.dpatch; fi; \
> 	if /usr/local/build/buildd/glibc-2.1.1/debian/patches/$patch.dpatch -unpatch /usr/local/build/buildd/glibc-2.1.1/build/glibc-2.1.1; then \
> 	  echo "reverted $patch patch."; \
> 	  rm -f $stamp; \
> 	else \
> 	  echo "error in reverting $patch patch."; \
> 	  exit 1; \
> 	fi; \
> done
> sed: -e expression #1, char 8: Unknown option to 's'
> make[1]: *** [reverse-patches] Error 1
> make[1]: Leaving directory `/usr/local/build/buildd/glibc-2.1.1'
> make: *** [clean] Error 2

The errorneous line here is

          patch=`echo $$stamp | sed -e 's/$(stampdir)\/patched-//'`; \

$(stampdir) can (and does) contain slashes, and therefore greatly
confuses sed, because a slash is also the termination char for the
patterns. I'd suggest using something like

          patch=`echo $$stamp | sed -e 's;$(stampdir)/patched-;;'`; \

(ok, now assuimg that $(stampdir) won't contain a semicolon...)

Roman


Reply to: