Opened 6 years ago
Closed 5 years ago
#56635 closed defect (fixed)
nytprofhtml can't find scripts renamed by mp
Reported by: | chrstphrchvz (Christopher Chavez) | Owned by: | chrstphrchvz (Christopher Chavez) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.5.2 |
Keywords: | Cc: | ||
Port: | p5-devel-nytprof |
Description
nytprofhtml
is hardcoded to look for scripts named nytprofcalls
and flamegraph.pl
:
my $nytprofcalls = File::Spec->catfile($Config{'bin'}, 'nytprofcalls'); $nytprofcalls = which 'nytprofcalls' if not -e $nytprofcalls; die "Unable to find nytprofcalls in $Config{bin} or on the PATH" unless $nytprofcalls; my $flamegraph = File::Spec->catfile($Config{'bin'}, 'flamegraph') . $script_ext; $flamegraph = which "flamegraph$script_ext" if not -e $flamegraph; die "Unable to find flamegraph$script_ext in $Config{bin} or on the PATH" unless $flamegraph;
However MacPorts appends the Perl version (e.g. -5.26
) to all of the scripts, so running nytprofhtml
fails with the error:
Unable to find nytprofcalls in /opt/local/bin or on the PATH at /opt/local/bin/nytprofhtml-5.26 line 78.
Is this something the port should adjust, or is it potentially something the module itself should address?
Change History (5)
comment:1 Changed 6 years ago by mf2k (Frank Schima)
Cc: | michael@… removed |
---|---|
Owner: | set to michael@… |
Status: | new → assigned |
comment:2 Changed 6 years ago by chrstphrchvz (Christopher Chavez)
comment:3 Changed 6 years ago by chrstphrchvz (Christopher Chavez)
Another idea: patch/reinplace the two lines with . "-p${perl5.major}"
somehow. That might have fewer downsides.
comment:5 Changed 5 years ago by chrstphrchvz (Christopher Chavez)
Owner: | set to chrstphrchvz |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
More specific ideas:
_select
port to specify a default. At least that's how something like this would be handled for end users being able to invoke binaries. But (1) it would have to enforce at least one version being selected somehow, and (2) I don't really think it's appropriate here since it opens up the possibility of running nytprofhtml-5.xx with nytprofcalls-5.yy and flamegraph.pl-5.zz.These are sort of the extremes. Maybe there's something more of a compromise to work out here, or some other MacPorts feature I'm not aware of.