FAQ
Edit report at http://pear.php.net/bugs/bug.php?id=18450&edit=1

ID: 18450
Updated by: pear.neufeind@speedpartner.de
Reported By: pear dot neufeind at speedpartner dot de
Summary: post-install script tries to set config-value global
with local PEAR-install
Status: Open
Type: Bug
Package: PEAR
Package Version: 1.9.2
PHP Version: 5.3.6
Roadmap Versions:
New Comment:

Workaround:
After config-create for that new PEAR-repo, also install a local copy of
the PEAR-package and use that pear-script to run the post-install
script.

1) pear install -o PEAR
2) pear/pear run-scripts horde/horde_role

(using just "pear run-scripts horde/horde_role" fails again; so must
have to with using local/global PEAR-copy)


Previous Comments:
------------------------------------------------------------------------

[2011-04-17 00:59:31] neufeind

Description:
------------
Using a local PEAR-install instead of the global works as it should. But
a post-install-script which tries to set a config-value seems to try to
write to the global config (and fails).

Test script:
---------------
How to reproduce:
1) Create a "local" PEAR-installation for the current user:
pear config-create /home/user/pear .pearrc

2) Install a package
(as per http://www.horde.org/apps/horde/docs/?f=INSTALL.html)
pear channel-discover pear.horde.org
pear install horde/horde_role

3) Try to run post-install-script that tries to set a value
pear run-scripts horde/horde_role




Expected result:
----------------
Should set config-value for "horde_dir" for the local PEAR-installation.

Actual result:
--------------
Fails with:
Could not save horde_dir configuration value to PEAR config.


Tries to set the value for the global PEAR-installation (which fails).
But the source seems to suggest it "should" work (imho):

public function init($config, $pkg, $version)
{
$this->_config = $config;

return true;
}

/**
* Run task after prompt.
*
* @param array $info Parameter array.
* @param string $name Postinstall phase.
*/
public function run($info, $phase)
{
if ($phase !== 'first') {
return;
}

if (!$this->_config->set('horde_dir', $info['horde_dir'],
'user', 'pear.horde.org'))

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedApr 17, '11 at 12:01a
activeApr 17, '11 at 12:01a
posts1
users1
websitepear.php.net

1 user in discussion

Pear Neufeind: 1 post

People

Translate

site design / logo © 2022 Grokbase