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
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Ronald van Haren (pressh)
Architecture All
Severity High
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

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

Closed by  Antonio Rojas (arojas)
Monday, 10 February 2020, 08:47 GMT
Reason for closing:  Fixed
Comment by Mirko Kugelmeier (Mirko) - Monday, 11 November 2019, 21:58 GMT
Additionally (though I'm not sure if these issues are related), I get strange behavior with the pstops version included in this package version. If I symlink the file to the (presumably correct) folder above, the command "pstops '2:0(0cm,0.2cm)+1(10.5cm,0.2cm)' in.ps out.ps" returns with "cannot open output file out.ps at /usr/share/perl5/vendor_perl/PSUtils.pm line 71.". That file is definitely writeable though.
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?
Comment by kaztai (kaztai) - Friday, 27 December 2019, 05:44 GMT
> 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
Comment by Zachary Vance (za3k) - Wednesday, 29 January 2020, 22:30 GMT
I believe this is fixed in 1.93.

Edit: "paper" is now clarified to be a dependency, it's not fixed in git master
Comment by Zachary Vance (za3k) - Wednesday, 29 January 2020, 22:50 GMT
Comment by Zachary Vance (za3k) - Sunday, 09 February 2020, 09:40 GMT
This is fixed now.

Loading...