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:
Created attachment 138093 [details, diff] qt4.eclass-enhancements.patch qt4.eclass proposition same thing could be added into qt3.eclass Cheers, Przemek
*** Bug 196336 has been marked as a duplicate of this bug. ***
(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.
(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
s/we now exactly/we know exactly/ sorry for my english...
(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... :(
(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
(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.
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
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
(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.
Created attachment 138110 [details, diff] qt4.eclass-enhancements.patch optional flags have to checked with 'use' first... I forgot to test it ;) Cheers, Przemek
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.
(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...
(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
(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
I'm fine with this being committed, Przemyslaw, whenever you're happy with it.
(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|
@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
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
troll's patch was applied to qt4.eclass two months ago... any reasons to keep this bug open?
Don't think so... ;)