Bug 80250 - Fix moc-qt5 detection
Summary: Fix moc-qt5 detection
Status: RESOLVED FIXED
Alias: None
Product: poppler
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All All
: medium normal
Assignee: poppler-bugs
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-19 19:43 UTC by Hib Eris
Modified: 2014-07-10 22:22 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix moc-qt5 detection (862 bytes, patch)
2014-06-19 19:43 UTC, Hib Eris
Details | Splinter Review
Fix moc-qt5 detection (868 bytes, patch)
2014-06-19 21:54 UTC, Hib Eris
Details | Splinter Review
Fix moc-qt5 detection (869 bytes, patch)
2014-06-20 06:17 UTC, Hib Eris
Details | Splinter Review

Description Hib Eris 2014-06-19 19:43:49 UTC
My moc-qt5 gives this output for its version:

$ i686-w64-mingw32-moc-qt5 -v
i686-w64-mingw32-moc-qt5 5.2.1
Comment 1 Hib Eris 2014-06-19 19:43:52 UTC
Created attachment 101377 [details] [review]
Fix moc-qt5 detection
Comment 2 Albert Astals Cid 2014-06-19 19:50:24 UTC
So you fix your thing and break others? Not a good idea ;)
Comment 3 Hib Eris 2014-06-19 20:03:18 UTC
(In reply to comment #2)
> So you fix your thing and break others? Not a good idea ;)

I suspected it was broken for everyone. I do not have an other (non cross compile) moc-qt5 to test with, but I would expect it to do something like this:

$ moc-qt5 -v
moc-qt5 5.2.1


But obviously, if that is not the case, my fix won't work.

Can you tell me what the output of your moc-qt5 is?
Comment 4 Albert Astals Cid 2014-06-19 20:10:53 UTC
see bug #72744 as the git log mentions.
Comment 5 Hib Eris 2014-06-19 20:17:03 UTC
(In reply to comment #4)
> see bug #72744 as the git log mentions.

That only mentions moc, not moc-qt5.

My patch only affects the code searching for a moc-qt5 executable, not the code searching for a moc executable.

So I don't think it will break others.
Comment 6 Albert Astals Cid 2014-06-19 20:23:45 UTC
sure, but who says that moc-qt5 can can return
"moc 5.2"
?
Is it that hard just adding your case to the regexp?
Comment 7 Hib Eris 2014-06-19 20:43:08 UTC
(In reply to comment #6)
> sure, but who says that moc-qt5 can can return
> "moc 5.2"
> ?
> Is it that hard just adding your case to the regexp?

No, it is not hard, but it would be adding a workaround instead of fixing a bug.

I've just tested my moc-qt5 by renaming in to 'foo', and then it gives:

$ foo -v
foo 5.2.1

So it is just returning the command name and the moc version number.

In the configure script we are looking for a command (xxx-)moc-qt5, so that will return (xxx-)moc-qt5 5.2.1, which will never match 'moc 5'. Matching with 'moc 5' is wrong. In my opinion it is better to fix that by matching with 'moc-qt5 5' instead.
Comment 8 Albert Astals Cid 2014-06-19 21:02:42 UTC
> Matching with 'moc 5' is wrong
No, it's not wrong, if it returned moc 5 in the future (you can't predict past or future behavior) i don't see any problem on moc-qt5 returning moc 5.9

So please, just add it to the regexp.
Comment 9 Hib Eris 2014-06-19 21:51:14 UTC
(In reply to comment #8)
> > Matching with 'moc 5' is wrong
> No, it's not wrong,

All evidence suggests it has never worked for anyone. Also, looking at the code it seems to be a copy & paste error. So it seems wrong to me. 

> if it returned moc 5 in the future (you can't predict
> past or future behavior) i don't see any problem on moc-qt5 returning moc 5.9

But it doesn't return moc 5 now nor did it ever. I can think of lots of other strings it might return in the future, but as we cannot predict the future it seems silly to have checks making guesses about that.

> So please, just add it to the regexp.

I do not agee with this, but when you really want to go that way, I will send a new patch for it.
Comment 10 Hib Eris 2014-06-19 21:54:27 UTC
Created attachment 101386 [details] [review]
Fix moc-qt5 detection
Comment 11 Hib Eris 2014-06-20 06:17:22 UTC
Created attachment 101415 [details] [review]
Fix moc-qt5 detection
Comment 12 Albert Astals Cid 2014-07-10 22:22:33 UTC
Pushed, thanks.

This shows why we should only be using the cmake buildsystem :D


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.