Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 610790 - dev-php/PEAR-PEAR-1.10.1-r1 failed to update channels: pear.php.net
Summary: dev-php/PEAR-PEAR-1.10.1-r1 failed to update channels: pear.php.net
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-24 10:37 UTC by Adam Randall
Modified: 2021-01-25 19:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,5.02 KB, text/plain)
2017-02-24 10:37 UTC, Adam Randall
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Randall 2017-02-24 10:37:45 UTC
Created attachment 464986 [details]
emerge --info

I've updated dev-php/PEAR-PEAR to version 1.10.1-r1 on my 14 servers. All failed with this information:

 * ERROR: dev-php/PEAR-PEAR-1.10.1-r1::gentoo failed (postinst phase):
 *   failed to update channels: pear.php.net

The build.log output is as follows:

cat /var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/temp/build.log
 * Package:    dev-php/PEAR-PEAR-1.10.1-r1
 * Repository: gentoo
 * Maintainer: php-bugs@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * 
 * cache_dir is set to: /var/cache/pear
 * download_dir is set to: /var/tmp/pear
 * temp_dir is set to: /tmp
 * 
 * If you want to change the above values, you need to set
 * PEAR_CACHEDIR, PEAR_DOWNLOADDIR and PEAR_TEMPDIR variable(s)
 * accordingly in /etc/portage/make.conf and re-emerge PEAR-PEAR.
 * 
 * Applying gentoo-libtool-mismatch-fix-v2.patch ...
 [ ok ]
 * Final size of build directory: 1988 KiB
 * Final size of installed tree: 1928 KiB
reading directory /var/cache/pear
0 cache entries cleared
 * Updating PEAR/PECL channels
