Bug#851814: apt-build: Broken postinst by less permissive sed
Hi Santiago, Santiago Vila wrote: > Setting up apt-build (0.12.45) ... > sed: character class syntax is [[:space:]], not [:space:] > dpkg: error processing package apt-build (--configure): > subprocess installed post-installation script returned error exit > status 4 > Processing triggers for man-db (2.7.6.1-2) ... > Errors were encountered while processing: > apt-build > > Discovered by Antonio Trujillo here: > > https://lists.debian.org/msgid-search/dd7864af-d235-217c-74dc-bd1b5a086...@juntadeandalucia.es Thanks for forwarding it. Such issues are not detected by just having the package installed and using it occasionally. But triggering a reinstallation showed it here, too. > I think the following trivial patch should fix it, Thanks for the patch. I'll do an QA upload soon. > but I'm not confident enough to push it to git because version in > Debian archives does not exactly match HEAD in git. Yes, I understand. Point is that when I did the first QA upload there were (seemingly dead) ITA-traces in the Git master brnach and I didn't want to throw them away, so for the last RC-fix (back then for Jessie), I branched off a branch named "jessie" based on the lasted upload to Unstable. I now did the same for Stretch: Created a branch "stretch" based on the branch "jessie". As soon as I've uploaded apt-build, I'll merge back my changes into the "master" branch. Regards, Axel -- ,''`. | Axel Beckert , http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `-| 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE
Bug#851814: apt-build: Broken postinst by less permissive sed
Package: apt-build Version: 0.12.45 Severity: serious Tags: patch Dear QA Group: Installing apt-build results in this error: Setting up apt-build (0.12.45) ... sed: character class syntax is [[:space:]], not [:space:] dpkg: error processing package apt-build (--configure): subprocess installed post-installation script returned error exit status 4 Processing triggers for man-db (2.7.6.1-2) ... Errors were encountered while processing: apt-build Discovered by Antonio Trujillo here: https://lists.debian.org/msgid-search/dd7864af-d235-217c-74dc-bd1b5a086...@juntadeandalucia.es I think the following trivial patch should fix it, but I'm not confident enough to push it to git because version in Debian archives does not exactly match HEAD in git. Thanks. --- a/debian/postinst +++ b/debian/postinst @@ -75,7 +75,7 @@ if [ "$1" = "configure" ] ; then if [ -e "$source" ] ; then # comment in all sources lists if asked if [ "$add_to_sourceslist" = "false" ] ; then -sed -i -e "s|^[:space:]*$debline.*|#$debline|" "$source" +sed -i -e "s|^[[:space:]]*$debline.*|#$debline|" "$source" # check if source entry is already enabled elif grep -Eq "^[[:space:]]*$debline" "$source" ; then @@ -149,12 +149,12 @@ if [ "$1" = "configure" ] ; then test -z "make_options" || grep -Eq '^[[:space:]]*make_options =' $CONFFILE || \ echo "make_options =" >> $CONFFILE - sed -e "s|^[:space:]*build-dir =.*|build-dir = $build_dir|" \ - -e "s|^[:space:]*repository-dir =.*|repository-dir = $repository_dir|" \ - -e "s|^[:space:]*Olevel =.*|Olevel = $Olevel|" \ - -e "s|^[:space:]*mtune =.*|mtune = $mtune|" \ - -e "s|^[:space:]*options =.*|options = \" $options\"|" \ - -e "s|^[:space:]*make_options =.*|make_options = \" $make_options\"|" \ + sed -e "s|^[[:space:]]*build-dir =.*|build-dir = $build_dir|" \ + -e "s|^[[:space:]]*repository-dir =.*|repository-dir = $repository_dir|" \ + -e "s|^[[:space:]]*Olevel =.*|Olevel = $Olevel|" \ + -e "s|^[[:space:]]*mtune =.*|mtune = $mtune|" \ + -e "s|^[[:space:]]*options =.*|options = \" $options\"|" \ + -e "s|^[[:space:]]*make_options =.*|make_options = \" $make_options\"|" \ < $CONFFILE > $CONFFILE.tmp mv -f $CONFFILE.tmp $CONFFILE