FS#64372 - [psutils] PSUtils.pm path problem ?
Attached to Project:
Arch Linux
Opened by Yannick Alméras (alfazaz) - Sunday, 03 November 2019, 14:32 GMT
Last edited by Antonio Rojas (arojas) - Monday, 10 February 2020, 08:47 GMT
Opened by Yannick Alméras (alfazaz) - Sunday, 03 November 2019, 14:32 GMT
Last edited by Antonio Rojas (arojas) - Monday, 10 February 2020, 08:47 GMT
|
Details
Description:
With psutils 1.90-1, I get this aborting error (for example with psselect command) : Can't locate PSUtils.pm in @INC (you may need to install the PSUtils module) (@INC contains: /usr/lib/perl5/5.30/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/5.30/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/5.30/core_perl /usr/share/perl5/core_perl) at /usr/bin/pstops line 21. BEGIN failed--compilation aborted at /usr/bin/pstops line 21. I think it's because the package puts PSUtils.pm module in a bad folder : it's in /usr/share/perl but shouldn't it be in /usr/share/perl5/vendor_perl ? It works with this path... |
This task depends upon
If I let pstops write to stdout instead, I get a valid ps file, but the output is incorrect given the command. It somehow seems the paper size is not taken into account?
-p option returns error.
$ pstops -pa4 '1:0(53mm,74mm)' temp.ps
paper size 'a4' unknown at /usr/share/perl5/vendor_perl/PSUtils.pm line 52.
$ cat -n /usr/share/perl5/vendor_perl/PSUtils.pm | sed -n "39,53p"
39 # Get the size of the given paper, or the default paper if no argument given.
40 sub paper_size {
41 my ($paper_name) = @_;
42 chomp($paper_name = `paper`) unless defined($paper_name);
43 my $dimensions = `paper --unit=pt --size $paper_name 2>/dev/null` or return;
44 $dimensions =~ /^([\d.]+) ([\d.]+)/;
45 return round($1), round($2); # round dimensions to nearest point
46 }
47
48 sub parsepaper {
49 my ($width, $height) = paper_size($_[0]);
50 if (!defined($width)) {
51 my ($w, $h) = split /x/, $_[0];
52 eval { ($width, $height) = (singledimen($w), singledimen($h)); }
53 or die("paper size '$_[0]' unknown");
psutils-1.17 used "libpaper", but psutils-1.90 requires the "paper".
But there is no paper in Packages and AUR.
https://github.com/rrthomas/psutils
> It is also recommended to install paper, which allows a sensible default
> paper size to be discovered, and configured by the user:
>
> paper: https://github.com/rrthomas/paper
Edit: "paper" is now clarified to be a dependency, it's not fixed in git master