[php-maint] php7.0: fix-up command-not-found for php-config and phpize
Ondřej Surý
ondrej at sury.org
Fri Jan 15 20:44:30 UTC 2016
It would be better to fill this as a bug (to have a bug number). I have
just unrolled the loops (1f14f484 in git) and I will push this as a part
of next package update. This doesn't warrant a rebuild on it's own, so
it will have to wait for more fixes to accumulate.
Cheers,
--
Ondřej Surý <ondrej at sury.org>
Knot DNS (https://www.knot-dns.cz/) – a high-performance DNS server
On Fri, Jan 15, 2016, at 19:27, Nish Aravamudan wrote:
> [ Apologies if I made a mistake, this is my first attempt at push a fix
> to Debian. ]
>
> The current php-dev.{postinst,prerm} scripts refer to an iterated
> variable as "$i" which causes command-not-found's automated extractor to
> not parse the underlying substitutions and so in Ubuntu Xenial, e.g.,
> php-config does not exist as a possible solution for c-n-f.
>
> diff -Nru php7.0-7.0.2/debian/changelog php7.0-7.0.2/debian/changelog
> --- php7.0-7.0.2/debian/changelog 2016-01-15 01:40:34.000000000
> -0800
> +++ php7.0-7.0.2/debian/changelog 2016-01-15 10:23:15.000000000
> -0800
> @@ -1,3 +1,12 @@
> +php7.0 (7.0.2-3.1) unstable; urgency=medium
> +
> + * Non-maintainer upload.
> + * debian/php-dev.{postinst,prerm}: Use ${i} instead of "$i" in
> + update-alternatives invocation so that command-not-found can parse
> + the script(s).
> +
> + -- Nishanth Aravamudan <nish.aravamudan at canonical.com> Fri, 15 Jan
> 2016 10:17:42 -0800
> +
> php7.0 (7.0.2-3) unstable; urgency=medium
>
> * Fail gracefully when other PHP module is enabled in Apache2 (Closes:
> #811005)
> diff -Nru php7.0-7.0.2/debian/php-dev.postinst
> php7.0-7.0.2/debian/php-dev.postinst
> --- php7.0-7.0.2/debian/php-dev.postinst 2016-01-15
> 01:40:34.000000000 -0800
> +++ php7.0-7.0.2/debian/php-dev.postinst 2016-01-15
> 10:18:38.000000000 -0800
> @@ -5,8 +5,8 @@
> if [ "$1" = "configure" ]; then
> for i in php-config phpize; do
> update-alternatives \
> - --install /usr/bin/"$i" $i /usr/bin/"$i"@PHP_VERSION@
> @PHP_MAJOR@@PHP_MINOR@ \
> - --slave /usr/share/man/man1/"$i".1.gz "$i".1.gz
> /usr/share/man/man1/"$i"@PHP_VERSION at .1.gz
> + --install /usr/bin/${i} ${i} /usr/bin/${i}@PHP_VERSION@
> @PHP_MAJOR@@PHP_MINOR@ \
> + --slave /usr/share/man/man1/${i}.1.gz ${i}.1.gz
> /usr/share/man/man1/${i}@PHP_VERSION at .1.gz
> done
> fi
>
> diff -Nru php7.0-7.0.2/debian/php-dev.prerm
> php7.0-7.0.2/debian/php-dev.prerm
> --- php7.0-7.0.2/debian/php-dev.prerm 2016-01-15 01:40:34.000000000
> -0800
> +++ php7.0-7.0.2/debian/php-dev.prerm 2016-01-15 10:19:24.000000000
> -0800
> @@ -4,7 +4,7 @@
>
> if [ "$1" = "remove" -o "$1" = "purge" ]; then
> for i in php-config phpize; do
> - update-alternatives --remove $i /usr/bin/"$i"@PHP_VERSION@
> + update-alternatives --remove ${i} /usr/bin/${i}@PHP_VERSION@
> done
> fi
>
> --
> Nishanth Aravamudan
> Ubuntu Server
> Canonical Ltd
>
> _______________________________________________
> pkg-php-maint mailing list
> pkg-php-maint at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-php-maint
More information about the pkg-php-maint
mailing list