Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 377063 - dev-python/python-poppler-0.12.1-r1 incompatible with poppler 0.18
Summary: dev-python/python-poppler-0.12.1-r1 incompatible with poppler 0.18
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Python Gentoo Team
URL: https://bugs.launchpad.net/poppler-py...
Whiteboard: tracking upstream
Keywords:
: 388331 399095 (view as bug list)
Depends on:
Blocks: 384885
  Show dependency tree
 
Reported: 2011-07-30 14:31 UTC by Keith Amidon
Modified: 2012-02-28 21:47 UTC (History)
7 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
draw to pixbuf with cairo (python-poppler-0.12.1-cairo-drawing-fix.patch,5.20 KB, patch)
2011-09-08 21:06 UTC, Rafał Mużyło
Details | Diff
patch dropping two poppler gdk-dependent functions (python-poppler-0.12.1-poppler0.18.0-changes.patch,879 bytes, patch)
2011-09-29 17:27 UTC, Rafał Mużyło
Details | Diff
plug some leaks (python-poppler-0.12.1-fix-leaks.patch,1.80 KB, patch)
2011-09-29 17:32 UTC, Rafał Mużyło
Details | Diff
python-poppler-0.12.1-r2.ebuild (python-poppler-0.12.1-r2.ebuild,1.56 KB, text/plain)
2011-11-24 02:30 UTC, Clemmitt M. Sigler
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Amidon 2011-07-30 14:31:00 UTC
On my unstable amd64 system I recently tried to use pdfshuffler to rearrange some PDF files and when the files were imported they imported the pages showed up as black squares instead of thumbnails.  A little web searching led to this Fedora bug report:

https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=705153

Looking at the Gentoo ebuild the patch that was removed from the Fedora RPM is present in the Gentoo ebuild.

Reproducible: Always

Steps to Reproduce:
1.Open pdfshuffler on an unstable gentoo system
2.Import a PDF
Actual Results:  
Black squares for displayed in place of thumbnails.

Expected Results:  
Actual thumbnails are displayed.
Comment 1 Keith Amidon 2011-08-10 19:52:22 UTC
I made a local -r2 ebuild that removed the patch the was removed in the Fedora solution to this issue and pdfshuffler is working for me again.
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2011-08-19 20:42:28 UTC
I can confirm both the original issue and the fix, on x86.
Comment 3 Rafał Mużyło 2011-09-08 21:06:21 UTC
Created attachment 285891 [details, diff]
draw to pixbuf with cairo

The above comments are just about half right, as the don't touch one important issue: upcoming release of poppler 0.18.0 will remove poppler_page_render_to_pixbuf{,_for_printing}.

As per poppler devs' advice, the solution is to take the old code from poppler to create that override.

So, this patch *should* work - it's meant to replace python-poppler-0.12.1-76_75.diff.

Please test if it works.

