>>> Emerging (1 of 1) app-text/qpdfview-0.4.13::ff2000 * qpdfview-0.4.13.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking qpdfview-0.4.13.tar.gz to /var/tmp/portage/app-text/qpdfview-0.4.13/work >>> Source unpacked in /var/tmp/portage/app-text/qpdfview-0.4.13/work >>> Preparing source in /var/tmp/portage/app-text/qpdfview-0.4.13/work/qpdfview-0.4.13 ... * Looking in translations for new locales ... * Done /var/tmp/portage/app-text/qpdfview-0.4.13/temp/environment: line 2052: /usr/lib64/qt5/bin/lrelease: No such file or directory It should depend on dev-qt/linguist-tools:5. lrelease for qt4 comes with qtcore.
(In reply to Franz Fellner from comment #0) > >>> Emerging (1 of 1) app-text/qpdfview-0.4.13::ff2000 There is no ff2000 overlay.
(In reply to Jeroen Roovers from comment #1) > (In reply to Franz Fellner from comment #0) > > >>> Emerging (1 of 1) app-text/qpdfview-0.4.13::ff2000 > > There is no ff2000 overlay. And there is no qpdfview-0.14.3 (yet) ;) Nevertheless qpdfview-0.14.2::gentoo calls lrelease unconditionally: src_prepare() { prepare_locale() { lrelease "translations/${PN}_${1}.ts" || die "preparing ${1} locale failed" } I am currently in a huge emerge -e world, nevertheless, here is the output when trying to emerge qpdfview::gentoo # USE="qt5" emerge -avt qpdfview::gentoo These are the packages that would be merged, in reverse order: Calculating dependencies... done! [ebuild UD~] app-text/qpdfview-0.4.12::gentoo [0.4.13::ff2000] USE="cups dbus djvu pdf postscript qt5%* svg synctex -fitz% -qt4% -sqlite (-mupdf%)" LINGUAS="de -ast -az -bg -bs -ca -cs -da -el -en_GB -eo -es -eu -fi -fr -gl -he -hr -id -it -kk -ko -ky -lt -ms -my -pl -pt -pt_BR -ro -ru -sk -sv -tr -ug -uk -vi -zh_CN (-be%) (-th%)" 538 KiB Total: 1 package (1 downgrade), Size of downloads: 538 KiB Would you like to merge these packages? [Yes/No] >>> Verifying ebuild manifests >>> Emerging (1 of 1) app-text/qpdfview-0.4.12::gentoo >>> Downloading 'http://distfiles.gentoo.org/distfiles/qpdfview-0.4.12.tar.gz' --2014-12-18 20:39:37-- http://distfiles.gentoo.org/distfiles/qpdfview-0.4.12.tar.gz Resolving distfiles.gentoo.org... 64.50.233.100, 140.211.166.134, 156.56.247.195, ... Connecting to distfiles.gentoo.org|64.50.233.100|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 550047 (537K) [application/x-gzip] Saving to: ‘/var/distfiles/qpdfview-0.4.12.tar.gz’ /var/distfiles/qpdf 100%[=====================>] 537,16K 14,0KB/s in 30s 2014-12-18 20:40:08 (18,0 KB/s) - ‘/var/distfiles/qpdfview-0.4.12.tar.gz’ saved [550047/550047] * qpdfview-0.4.12.tar.gz SHA256 SHA512 WHIRLPOOL size ;-) ... [ ok ] >>> Unpacking source... >>> Unpacking qpdfview-0.4.12.tar.gz to /var/tmp/portage/app-text/qpdfview-0.4.12/work >>> Source unpacked in /var/tmp/portage/app-text/qpdfview-0.4.12/work >>> Preparing source in /var/tmp/portage/app-text/qpdfview-0.4.12/work/qpdfview-0.4.12 ... * Looking in translations for new locales ... * There are changes in locales! This ebuild should be updated to: * PLOCALES="ast az be bg bs ca cs da de el en_GB eo es eu fi fr gl he hr id it kk ko ky lt ms my pl pt_BR pt ro ru sk sv th tr ug uk vi zh_CN" lrelease: could not find a Qt installation of '' * ERROR: app-text/qpdfview-0.4.12::gentoo failed (prepare phase): * preparing de locale failed Different message, because "lrelease" runs "/usr/bin/lrelease" which is a link to /usr/bin/qtchooser. You need /usr/lib64/qt5/bin/lrelease to make qtchooser happy - and that comes with linguist-tools ;)
Created attachment 391978 [details] build.log for qpdfview-0.4.12::gentoo
+ 25 Dec 2014; Ben de Groot <yngwin@gentoo.org> qpdfview-0.4.12.ebuild: + Add dev-qt/linguist-tools:5 dependency for qt5 lrelease (bug #532962).
(In reply to Ben de Groot from comment #4) > + 25 Dec 2014; Ben de Groot <yngwin@gentoo.org> qpdfview-0.4.12.ebuild: > + Add dev-qt/linguist-tools:5 dependency for qt5 lrelease (bug #532962). This still didn't work completely for me. I only have Qt5 installed, no Qt4. Only qtcore:4 installs a default.conf (linked to qt4 config). I still got that error. On another computer with both Qt4 and Qt5 installed qpdfview[qt5] emerged successfully. But only because it had a default.conf. But that means qpdf[qt5, -qt4] took lrelease from Qt4! I don't know if that can break anything. At least it is not expected. I don't know if it is an issue at all or even expected. Should I open a new bugreport for that?
Yes, it is an issue. Ebuilds should never call /usr/bin/lrelease (or just lrelease) because with qtchooser the /usr/bin/lrelease symlink target is user-controlled. Reopening.
Implementing bug 525830 would help here.
(In reply to Davide Pesavento from comment #6) > Yes, it is an issue. Ebuilds should never call /usr/bin/lrelease (or just > lrelease) because with qtchooser the /usr/bin/lrelease symlink target is > user-controlled. Reopening. That's not entirely true. Qtchooser reads some settings from environment variables, so you can set them to override user settings. I used it to use executables from specific qt version in media-video/vlc ebuilds.
(In reply to Paweł Stankowski from comment #8) > (In reply to Davide Pesavento from comment #6) > > Yes, it is an issue. Ebuilds should never call /usr/bin/lrelease (or just > > lrelease) because with qtchooser the /usr/bin/lrelease symlink target is > > user-controlled. Reopening. > > That's not entirely true. Qtchooser reads some settings from environment > variables, so you can set them to override user settings. I used it to use > executables from specific qt version in media-video/vlc ebuilds. You are right in general, but we discourage relying on qtchooser and the env var in ebuilds. The names of qtchooser profiles (/etc/xdg/qtchooser/*.conf) are considered an implementation detail and could change in the future (although I doubt they will).
I committed a preliminary fix, pointing to lrelease of used Qt version.
For me (only qt4 but no qt5 installed) the old qpdfview-0.4.13.ebuild works but with the new one I get: /var/tmp/portage/app-text/qpdfview-0.4.13/temp/environment: line 2138: /usr/lib64/qt4/bin/lrelease: No such file or directory * ERROR: app-text/qpdfview-0.4.13::gentoo failed (prepare phase): * preparing de locale failed The only lrelease binary I have is /usr/bin/lrelease which belongs to dev-qt/qtcore:4.
(In reply to Horst Prote from comment #11) > For me (only qt4 but no qt5 installed) the old qpdfview-0.4.13.ebuild works > but with the new one I get: > /var/tmp/portage/app-text/qpdfview-0.4.13/temp/environment: line 2138: > /usr/lib64/qt4/bin/lrelease: No such file or directory > * ERROR: app-text/qpdfview-0.4.13::gentoo failed (prepare phase): > * preparing de locale failed > > The only lrelease binary I have is /usr/bin/lrelease which belongs to > dev-qt/qtcore:4. You need >=qtcore-4.8.6-r1. I guess we should specify that dependency.
(In reply to Ben de Groot from comment #12) > You need >=qtcore-4.8.6-r1. I guess we should specify that dependency. ...or just use /usr/bin/lrelease as a fallback if the binary doesn't exist in the new location.