Channel "pear.php.net" is already initialized
Updating channel "pear.php.net"
ERROR: downloaded channel definition file for channel "components.ez.no" from channel "pear.php.net"
 * ERROR: dev-php/PEAR-PEAR-1.10.1-r1::gentoo failed (postinst phase):
 *   failed to update channels: pear.php.net
 * 
 * Call stack:
 *     ebuild.sh, line 115:  Called pkg_postinst
 *   environment, line 342:  Called die
 * The specific snippet of code:
 *           pear channel-update ${chan} || die "failed to update channels: ${chan}";
 * 
 * If you need support, post the output of `emerge --info '=dev-php/PEAR-PEAR-1.10.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-php/PEAR-PEAR-1.10.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/homedir'
 * S: '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/work/PEAR-1.10.1'
 * FAILED postinst: 1

When I run the commands in the PEAR-PEAR-1.10.1-r1.ebuild, I receive no errors on output:

reading directory /var/cache/pear
0 cache entries cleared
Channel "pear.php.net" is already initialized
Updating channel "pear.php.net"
Channel "pear.php.net" is up to date
Channel "pecl.php.net" is already initialized
Updating channel "pecl.php.net"
Channel "pecl.php.net" is up to date
Channel "pear.phing.info" is already initialized
Updating channel "pear.phing.info"
Channel "pear.phing.info" is up to date
Channel "pear.symfony-project.com" is already initialized
Updating channel "pear.symfony-project.com"
Channel "pear.symfony-project.com" is up to date
Comment 1 Michael Orlitzky gentoo-dev 2017-02-24 12:31:56 UTC
At some point -- probably a long time ago -- you might have picked up the "components.ez.no" channel. (We used to have those eZ components packages in the tree.) Does

  pear list-channels

show it? If so, you can use

  pear channel-del <channel-name>

to delete it. Afterwards, the upgrade should complete, because it won't try to update a dead channel.
Comment 2 Adam Randall 2017-02-27 19:55:07 UTC
(In reply to Michael Orlitzky from comment #1)
> At some point -- probably a long time ago -- you might have picked up the
> "components.ez.no" channel. (We used to have those eZ components packages in
> the tree.) Does
> 
>   pear list-channels
> 
> show it? If so, you can use
> 
>   pear channel-del <channel-name>
> 
> to delete it. Afterwards, the upgrade should complete, because it won't try
> to update a dead channel.

I see that I have the components.ez.no in my list of channels. Performing a pear channel-delete components.ez.no removes the channel. However, upon trying to emerge again, it throws the same error as before. Additionally, components.ez.no is not added back into my list of channels.

I have also tried removing and reinstalling both dev-php/pear and dev-php/PEAR-PEAR. This also did not solve the problem.

One thing that I have observed is that when I run pear -V on the command line, I get this output:

# pear -V
PEAR Version:
PHP Version: 5.6.30-pl0-gentoo
Zend Engine Version: 2.6.0
Running on: Linux prometheus 3.12.66-gentoo #1 SMP Thu Feb 9 14:56:29 PST 2017 x86_64

Notice that there is no pear version listed.

If I do a pear upgrade pear, it will go through and install pear again, and subsequent calls to pear -V will show:

# pear -V
PEAR Version: 1.10.1
PHP Version: 5.6.30-pl0-gentoo
Zend Engine Version: 2.6.0
Running on: Linux prometheus 3.12.66-gentoo #1 SMP Thu Feb 9 14:56:29 PST 2017 x86_64

Finally, if I run the pear channel-update pear.php.net command, it never errors. I can't reproduce this outside of the emerge post installation script.
Comment 3 Adam Randall 2017-02-27 20:29:28 UTC
I've gone further and nullified my installation as best I can figure:

emerge -C $(eix -Ic pear --only-names)
rm -r /usr/share/php
rm /etc/pear.conf
emerge -v dev-php/pear

dev-php/PEAR-Archive_Tar: 1.4.2-r2 none none
dev-php/PEAR-Console_Getopt: 1.4.1-r1 none none
dev-php/PEAR-PEAR: 1.10.1-r1 none none
dev-php/PEAR-Structures_Graph: 1.1.1-r1 none none
dev-php/PEAR-XML_Util: 1.3.0-r1 none none
dev-php/pear: 1.10.1-r1 none none

All selected packages: =dev-php/PEAR-Console_Getopt-1.4.1-r1 =dev-php/PEAR-Structures_Graph-1.1.1-r1 =dev-php/PEAR-XML_Util-1.3.0-r1 =dev-php/PEAR-Archive_Tar-1.4.2-r2 =dev-php/pear-1.10.1-r1 =dev-php/PEAR-PEAR-1.10.1-r1
>>> Waiting 5 seconds before starting...
>>> (Control-C to abort)...
>>> Unmerging in: 5 4 3 2 1
>>> Unmerging (1 of 6) dev-php/PEAR-Archive_Tar-1.4.2-r2...
>>> Unmerging (2 of 6) dev-php/PEAR-Console_Getopt-1.4.1-r1...
>>> Unmerging (3 of 6) dev-php/PEAR-PEAR-1.10.1-r1...
>>> Unmerging (4 of 6) dev-php/PEAR-Structures_Graph-1.1.1-r1...
>>> Unmerging (5 of 6) dev-php/PEAR-XML_Util-1.3.0-r1...
>>> Unmerging (6 of 6) dev-php/pear-1.10.1-r1...

!!! existing preserved libs found
rm: cannot remove '/etc/pear.conf': No such file or directory
>>> Verifying ebuild manifests
>>> Emerging (1 of 6) dev-php/PEAR-XML_Util-1.3.0-r1::gentoo
>>> Installing (1 of 6) dev-php/PEAR-XML_Util-1.3.0-r1::gentoo
>>> Emerging (2 of 6) dev-php/PEAR-Structures_Graph-1.1.1-r1::gentoo
>>> Installing (2 of 6) dev-php/PEAR-Structures_Graph-1.1.1-r1::gentoo
>>> Emerging (3 of 6) dev-php/PEAR-Console_Getopt-1.4.1-r1::gentoo
>>> Installing (3 of 6) dev-php/PEAR-Console_Getopt-1.4.1-r1::gentoo
>>> Emerging (4 of 6) dev-php/PEAR-Archive_Tar-1.4.2-r2::gentoo
>>> Installing (4 of 6) dev-php/PEAR-Archive_Tar-1.4.2-r2::gentoo
>>> Emerging (5 of 6) dev-php/PEAR-PEAR-1.10.1-r1::gentoo
>>> Installing (5 of 6) dev-php/PEAR-PEAR-1.10.1-r1::gentoo
>>> Failed to execute postinst for dev-php/PEAR-PEAR-1.10.1-r1
>>> Emerging (6 of 6) dev-php/pear-1.10.1-r1::gentoo
>>> Installing (6 of 6) dev-php/pear-1.10.1-r1::gentoo
>>> Recording dev-php/pear in "world" favorites file...
>>> Jobs: 6 of 6 complete                           Load avg: 0.50, 0.37, 0.26

 * Messages for package dev-php/PEAR-PEAR-1.10.1-r1:

 *
 * cache_dir is set to: /var/cache/pear
 * download_dir is set to: /var/tmp/pear
 * temp_dir is set to: /tmp
 *
 * If you want to change the above values, you need to set
 * PEAR_CACHEDIR, PEAR_DOWNLOADDIR and PEAR_TEMPDIR variable(s)
 * accordingly in /etc/portage/make.conf and re-emerge PEAR-PEAR.
 *
 * FAILED postinst: 1
 * Updating PEAR/PECL channels
 * ERROR: dev-php/PEAR-PEAR-1.10.1-r1::gentoo failed (postinst phase):
 *   failed to update channels: pear.php.net
 *
 * Call stack:
 *     ebuild.sh, line 115:  Called pkg_postinst
 *   environment, line 319:  Called die
 * The specific snippet of code:
 *           pear channel-update ${chan} || die "failed to update channels: ${chan}";
 *
 * If you need support, post the output of `emerge --info '=dev-php/PEAR-PEAR-1.10.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-php/PEAR-PEAR-1.10.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/homedir'
 * S: '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/work/PEAR-1.10.1'

