Package: cdbs Version: 0.4.56 Tags: patch User: [email protected] Usertags: ubuntu-patch origin-ubuntu karmic
Hello, In https://launchpad.net/bugs/137827 it was reported that cdbs-edit-patch fails if DEB_TAR_SRCDIR is not a static value, but contains variables, such as DEB_TAR_SRCDIR:=postgresql-$VERSION cdbs-edit-patch currently does deb_tar_srcdir=$(sed -nr 's/^[[:space:]]*DEB_TAR_SRCDIR[[:space:]]*:?=[[:space:]]*//p' debian/rules) if [ -n "$deb_tar_srcdir" ]; then deb_srcdir=build-tree/$deb_tar_srcdir fi which is pretty much unfixable for dynamic Makefile comments, I think. What do you think about adding a fallback which will work in pretty much every case, such as the attached patch? Thanks, Martin -- Martin Pitt | http://www.piware.de Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
--- /usr/bin/cdbs-edit-patch 2009-04-27 16:42:29.000000000 +0200 +++ cdbs-edit-patch 2009-04-27 17:45:00.000000000 +0200 @@ -63,9 +63,9 @@ debian/rules apply-patches -deb_tar_srcdir=$(sed -nr 's/^[[:space:]]*DEB_TAR_SRCDIR[[:space:]]*:?=[[:space:]]*//p' debian/rules) -if [ -n "$deb_tar_srcdir" ]; then - deb_srcdir=build-tree/$deb_tar_srcdir +deb_tar_srcdir=build-tree/$(sed -nr 's/^[[:space:]]*DEB_TAR_SRCDIR[[:space:]]*:?=[[:space:]]*//p' debian/rules) +if ! [ -d "$deb_tar_srcdir" ]; then + deb_srcdir=build-tree/$(ls build-tree | head -n 1) fi # create new source dir
signature.asc
Description: Digital signature