Though I'm not saying this will be the *only* thing to fix for poppler 0.18
(poppler_page_get_thumbnail_pixbuf and poppler_page_render_selection_to_pixbuf will be gone too, but pdfshuffler doesn't use those).
Comment 4 Rafał Mużyło 2011-09-29 17:27:18 UTC
Created attachment 288257 [details, diff]
patch dropping two poppler gdk-dependent functions

OK, now that poppler 0.18 went into the tree, it's (as I mentioned) incompatible with python-poppler.

This patch will drop the two functions, that aren't used by pdfshuffler.

The other two are handled by the previous patch.
This will make python-poppler build a working version of itself.

Obviously, the question is: should python-poppler provide the other two (from the previous patch) or should it push the cairo_surface <-> GdkPixbuf conversion on downstream (i.e. pdfshuffler).
Comment 5 Rafał Mużyło 2011-09-29 17:30:01 UTC
On unrelated note - would be convenient if some of the fields (i.e. "Blocks") could be edited from "Add an attachment" section.
Comment 6 Rafał Mużyło 2011-09-29 17:32:49 UTC
Created attachment 288261 [details, diff]
plug some leaks

One more patch - from a launchpad bug (316722)- that plugs a few leaks in python-poppler.
Comment 7 Diego Elio Pettenò (RETIRED) gentoo-dev 2011-10-06 15:27:03 UTC
And please add

append-ldflags -Wl,-z,defs

so that the package won't fake working when it has undefined references.
Comment 8 Rafał Mużyło 2011-10-12 10:12:58 UTC
(In reply to comment #7)
> And please add
> 
> append-ldflags -Wl,-z,defs
> 
> so that the package won't fake working when it has undefined references.

Not really a solution here (at least, I don't think so) - that's a python module and those are pretty fine with undefined symbols (those provided by python upon module load).
Comment 9 Ian Stakenvicius (RETIRED) gentoo-dev 2011-10-24 17:40:27 UTC
*** Bug 388331 has been marked as a duplicate of this bug. ***
Comment 10 Clemmitt M. Sigler 2011-11-24 02:29:15 UTC
(In reply to comment #6)
> One more patch - from a launchpad bug (316722)- that plugs a few leaks in
> python-poppler.

In response to the issue listed at duplicate Bug 388331, I've used the three patches posted here by Rafał Mużyło in Comment 3, Comment 4, and Comment 6.  I'll attach an updated ebuild next.  I had to eliminate the patch python-poppler-0.12.1-76_75.diff as its functionality is duplicated in python-poppler-0.12.1-cairo-drawing-fix.patch (I believe).

I emerged python-poppler so I could install gimagereader from the sabayon layman overlay.  HTH.

Clemmitt
Comment 11 Clemmitt M. Sigler 2011-11-24 02:30:50 UTC
Created attachment 293595 [details]
python-poppler-0.12.1-r2.ebuild

Updated ebuild.  This just incorporates the three patches provided above.
Comment 12 Jean-Francis Roy 2011-12-05 14:11:47 UTC
Any news on this? The updated ebuild using the three patches works for me (at least it fixes the original problem (pdfshuffler) on my side.
Comment 13 Rafał Mużyło 2011-12-06 10:53:58 UTC
To be honest, I'd consider patch I dropped into bug 390607 comment 8, combined with removing render_to_pixbuf{,_for_printing} methods a better *short* term solution (the apps stil using it will simply need to get fixed) and the long term lies in completing the second patch (it's already somewhat working, but I'm nearly sure it's incomplete).

Perhaps importing the loading progressbar from upstream repo would be a good idea too.
Comment 14 Rafał Mużyło 2012-01-16 16:54:17 UTC
*** Bug 399095 has been marked as a duplicate of this bug. ***
Comment 15 Andreas K. Hüttel archtester gentoo-dev 2012-02-01 21:45:08 UTC
Ping- what's happening here? AFAIK this is the last known problem with poppler-0.18 ...
Comment 16 Markus Walter 2012-02-18 11:26:16 UTC
I can confirm, that the three patches solve the problem for pdfshuffler. It starts fine and all pages are displayed correctly (i.e. no black rectangles).

I used the three patches on top of current python-poppler-0.12.1-r2.
Comment 17 Marien Zwart (RETIRED) gentoo-dev 2012-02-28 21:47:51 UTC
I've added a patch from Fedora which just removes 4 functions/methods that were removed from Poppler. This should make things at least not crash. I'll fix up pdfshuffler and (if necessary) app-misc/gourmet (the only two things that depend on python-poppler in gentoo-x86).

I glanced at the patch from comment #6, but it looks like it has not been committed upstream yet. Can you file a separate bug for this if you really think gentoo needs to pick it up?

I've also added a dependency on <poppler-0.18 to the older python-poppler ebuilds in order to crash less.

Marking fixed, please file separate bugs if the API removal breaks other apps so we can fix those.