!!! existing preserved libs found





Actual build.log is the same as before:

 * Package:    dev-php/PEAR-PEAR-1.10.1-r1
 * Repository: gentoo
 * Maintainer: php-bugs@gentoo.org
 * USE:        abi_x86_64 amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 *
 * cache_dir is set to: /var/cache/pear
 * download_dir is set to: /var/tmp/pear
 * temp_dir is set to: /tmp
 *
 * If you want to change the above values, you need to set
 * PEAR_CACHEDIR, PEAR_DOWNLOADDIR and PEAR_TEMPDIR variable(s)
 * accordingly in /etc/portage/make.conf and re-emerge PEAR-PEAR.
 *
 * Applying gentoo-libtool-mismatch-fix-v2.patch ...
 [ ok ]
 * Final size of build directory: 1988 KiB
 * Final size of installed tree: 1928 KiB
reading directory /var/cache/pear
0 cache entries cleared
 * Updating PEAR/PECL channels
Channel "pear.php.net" is already initialized
Updating channel "pear.php.net"
ERROR: downloaded channel definition file for channel "components.ez.no" from channel "pear.php.net"
 * ERROR: dev-php/PEAR-PEAR-1.10.1-r1::gentoo failed (postinst phase):
 *   failed to update channels: pear.php.net
 *
 * Call stack:
 *     ebuild.sh, line 115:  Called pkg_postinst
 *   environment, line 319:  Called die
 * The specific snippet of code:
 *           pear channel-update ${chan} || die "failed to update channels: ${chan}";
 *
 * If you need support, post the output of `emerge --info '=dev-php/PEAR-PEAR-1.10.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=dev-php/PEAR-PEAR-1.10.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/homedir'
 * S: '/var/tmp/portage/dev-php/PEAR-PEAR-1.10.1-r1/work/PEAR-1.10.1'
 * FAILED postinst: 1
Comment 4 Sergey Popov gentoo-dev 2017-03-17 11:15:57 UTC
Also, can we remove || die from pear channel-update declaration? Or make it nonfatal at least.

Cause it bails out on servers, not connected to internet
Comment 5 Michael Orlitzky gentoo-dev 2017-03-17 12:05:51 UTC
@Adam:

I'm not sure where else to look... my command-line PEAR experience is pretty much limited to trying to remove it. As a last resort, you can grep /usr and /var for "components.ez.no" -- something still has that channel name memorized.

@Sergey:

Uhhh maybe? Is the channel update important? If it is, the die() should stay, but if it isn't, why so it at all? (I'd like to delete the whole command if we remove the "die").

My opinion is that the command-line "pear" should never be used on a Gentoo system, especially not as part of package-manager package installation. So I would like to delete that line, delete the php-pear-r1 eclass, and disable installation of the "pear" executable by default. But, there are around 125 ebuilds in the tree using php-pear-r1.eclass, and that eclass uses the command-line "pear", and messes with the update channels and expects you to have a network connection. It should never have been done that way, but now we're stuck with it.

Since I know next to nothing about how "pear" is supposed to work, I don't know how bad it would be to just disable the channel updates, and what effect that would have on those ~125 ebuilds using the php-pear-r1 eclass.
Comment 6 Brian Evans (RETIRED) gentoo-dev 2017-03-17 13:05:30 UTC
(In reply to Michael Orlitzky from comment #5)
> @Adam:
> 
> I'm not sure where else to look... my command-line PEAR experience is pretty
> much limited to trying to remove it. As a last resort, you can grep /usr and
> /var for "components.ez.no" -- something still has that channel name
> memorized.
> 
> @Sergey:
> 
> Uhhh maybe? Is the channel update important? If it is, the die() should
> stay, but if it isn't, why so it at all? (I'd like to delete the whole
> command if we remove the "die").
> 

If we transition to the php-pear-r2 class, then the adding of 3rd party channels should not be necessary at PEAR-PEAR time.  The channels will be added from a xml file locally.
Comment 7 Brian Evans (RETIRED) gentoo-dev 2021-01-25 19:11:12 UTC
This behavior was changed in later versions of PEAR-PEAR to recommend using 'emerge --config dev-php/PEAR-PEAR' for channel updates