Change proposal: drop runtime dependency on PEAR

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

 



Hi,

I don't even know if PEAR is going to exist in the near future (PHP7)

Some RFC (such as dropping php4 constructor) can kill it.
(a recent commit already kill it, but have been temporarily reverted)

To slowly move to PHP stack without pear, I'd like to remove dependency
on /usr/bin/pear for PECL extension.

This dependency is there only to "register" the extension in the pear
database, so the "pecl list" command will report it.

Here is a proposal for new scriptlets

    # when pear installed alone, after us
    %triggerin -- %{?scl_prefix}php-pear
    if [ -x %{__pecl} ] ; then
        %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
    fi

    # posttrans as pear can be installed after us
    %posttrans
    if [ -x %{__pecl} ] ; then
        %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || :
    fi

    %postun
    if [ $1 -eq 0 -a -x %{__pecl} ] ; then
        %{pecl_uninstall} %{pecl_name} >/dev/null || :
    fi


Notice: pear still required at build time for macro definition.

Notice; this also fix a circular dep issue (php-pecl-jsonc => php-pear
=> php-cli => php-common => php-pecl-jsonc)


Small issue, /var/lib/pear/pkgxml is own by php-pear.

So we also need to move this directory to php-common to avoid unowned
dir when pear is not installed (ex: /usr/share/php-metadata)

Notice, It can even make sense to store "composer.json" file here, to
have them in a centralized location instead of somewhere in %doc.

For pure-PHP pear libraries, there is 2 differents cases

- install time dep only on pear installer (so could use the same
solution, or simply switch from pear to github if the library is
maintained).

- runtime dep, when it used some PEAR classes (such packages have to
keep this dependency, and will very probably die with pear itself)

For now, I'm used to prefer the pear way, when possible, to avoid people
pulling a pear package, when the github one is already installed.



Comments ?


Remi.

P.S. this new scriplets make even more sense in SCL, where we have no
pear packages, except pear itself.
_______________________________________________
php-devel mailing list
php-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/php-devel





[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora KDE]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux