FS#3563 - bug in php pear (in php package)
Attached to Project:
Arch Linux
Opened by David Rosenstrauch (darose) - Friday, 02 December 2005, 16:50 GMT
Last edited by Judd Vinet (judd) - Monday, 05 December 2005, 08:02 GMT
Opened by David Rosenstrauch (darose) - Friday, 02 December 2005, 16:50 GMT
Last edited by Judd Vinet (judd) - Monday, 05 December 2005, 08:02 GMT
|
Details
The recent upgrade to php 5.1.1 appears to break the php
pear system:
[darose@vnyc190562661 ~]$ pear Could not open input file: /home/build/repos/arch/build/devel/php/pkg/usr/share/pear/pearcmd.php The cause appears to be that the package maintainer has hard-coded in their own personal directory structure in the pear config, rather than using the standard arch locations (/usr/share/pear/). |
This task depends upon
Closed by dorphell (dorphell)
Monday, 05 December 2005, 16:35 GMT
Reason for closing: Fixed
Additional comments about closing: stupid can of worms =]
Monday, 05 December 2005, 16:35 GMT
Reason for closing: Fixed
Additional comments about closing: stupid can of worms =]
(this means that the path is hard-coded into more than just /etc/pear.conf)
/usr/share/pear/peclcmd.php
/usr/share/pear/.registry/console_getopt.reg
/usr/share/pear/.registry/archive_tar.reg
/usr/share/pear/.registry/pear.reg
/usr/share/pear/pearcmd.php
/usr/share/pear/PEAR/Command/Package.php
use `vi`: :%s/\/home\/build\/repos\/arch\/build\/devel\/php\/pkg//g
This is the fix I'm committing:
---------
cd $startdir/pkg
sed "s|`pwd`||g" -i usr/share/pear/.registry/{console_getopt.reg,archive_tar.reg,pear.reg} etc/pear.conf \
usr/share/pear/{peclcmd.php,pearcmd.php,PEAR/Command/Package.php} usr/bin/{pear,peardev,pecl}
---------
pear is still broken
Now error is:
Notice: unserialize(): Error at offset 91 of 810 bytes in Config.php on line 971
ERROR: The default config file is not a valid config file or is corrupted.
FS#3577) but i'll recommend that it be closed.---------
cd $startdir/pkg
sed "s|$PWD||g" -i usr/share/pear/.registry/{console_getopt.reg,archive_tar.reg,pear.reg} \
usr/share/pear/{peclcmd.php,pearcmd.php,PEAR/Command/Package.php} usr/bin/{pear,peardev,pecl}
sed 's#:\([0-9]*\):\"'$PWD'#:$((\1-'`echo -n $PWD|wc -c`')):\"#g; s#\"#\\"#g; s#.*#echo "&"#g' etc/pear.conf |sh > etc/pear.conf.tmp
mv etc/pear.conf.tmp etc/pear.conf
---------
pear still isn't working for me: the command 'pear install PEAR' spit out many errors and failed to do an upgrade.
I found the problem.. didn't notice /usr/share/pear/.registry/pear.reg has the same problem as /etc/pear.conf.
[root@darkstar ~]# pear install DB
Notice: unserialize(): Error at offset 41157 of 65191 bytes in PEAR/Registry.php on line 1006
pear/DB requires package "pear/PEAR" (version >= 1.0b1), installed version is
No valid packages found
install failed
[root@darkstar ~]# pear install PEAR
Notice: unserialize(): Error at offset 41157 of 65191 bytes in PEAR/Registry.php on line 1006
Notice: unserialize(): Error at offset 1847 of 4797 bytes in PEAR/Registry.php o n line 1006
Notice: unserialize(): Error at offset 1847 of 4797 bytes in PEAR/Registry.php o n line 1006
Notice: unserialize(): Error at offset 909 of 2409 bytes in PEAR/Registry.php on line 1006
Notice: unserialize(): Error at offset 909 of 2409 bytes in PEAR/Registry.php on line 1006
Did not download optional dependencies: pear/XML_RPC, use --alldeps to download automatically
Notice: unserialize(): Error at offset 41157 of 65191 bytes in PEAR/Registry.php on line 1006
Notice: unserialize(): Error at offset 41157 of 65191 bytes in PEAR/Registry.php on line 1006
Skipping package "pear/PEAR", already installed as version
No valid packages found
install failed
[root@darkstar ~]# pear install DB
Notice: unserialize(): Error at offset 41157 of 65191 bytes in PEAR/Registry.php on line 1006
pear/DB requires package "pear/PEAR" (version >= 1.0b1), installed version is
No valid packages found
install failed
[root@darkstar ~]#