Currently all pear channels are added at the end of installing dev-php/pear. This causes problems when a pear package uses secondary channels. E.g if you want to create an ebuild for pdepend, you need to create your own revision of dev-lang/pear that adds the required channel pear.pdepend.org. A better solution would be to let ebuilds handle adding/updating channels, e.g through added functionality to the pear eclass. Reproducible: Always Steps to Reproduce:
http://git.overlays.gentoo.org/gitweb/?p=proj/php.git;a=commitdiff;h=9be2f0058bf63d9a9ed6630943178e759f9fc8ea My take on solving the problem. I have no idea about conventions for eclass and whatnot, but it works
The only thing I see blocking this is that you're assuming the user will be online when he emerges stuff. Pear channel updates need connectivity, while you can provide the distfiles via other means (usb, disk, whatever). Not sure how many users actually run a partially disconnected gentoo box (you're still required to be online when installing PEAR-PEAR). Maybe the GSoC projects of this year have already fixed that? Beandog?
I think it is infeasable to support the pear installer and offline installs at the same time. Pear simply doesn't support it and I think it would be way too much work to somehow add channels offline. The solution I propose is better than to keep rev bumping dev-lang/pear. Especially considering supporting pear-based packages in other overlays.
Actually, pear channel-add adds a channel using a local channel.xml-file. So one solution to the channel problem is to have packages for channels. Then packages can simply depend on the channel package that they belong to. This should be fairly straightforward to support.
Since dev-php/pear basically does the same thing, I opted for the changes I did in the overlay.