[Bug 1202402] New: psnup fails due to paper command output (with hotfix)
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402 Bug ID: 1202402 Summary: psnup fails due to paper command output (with hotfix) Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other Assignee: screening-team-bugs@suse.de Reporter: 7eggert@gmx.de QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- psutils-2.08-1.3.x86_64 paper-2.3-2.3.x86_64 When running psnup, /usr/share/psutils/PSUtils.pm will run `paper --unit=pt $paper_name` (Line 76) It will expect a return value of / ([.0-9]+)x([.0-9]+) pt$/ (Line 77) This version of paper will output e.g. "A4" unless called with --size; then it will output "595.275590551181 841.889763779527" (which still can't be parsed) Fixed function (sorry for not providing a patch): /usr/share/psutils/PSUtils.pm sub paper_size { my ($paper_name) = @_; chomp($paper_name = paper([])) unless defined($paper_name); my $dimensions = paper(["--unit=pt", "$paper_name"], 1) or return; my @match = $dimensions =~ / ([.0-9]+)x([.0-9]+) pt$/; if (!@match) { $dimensions = paper(["--unit=pt", "--size", "$paper_name"], 1); @match = $dimensions =~ /([.0-9]+) ([.0-9]+)$/; } my $old_locale = setlocale(LC_ALL); setlocale(LC_ALL, ""); my ($w, $w_unparsed) = strtod($match[0]); my ($h, $h_unparsed) = strtod($match[1]); setlocale(LC_ALL, $old_locale); return int($w + 0.5), int($h + 0.5); # round dimensions to nearest point } -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402 http://bugzilla.opensuse.org/show_bug.cgi?id=1202402#c1 --- Comment #1 from Bodo Eggert <7eggert@gmx.de> --- Reported upstream: https://github.com/rrthomas/psutils/issues/41 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402#c2
Dr. Werner Fink
Reported upstream:
FRom that issue this looks like an required update for libpaper https://github.com/rrthomas/psutils/issues/41#issuecomment-1216291823
Apologies for this incompatibility. The fix is to upgrade to the latest libpaper 1.2.2 (libpaper 1.2.x replaces paper 2.x). Paper 2.4 (the last version of paper 2.x) also outputs the dimensions in the expected form.
-- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402#c3
Paolo Stivanin
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402#c4
--- Comment #4 from Paolo Stivanin
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402#c5
Dr. Werner Fink
It seems I've found how to deal with it, sr submitted to Factory: https://build.opensuse.org/request/show/998580
Then psutils have to require libpaper-tools to get the correct paper command ... I do not understand why it is not possible simply update the whole package to get both paper and libpaper uptodate -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402#c6
--- Comment #6 from Paolo Stivanin
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402
http://bugzilla.opensuse.org/show_bug.cgi?id=1202402#c7
Dr. Werner Fink
participants (1)
-
bugzilla_noreply@suse.com