Failure to install local packageDescription:
------------
See test script for confusing command behaviour.
Shoudn't PEAR look for local package file first?
I find all the messages about channels rather confusing for non-PEAR developers.
Test script:
---------------
$ ../bin/pear install File_SearchReplace-1.1.2.tgz
Failed to download pear/File_SearchReplace, version "1.1.2", latest release is version 1.1.1, stability "stable", use "channel://pear.php.net/File_SearchReplace-1.1.1" to install
Cannot initialize 'channel://pear.php.net/File_SearchReplace-1.1.2.tgz', invalid or missing package file
Package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz" is not valid
install failed
$ ../bin/pear install -O File_SearchReplace-1.1.2.tgz
Cannot download non-local package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz"
Package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz" is not valid
install failed
$ ../bin/pear install ./File_SearchReplace-1.1.2.tgz
install ok: channel://pear.php.net/File_SearchReplace-1.1.2
$techtonik
techtonikhttp://pear.php.net/bugs/10661
PEAR Bug
Reported by techtonik
2007-04-09T01:47:48+00:00
PHP: 4.4.4 OS: Linux Package Version: 1.5.2
Description:
------------
See test script for confusing command behaviour.
Shoudn't PEAR look for local package file first?
I find all the messages about channels rather confusing for non-PEAR developers.
Test script:
---------------
$ ../bin/pear install File_SearchReplace-1.1.2.tgz
Failed to download pear/File_SearchReplace, version "1.1.2", latest release is version 1.1.1, stability "stable", use "channel://pear.php.net/File_SearchReplace-1.1.1" to install
Cannot initialize 'channel://pear.php.net/File_SearchReplace-1.1.2.tgz', invalid or missing package file
Package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz" is not valid
install failed
$ ../bin/pear install -O File_SearchReplace-1.1.2.tgz
Cannot download non-local package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz"
Package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz" is not valid
install failed
$ ../bin/pear install ./File_SearchReplace-1.1.2.tgz
install ok: channel://pear.php.net/File_SearchReplace-1.1.2
$]]>PEAR Bug
Reported by techtonik
2007-04-09T01:47:48+00:00
PHP: 4.4.4 OS: Linux Package Version: 1.5.2
Description:
------------
See test script for confusing command behaviour.
Shoudn't PEAR look for local package file first?
I find all the messages about channels rather confusing for non-PEAR developers.
Test script:
---------------
$ ../bin/pear install File_SearchReplace-1.1.2.tgz
Failed to download pear/File_SearchReplace, version "1.1.2", latest release is version 1.1.1, stability "stable", use "channel://pear.php.net/File_SearchReplace-1.1.1" to install
Cannot initialize 'channel://pear.php.net/File_SearchReplace-1.1.2.tgz', invalid or missing package file
Package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz" is not valid
install failed
$ ../bin/pear install -O File_SearchReplace-1.1.2.tgz
Cannot download non-local package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz"
Package "channel://pear.php.net/File_SearchReplace-1.1.2.tgz" is not valid
install failed
$ ../bin/pear install ./File_SearchReplace-1.1.2.tgz
install ok: channel://pear.php.net/File_SearchReplace-1.1.2
$]]>2007-04-09T01:47:48+00:00
cellog [2007-04-19 13:04] http://pear.php.net/bugs/10661#1176987846
please - this is how it has worked forever. there is no
reason to change this]]>please - this is how it has worked forever. there is no
reason to change this]]>2007-04-19T13:04:06+00:00
tias [2007-04-19 11:58] http://pear.php.net/bugs/10661#1176983892
That's interesting:
You think that 'pear upgrade <not_installed>' should _install_ te package. (#10768)
But you think that 'pear install <./local_package-higher_version>' should not _upgrade_ the given package!
I'd say we have to be consistent; either we allow the user to be a bit more sloppy and more humanlike with the commands, or either we don't implement this behaviour, for either one of them !
(of course, I'm in favor of implenting both; current behaviour:
$ pear install ./pkg-1.1
Skipping package "chnl/pkg", already installed
as version 0.2
Looks really silly)]]>That's interesting:
You think that 'pear upgrade <not_installed>' should _install_ te package. (#10768)
But you think that 'pear install <./local_package-higher_version>' should not _upgrade_ the given package!
I'd say we have to be consistent; either we allow the user to be a bit more sloppy and more humanlike with the commands, or either we don't implement this behaviour, for either one of them !
(of course, I'm in favor of implenting both; current behaviour:
$ pear install ./pkg-1.1
Skipping package "chnl/pkg", already installed
as version 0.2
Looks really silly)]]>2007-04-19T11:58:12+00:00
cellog [2007-04-10 09:42] http://pear.php.net/bugs/10661#1176198127
if you wish to upgrade a package, i.e. from
PEAR_Frontend_Web 0.5.2 to 0.5.3, use the upgrade command
pear upgrade PEAR_Frontend_Web-0.5.3.tgz
install is reserved for new installations. upgrade,
however, will install a package that is not yet installed.]]>if you wish to upgrade a package, i.e. from
PEAR_Frontend_Web 0.5.2 to 0.5.3, use the upgrade command
pear upgrade PEAR_Frontend_Web-0.5.3.tgz
install is reserved for new installations. upgrade,
however, will install a package that is not yet installed.]]>2007-04-10T09:42:07+00:00
tias [2007-04-10 05:17] http://pear.php.net/bugs/10661#1176182246
Hey Greg,
There is some confusion, there are 2 similar problems, the first one is reported in this original bugreport:
1) No package is installed, trying to install a local package:
This is fixed in my original patch (remote the $options['force'] = true lines)
[I don't understand the clue of your patch, so don't know which one is cleanest]
2) Package is installed, trying to install a local package (of a higher version):
[tias@tiasus]test sh bin/pear -c pear.conf list | grep _Web
PEAR_Frontend_Web 0.5.2 alpha
[tias@tiasus]test sh bin/pear -c pear.conf install ../PEAR_Frontend_Web-0.5.3.tgz
Skipping package "pear/PEAR_Frontend_Web", already installed as version 0.5.2
No valid packages found
install failed
Note that this behaviour is not reported by a user ! I stumbled upon it myself and found it a bit confusing too.
The 'Skipping package...' thing is from somewhere in $downloaded = &$this->downloader->download($packages);
more exactly in PEAR/Downloader/Package.php::removeInstalled()
So that one is rooted deeper, I proposed to ignore that problem by just setting the 'force' option ; )
In fact, the problem is that the user would say 'install' and not 'upgrade'. So, there are 3 options:
1) ignore this behaviour, user has to run 'upgrade'
2) automatically set 'upgrade' for local packages
3) make 'removeduplicate' only be a crybaby when the already installed package is effectively a >= version package, and not just when it is already installed (gives more sane error: ERROR: pear.php.net/PEAR_Frontend_Web is already installed)
Greg, don't yet change stuff, I have to think some more about this, what do you think ?]]>Hey Greg,
There is some confusion, there are 2 similar problems, the first one is reported in this original bugreport:
1) No package is installed, trying to install a local package:
This is fixed in my original patch (remote the $options['force'] = true lines)
[I don't understand the clue of your patch, so don't know which one is cleanest]
2) Package is installed, trying to install a local package (of a higher version):
[tias@tiasus]test sh bin/pear -c pear.conf list | grep _Web
PEAR_Frontend_Web 0.5.2 alpha
[tias@tiasus]test sh bin/pear -c pear.conf install ../PEAR_Frontend_Web-0.5.3.tgz
Skipping package "pear/PEAR_Frontend_Web", already installed as version 0.5.2
No valid packages found
install failed
Note that this behaviour is not reported by a user ! I stumbled upon it myself and found it a bit confusing too.
The 'Skipping package...' thing is from somewhere in $downloaded = &$this->downloader->download($packages);
more exactly in PEAR/Downloader/Package.php::removeInstalled()
So that one is rooted deeper, I proposed to ignore that problem by just setting the 'force' option ; )
In fact, the problem is that the user would say 'install' and not 'upgrade'. So, there are 3 options:
1) ignore this behaviour, user has to run 'upgrade'
2) automatically set 'upgrade' for local packages
3) make 'removeduplicate' only be a crybaby when the already installed package is effectively a >= version package, and not just when it is already installed (gives more sane error: ERROR: pear.php.net/PEAR_Frontend_Web is already installed)
Greg, don't yet change stuff, I have to think some more about this, what do you think ?]]>2007-04-10T05:17:26+00:00
cellog [2007-04-09 23:02] http://pear.php.net/bugs/10661#1176159776
this needs to be merged from PEAR_5_1 to HEAD]]>this needs to be merged from PEAR_5_1 to HEAD]]>2007-04-09T23:02:56+00:00
cellog [2007-04-09 23:02] http://pear.php.net/bugs/10661#1176159759
This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.]]>This bug has been fixed in CVS.
If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET).
If this was a problem with the pear.php.net website, the change should be live shortly.
Otherwise, the fix will appear in the package's next release.
Thank you for the report and for helping us make PEAR better.]]>2007-04-09T23:02:39+00:00
cellog [2007-04-09 21:07] http://pear.php.net/bugs/10661#1176152855
using --force implicitly is *very* dangerous as this
ignores dependency failures. A better solution is needed.]]>using --force implicitly is *very* dangerous as this
ignores dependency failures. A better solution is needed.]]>2007-04-09T21:07:35+00:00
tias [2007-04-09 12:12] http://pear.php.net/bugs/10661#1176120734
Hello Techtonik,
Thank you for you bugreport, pear indeed did not suppose the file was local.
The attached patch solves this, and always gives the output:
install ok: channel://pear.php.net/File_SearchReplace-1.1.2
To PEAR developers:
When trying to install a more-up-to-date local package, while another one is already installed, it gives following output:
Skipping package "pear/PEAR_Frontend_Web", already installed as version 0.5.2
No valid packages found
install failed
A clean solution is to automatically set the option 'force' when a local or a URL package is given, as this is what the user thinks he wants.
The attached patch does this too.
g,T]]>Hello Techtonik,
Thank you for you bugreport, pear indeed did not suppose the file was local.
The attached patch solves this, and always gives the output:
install ok: channel://pear.php.net/File_SearchReplace-1.1.2
To PEAR developers:
When trying to install a more-up-to-date local package, while another one is already installed, it gives following output:
Skipping package "pear/PEAR_Frontend_Web", already installed as version 0.5.2
No valid packages found
install failed
A clean solution is to automatically set the option 'force' when a local or a URL package is given, as this is what the user thinks he wants.
The attached patch does this too.
g,T]]>2007-04-09T12:12:14+00:00
cellog [2007-04-09 08:35] http://pear.php.net/bugs/10661#1176107727
Tias: this is due to your patch for improving upgrade.]]>Tias: this is due to your patch for improving upgrade.]]>2007-04-09T08:35:27+00:00