Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 201772 - qt4.eclass - eqmake4 enhancements
Summary: qt4.eclass - eqmake4 enhancements
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 196336 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-12-09 14:43 UTC by Przemyslaw Maciag (RETIRED)
Modified: 2008-02-28 05:04 UTC (History)
3 users (show)

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


Attachments
qt4.eclass-enhancements.patch (qt4.eclass-enhancements.patch,1.96 KB, patch)
2007-12-09 14:44 UTC, Przemyslaw Maciag (RETIRED)
Details | Diff
qt4.eclass-enhancements.patch (qt4.eclass-enhancements.patch,5.08 KB, patch)
2007-12-09 17:56 UTC, Przemyslaw Maciag (RETIRED)
Details | Diff
qt4.eclass-enhancements.patch (qt4.eclass-enhancements.patch,5.09 KB, patch)
2007-12-09 18:14 UTC, Przemyslaw Maciag (RETIRED)
Details | Diff
qt4.eclass-enhancements.patch (qt4.eclass-enhancements.patch,5.07 KB, patch)
2007-12-09 18:16 UTC, Przemyslaw Maciag (RETIRED)
Details | Diff
qt3.eclass-enhancements.patch (qt3.eclass-enhancements.patch,2.21 KB, patch)
2007-12-23 13:54 UTC, Przemyslaw Maciag (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 14:43:01 UTC
error in qt*.eclass - lines with:
   echo -e "$CONFIG -= 
should be changed to:
   echo -e "\nCONFIG -= 
currently it's broken, since in .pro file we add line like:
<cut>
 -= debug <--- without CONFIG at the begining
<cut>

another enhancement was partly proposed by Bo Ørsted Andresen in bug https://bugs.gentoo.org/show_bug.cgi?id=129536 to check all needed use flags at one time. with current for loop every flag is checked seperatly and at the end user may have to recompile qt few times (sick!). there is one more thing we could (and should I think) add in pkg_setup function: there are 'must have' and 'optional' use flags. it would be nice if eclass could check both of them at single setup, so user would new which flags are needed and which are optional.

---
for example of why we this would be nice - psi-0.11 _needs_ qt4 to be build with 'qt3support' flag (required flag) and _may_ use 'debug' flag (optional one).
---

patch attached contains both enhancements. it would be nice to have this :)

Reproducible: Always

Steps to Reproduce:
Comment 1 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 14:44:37 UTC
Created attachment 138093 [details, diff]
qt4.eclass-enhancements.patch

qt4.eclass proposition

same thing could be added into qt3.eclass

