Gradwell/phix

setup instructions

till opened this issue · 6 comments

till commented

Why not maximize using the package.xml and add all dependencies into it? Instead of asking people to manually install them.

Then all they need to do is:

pear config-set auto_discover 1
pear install pear.gradwell.com/phix

Because I've tested that, and it doesn't work, sorry. Same reason why Sebastian and others tell folks to channel-discover before installing their packages.

then report a bug.

till commented

Regardless of if it works, or not, you advocat things like consuming (quoting you) vendor libs and all that. Why not manage dependencies all the way by adding them to the package.xml?

Then, auto_discover seems to work pretty well for your own channel, I can test more or I actually wouldn't mind if you did. If you add the dependencies to your package.xml I'll help too. I haven't heard a complaint from Sebastian or anyone else about this specific feature, regardless bugs only get fixed with reports.

till@till-laptop:~$ pear channel-info pear.gradwell.com
Unknown channel "pear.gradwell.com"
till@till-laptop:~$ pear config-get auto_discover
1
till@till-laptop:~$ sudo pear install pear.gradwell.com/phix
[sudo] password for till: 
Attempting to discover channel "pear.gradwell.com"...
downloading channel.xml ...
Starting to download channel.xml (816 bytes)
....done: 816 bytes
Auto-discovered channel "pear.gradwell.com", alias "Gradwell", adding to registry
downloading phix-0.11.1.tgz ...
Starting to download phix-0.11.1.tgz (11,432 bytes)
...done: 11,432 bytes
downloading Autoloader-2.0.1.tgz ...
Starting to download Autoloader-2.0.1.tgz (2,080 bytes)
...done: 2,080 bytes
downloading CommandLineLib-1.0.0.tgz ...
Starting to download CommandLineLib-1.0.0.tgz (15,016 bytes)
...done: 15,016 bytes
downloading ConsoleDisplayLib-1.0.0.tgz ...
Starting to download ConsoleDisplayLib-1.0.0.tgz (5,452 bytes)
...done: 5,452 bytes
downloading ExtenderLib-1.0.0.tgz ...
Starting to download ExtenderLib-1.0.0.tgz (4,378 bytes)
...done: 4,378 bytes
downloading ValidationLib-1.0.0.tgz ...
Starting to download ValidationLib-1.0.0.tgz (6,625 bytes)
...done: 6,625 bytes
install ok: channel://pear.gradwell.com/Autoloader-2.0.1
install ok: channel://pear.gradwell.com/ConsoleDisplayLib-1.0.0
install ok: channel://pear.gradwell.com/ExtenderLib-1.0.0
install ok: channel://pear.gradwell.com/ValidationLib-1.0.0
install ok: channel://pear.gradwell.com/CommandLineLib-1.0.0
install ok: channel://pear.gradwell.com/phix-0.11.1

I see your point on that. I'll add those to package.xml for the next release. Thanks.

Regarding auto_complete, the problem you've got is that the distros are shipping broken copies of the PEAR installer. My bugs need to be filed with them; developers use what the distros ship, not what upstream ships, sadly.

till commented

Hey,

just to make sure, the configuration option is auto_discover.

My test was on a stock Ubuntu. PHP is IMHO broken here, but the above worked regardless with stock php-pear. If there's a bug in PEAR, let us know. We also know a bunch of distro maintainers, so we might be able to help too.

Till

After further testing, putting phix's full set of dependencies into package.xml still isn't an option today. All testing done on a brand-new, fully-patched install of Ubuntu 10.10, with the PEAR installer then upgraded to the latest version available from pear.php.net.

  1. auto_discover doesn't work completely when installing a PEAR package from a tarball. You still have to do a channel-discover for the package you want to install, otherwise you get the misleading error "Parsing of package.xml failed". Minor bug, one that can be addressed in the installation documentation.

stuart@ubuntu:/tmp$ sudo pear config-set auto_discover 1
config-set succeeded
stuart@ubuntu:
/tmp$ sudo pear install --alldeps phix-0.12.0.tgz
Unknown channel "pear.gradwell.com"
Parsing of package.xml from file "/tmp/pear/temp/pearqOob9Z/package.xml" failed
install failed
stuart@ubuntu:/tmp$ sudo pear channel-discover pear.gradwell.com
Adding Channel "pear.gradwell.com" succeeded
Discovery of channel "pear.gradwell.com" succeeded
stuart@ubuntu:
/tmp$ sudo pear install --alldeps phix-0.12.0.tgz
Attempting to discover channel "pear.phpunit.de"...
downloading channel.xml ...
Starting to download channel.xml (804 bytes)
....done: 804 bytes

  1. Some of phix's dependencies, in turn, pull in packages that have interactive build scripts. These scripts fail to detect whether or not stdin is connected to a real terminal, making an install appear to hang when being installed in a scripted manner (for example, when building the vendor folder via the component skeleton's build.xml, or automatically building an integration test environment). Showstopper.

To pre-empt discussion, the bug is firmly with the packages that require interactive build scripts. It is their responsibility to detect whether or not they are running in an interactive terminal, and if not, to handle that correctly. It is also the case that the PEAR installer has a missing feature here, namely the ability for the user to pass command-line parameters to the build scripts of packages; this is probably required as part of the correct fix for this issue.

Going to have to mark this one as 'cannot fix' for now, and revisit it if the interactive scripts get fixed in the future.

Best regards,
Stu