Bug 1046753 - Perl: modules that are installed system-wide are not upgraded (even when forced by deplist.txt)
Summary: Perl: modules that are installed system-wide are not upgraded (even when forc...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Image
Version: 2.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-26 22:54 UTC by mephinet
Modified: 2015-05-15 00:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-30 00:54:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1026652 0 unspecified CLOSED openshift-origin-cartridge-perl/bin/build tries to update dependencies it cannot build (DB_File) 2021-02-22 00:41:40 UTC

Internal Links: 1026652

Description mephinet 2013-12-26 22:54:52 UTC
Since about a month ago, the perl cartridge build script checks whether a required module is installed system-wide before installing it on cpan. Great. If this behaviour triggers, the following note is printed:

remote: ***   Skipping module DateTime install from CPAN (found in system).
remote: ***   Please add DateTime to deplist.txt to install it from CPAN.

However, adding DateTime to the deplist.txt does not work as expected, the module still isn't fetched from CPAN.

My guess: this has been introduced by
https://github.com/openshift/origin-server/commit/036e54c0cac5a70bf81f0c9a13a5de242bd297f4
the code:
 &&  ! grep "$f" ${OPENSHIFT_REPO_DIR}deplist.txt >/dev/null 2>&1;
needs to be executed in the:
perl -e "use $f;"
path as well...

Steps to Reproduce:
1. add a perl script that contains "use DateTime" to your perl cartridge, push. You will get the "Skipping module install" message
2. add "DateTime" to your deplist.txt, push again

Actual results:
You still get the "Skipping module install" message.

Expected results:
DateTime is updated from CPAN.

Additional info:
My app is kino-gortan.rhcloud.com

Comment 1 Derek Carter 2013-12-31 17:17:27 UTC
Same thing happening for me with the Encode module.

Comment 2 Derek Carter 2013-12-31 17:20:40 UTC
(In reply to Derek Carter from comment #1)
> Same thing happening for me with the Encode module.

Also, when trying to work around it with cpanm and setting the HOMEDIR, I still have issues because Encode wants to put stuff in /usr/bin/ and /usr/lib/ (I'm still working on the magic incantation to get the ${PREFIX} changed.

--
Derek

Comment 3 Derek Carter 2013-12-31 17:29:59 UTC
Created upstream bug here: https://github.com/openshift/origin-server/issues/4402

(maybe better visibility for developers there).

Comment 4 Derek Carter 2013-12-31 19:30:48 UTC
Found a manual workaround

cpanm --interactive --local-lib=${OPENSHIFT_PERL_DIR}/perl5lib/ MODULE::NAME

Comment 5 Michal Fojtik 2014-01-09 11:29:07 UTC
The deplist.txt issue should be fixed now, see this BZ: 

https://bugzilla.redhat.com/show_bug.cgi?id=1026652

Comment 6 Yan Du 2014-01-10 05:40:05 UTC
Test on devenv_4205

Issue have been fixed.

remote: Stopping Perl cartridge
remote: Waiting for stop to finish
remote: Building git ref 'master', commit 4f59567
remote: Building Perl cartridge
remote: --> Working on DateTime
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/D/DR/DROLSKY/DateTime-1.06.tar.gz ... OK
remote: ==> Found dependencies: Module::Build
remote: --> Working on Module::Build
remote: Fetching http://mirror1.ops.rhcloud.com/mirror/perl/CPAN/authors/id/L/LE/LEONT/Module-Build-0.4203.tar.gz ... OK
remote: Configuring Module-Build-0.4203 ... OK
<-------------------snip----------------------->
remote: Building DateTime-1.06 ... OK
remote: Successfully installed DateTime-1.06
remote: 34 distributions installed
remote: Preparing build for deployment
remote: Deployment id is fc0f8f6b
remote: Activating deployment
remote: Starting Perl cartridge
remote: Result: success
remote: Activation status: success
remote: Deployment completed with status: success

Move bug to verified.


Note You need to log in before you can comment on or make changes to this bug.