Cheers,
Przemek
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2007-12-09 15:10:05 UTC
*** Bug 196336 has been marked as a duplicate of this bug. ***
Comment 3 Bo Ørsted Andresen (RETIRED) gentoo-dev 2007-12-09 15:38:57 UTC
(In reply to comment #0)
> for example of why we this would be nice - psi-0.11 _needs_ qt4 to be build
> with 'qt3support' flag (required flag) and _may_ use 'debug' flag (optional
> one).

I don't understand the optional thing. If the flag is optional then why the pkg_setup die?

(In reply to comment #1)
> Created an attachment (id=138093) [edit]
> qt4.eclass-enhancements.patch

I still don't see the reason for the for loops. built_with_use is perfectly capable of checking that all the flags are enabled and I don't see any strong arguments for only showing the flags that were disabled.
Comment 4 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 15:56:13 UTC
(In reply to comment #3)
> (In reply to comment #0)
> > for example of why we this would be nice - psi-0.11 _needs_ qt4 to be build
> > with 'qt3support' flag (required flag) and _may_ use 'debug' flag (optional
> > one).
> 
> I don't understand the optional thing. If the flag is optional then why the
> pkg_setup die?

here 'optional' means that flag _is_ in package ${PN} use flags and _is_ turn on for this package, but qt4 has to be first recompiled with the same use flag, if you want to turn it on for ${PN}.

for example: take 'debug' flag. someone may compile package that depends on qt4 with debug - to check something for us (or maybe he/she is creating some new app?). anyway - to use debug first qt4 has to compiled with it. but user may drop this flag, so any qt4 recompilation want be needed and ${PN} can be installed without problems. hope this is clear now.

> (In reply to comment #1)
> > Created an attachment (id=138093) [edit]
> > qt4.eclass-enhancements.patch
> 
> I still don't see the reason for the for loops. built_with_use is perfectly
> capable of checking that all the flags are enabled and I don't see any strong
> arguments for only showing the flags that were disabled.

with for loop we now exactly which flags are missing. of course we can do a simple test, but this way users now exactly what is missing. IMHO - this would be much more usefull, especially with more beginger users, don't you think?

Cheers,
Przemek
Comment 5 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 16:03:37 UTC
s/we now exactly/we know exactly/

sorry for my english...
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2007-12-09 16:19:25 UTC
(In reply to comment #0)
> error in qt*.eclass - lines with:
>    echo -e "$CONFIG -= 
> should be changed to:
>    echo -e "\nCONFIG -= 
> currently it's broken, since in .pro file we add line like:
> <cut>
>  -= debug <--- without CONFIG at the begining
> <cut>
> 

A fix for this typo was already posted in bug #120116 more than 3 months ago, but no one answered or merged my patch... :(
Comment 7 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 16:37:43 UTC
(In reply to comment #6)
> A fix for this typo was already posted in bug #120116 more than 3 months ago,
> but no one answered or merged my patch... :(

I'm checking the bug again. as I see documentation in missing also?

useless IUSE="${IUSE}" wasn't so useless at the beggining - this supposted to be something like IUSE="${IUSE} debug". without it - it's useless :)

is something else is missing?

Cheers,
Przemek
Comment 8 Bo Ørsted Andresen (RETIRED) gentoo-dev 2007-12-09 17:39:20 UTC
(In reply to comment #4)
> here 'optional' means that flag _is_ in package ${PN} use flags and _is_ turn
> on for this package, but qt4 has to be first recompiled with the same use
> flag, if you want to turn it on for ${PN}.

Ahh. I'd just use a pkg_setup that adds to QT4_B_W_U_C if the use flag is set and then calls qt4_pkg_setup. But I guess your approach gives more informative error messages and less typing in the ebuilds.

> > I still don't see the reason for the for loops. built_with_use is perfectly
> > capable of checking that all the flags are enabled and I don't see any
> > strong arguments for only showing the flags that were disabled.
> 
> with for loop we know exactly which flags are missing. of course we can do a
> simple test, but this way users now exactly what is missing. IMHO - this
> would be much more usefull, especially with more beginger users, don't you
> think?

I don't. But then it's not that important.
Comment 9 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 17:56:36 UTC
Created attachment 138109 [details, diff]
qt4.eclass-enhancements.patch

(In reply to comment #8)
> (In reply to comment #4)
> > with for loop we know exactly which flags are missing. of course we can do a
> > simple test, but this way users now exactly what is missing. IMHO - this
> > would be much more usefull, especially with more beginger users, don't you
> > think?
> 
> I don't. But then it's not that important.

I can imagine, that some package (that depends on qt), needs not a single USE from qt4, but few of them. With brief info I know exactly which one is missing, so I don't have to make an extra check to find them.

anyway - new patch version:
- Davide's documentation for functions (I changed it a bit, but my english isn't perfect - I someone could review it, it would be nice!)
- changes '[' into '[[' in if tests (again from Davide :) )
- small cleanups for messages about missing flags

Cheers,
Przemek
Comment 10 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 18:01:08 UTC
I forgot! I add one more thing to eclass - debug USE flag is added into all ebuilds. I believe it could be usefull. This flag could be also add to QT4_BUILT_WITH_USE_CHECK in eclass. This way debug builds of qt packages would be created without adding anything into ebuilds...

I think it's usefull, especially for tests. Is there any reason that I don't know, why we cannot add this?

Cheers,
Przemek
Comment 11 Davide Pesavento (RETIRED) gentoo-dev 2007-12-09 18:03:37 UTC
(In reply to comment #10)
> I forgot! I add one more thing to eclass - debug USE flag is added into all
> ebuilds. I believe it could be usefull. This flag could be also add to
> QT4_BUILT_WITH_USE_CHECK in eclass. This way debug builds of qt packages would
> be created without adding anything into ebuilds...
> 
> I think it's usefull, especially for tests. Is there any reason that I don't
> know, why we cannot add this?
> 

Yes, bug #187479.
Comment 12 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 18:14:15 UTC
Created attachment 138110 [details, diff]
qt4.eclass-enhancements.patch

optional flags have to checked with 'use' first... I forgot to test it ;)

Cheers,
Przemek
Comment 13 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 18:16:35 UTC
Created attachment 138111 [details, diff]
qt4.eclass-enhancements.patch

(In reply to comment #11)
> (In reply to comment #10)
> > I think it's usefull, especially for tests. Is there any reason that I don't
> > know, why we cannot add this?
> > 
> 
> Yes, bug #187479.
got it.

cleanuped patch.
Comment 14 Bo Ørsted Andresen (RETIRED) gentoo-dev 2007-12-09 18:50:39 UTC
(In reply to comment #9)
> > > with for loop we know exactly which flags are missing. of course we can
> > > do a simple test, but this way users now exactly what is missing. IMHO -
> > > this would be much more usefull, especially with more beginger users,
> > > don't you think?
> > 
> > I don't. But then it's not that important.
> 
> I can imagine, that some package (that depends on qt), needs not a single USE
> from qt4, but few of them. With brief info I know exactly which one is
> missing, so I don't have to make an extra check to find them.

You don't need to know. You can just add all of them to package.use...
Comment 15 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 19:00:11 UTC
(In reply to comment #14)
> You don't need to know. You can just add all of them to package.use...

Of course you are right (it will work), but it's really ugly for me. I just prefer it this way :)

Anyway - this cannot be done that way for optional packages, cause every one of them have be checked first is it turned on.

Cheers,
Przemek
Comment 16 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-09 19:01:10 UTC
(In reply to comment #15)
> Anyway - this cannot be done that way for optional packages, cause every one of
> them have be checked first is it turned on.
I mean optional use flags, not packages... sorry.

Cheers,
Przemek
Comment 17 Caleb Tennis (RETIRED) gentoo-dev 2007-12-10 13:50:43 UTC
I'm fine with this being committed, Przemyslaw, whenever you're happy with it.
Comment 18 Bo Ørsted Andresen (RETIRED) gentoo-dev 2007-12-10 14:10:46 UTC
(In reply to comment #13)
> Created an attachment (id=138111) [edit]
> qt4.eclass-enhancements.patch

s|contains use flag that need to turned on in qt4|contains use flags that need to be turned on for =x11-libs/qt-4*.|

s|gives some functionality, but can be safetly disabled in package|provides some functionality, but can alternatively be disabled in ${CATEGORY}/${PN}|

s|In order to compile ${PN} package first you need to build qt4|In order to compile ${CATEGORY}/${PN} first you need to build =x11-libs/qt-4*|

s|You are trying to compile ${PN} package|You are trying to compile ${CATEGORY}/${PN}|

s|install package ${PN} without|install ${CATEGORY}/${PN} without|
Comment 19 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-14 00:33:29 UTC
@Bo Ørsted Andresen: thx for spell checking :)

new qt4.eclass just commited. were closing this one or we use it to add same changes to qt3.eclass?

Cheers,
Przemek
Comment 20 Przemyslaw Maciag (RETIRED) gentoo-dev 2007-12-23 13:54:26 UTC
Created attachment 139176 [details, diff]
qt3.eclass-enhancements.patch

patch for qt3.eclass with qt3_src_unpack function - almost the same as qt4_src_unpack

if nobody is against, I'll commit it today, so we'll close it.

Cheers,
Przemek
Comment 21 Davide Pesavento (RETIRED) gentoo-dev 2008-02-28 00:32:49 UTC
troll's patch was applied to qt4.eclass two months ago... any reasons to keep this bug open?
Comment 22 Jakub Moc (RETIRED) gentoo-dev 2008-02-28 05:04:24 UTC
Don't think so... ;)