Test this with openshift-origin-cartridge-perl-1.28.0.1-1.el6op.noarch, puddle 2.2/2015-01-23.2. Steps: 1. Create perl application with rhc: rhc app create pp perl-5.10 2. Add the Util module to the index.pl : sed -i "2i use Util;" index.pl 3. create the libs directory: mkdir -p libs 4. Create Util.pm module with some functionality: echo "package Util; use strict; use warnings; use Exporter qw(import); our @EXPORT_OK = qw(add multiply); sub add { my ($x, $y) = @_; return $x + $y; } sub multiply { my ($x, $y) = @_; return $x * $y; } 1;" >> libs/Util.pm 5. Add module "Util","strict","warnings","Exporter" to file ".openshift/cpan.txt" 6.Push the change the application. # git add ./ # git commit -anmp [root@broker pp]# git push Counting objects: 11, done. Delta compression using up to 2 threads. Compressing objects: 100% (5/5), done. Writing objects: 100% (7/7), 680 bytes, done. Total 7 (delta 2), reused 0 (delta 0) remote: Stopping Perl cartridge remote: Waiting for stop to finish remote: Waiting for stop to finish remote: Waiting for stop to finish remote: Building git ref 'master', commit 1153196 remote: Building Perl cartridge remote: *** Installing modules from .openshift/cpan.txt remote: --> Working on Exporter remote: Fetching http://search.cpan.org/CPAN/authors/id/T/TO/TODDR/Exporter-5.70.tar.gz ... OK remote: Configuring Exporter-5.70 ... OK remote: Building Exporter-5.70 ... OK remote: Successfully installed Exporter-5.70 (upgraded from 5.63) remote: 1 distribution installed remote: ! Finding Util on cpanmetadb failed. remote: --> Working on Util remote: Fetching http://search.cpan.org/CPAN/authors/id/C/CT/CTRLSOFT/Parse-Pidl-0.02.tar.gz ... OK remote: Configuring Parse-Pidl-0.02 ... OK remote: Building Parse-Pidl-0.02 ... OK remote: Successfully installed Parse-Pidl-0.02 remote: 1 distribution installed remote: Preparing build for deployment remote: Deployment id is 57bd1f9e remote: Activating deployment remote: Starting Perl cartridge remote: Application directory "/" selected as DocumentRoot remote: ------------------------- remote: Git Post-Receive Result: success remote: Activation status: success remote: Deployment completed with status: success To ssh://yes-pp-1.com.cn/~/git/pp.git/ a3a5cc2..1153196 master -> master It fails as the same as https://bugzilla.redhat.com/show_bug.cgi?id=1039356#c13
I'm not an expert in the perl cartridge but this following two scenarios appear to describe the currently functionality: 1) If a user creates a package that exactly matches a module in cpan.txt then the module in cpan.txt will win and it will attempt to be installed. For example, a local package called Util and a cpan.txt like with the following contents: Parse::Pidl::Util strict warnings Exporter This seems reasonable to me. 2) The apparent bug is if a users creates a package that happens to be a substring of any module in cpan.txt. Here we seem to do the wrong thing and attempt to download from cpan. This is because of https://github.com/openshift/origin-server/blob/master/cartridges/openshift-origin-cartridge-perl/bin/build#L56 For example let's same my cpan.txt looks like this: Parse::Pidl::Util strict warnings Exporter Line 56's "! grep Util cpan.txt" will be false which means the filter logic won't be run. That's why eventually "cpanm -n Util" run which in turn tries to install Parse-Pidl-0.02.tar.gz. If you look at the output from https://bugzilla.redhat.com/show_bug.cgi?id=1039356#c15 you will see the filter logic is actually not working and instead it's attempting to download the Util module from cpan. It's likely at that the time the test was run Online's cpan mirror either did not have the Parse::Pidl or didn't have the logic that mapped Util to Parse::Pidl. I think this bug actually still exists in Online. Jakub, would you mind take a look to see if my assessment is accurate?
Move this bug to VERIFIED according to Comment 5
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-0220.html
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days