Aug 05 23:40:18 brebs Can a Portage dev please give a second opinion on bug #139842 (and then whack SpanKY over the head with a dictionary opened at the page defining a "bug")... Aug 05 23:41:06 antarus bug 139842 Aug 05 23:41:07 jeeves antarus: http://bugs.gentoo.org/139842 nor, P2, All, brebs@sent.com->base-system@gentoo.org, RESOLVED, WONTFIX, has_version and built_with_use ignore package.provided Aug 05 23:41:16 * antarus giggles Aug 05 23:41:18 * antarus looks Aug 05 23:42:26 nichoj how can you check the use flags of a package that isn't installed...? Aug 05 23:42:32 antarus you can't Aug 05 23:42:37 antarus so I see what his point i there Aug 05 23:42:43 antarus although he made it badly Aug 05 23:42:53 antarus open the second bug about has_version if you haven't alreadyt Aug 05 23:42:55 antarus since that is a bug Aug 05 23:43:11 Caster SpanKY's point is probably "it must be installed because obviously you depend on it" Aug 05 23:43:20 SpanKY cookie for Caster Aug 05 23:43:21 antarus built_with_use will rightly fail if pkg is injected or provided Aug 05 23:43:27 spb "if the package is not installed, the return code is undefined" Aug 05 23:43:32 spb sounds reasonable to me Aug 05 23:43:46 SpanKY antarus: it returns true actually Aug 05 23:43:56 antarus SpanKY: either way :P Aug 05 23:43:57 SpanKY antarus: the point being that the value is meaningless when the package is not installed Aug 05 23:44:11 antarus perhaps fix it to return something specific Aug 05 23:44:18 SpanKY heh Aug 05 23:44:25 SpanKY i want to know what world you live in Aug 05 23:44:27 Caster SpanKY: unless you don't depend on it but if it was installed and had that useflag, it would be bad for you.... but is there such case? :) Aug 05 23:44:30 SpanKY where you have tristate boolean logic Aug 05 23:44:35 SpanKY {true,false,antarus} Aug 05 23:44:46 antarus SpanKY: you don't real dailywtf do you :P Aug 05 23:44:47 brebs built_with_use should return a sensible answer. That's what my patch does. It's crazy to reject it. Aug 05 23:44:48 antarus heh Aug 05 23:44:59 nichoj truth is only as you define it Aug 05 23:45:03 SpanKY brebs: you dont get it, there is no sensible answer Aug 05 23:45:10 antarus SpanKY: the correct tri-state is {true,false,filenotfound} Aug 05 23:45:17 SpanKY {true,false,die} Aug 05 23:45:22 SpanKY i'm not about to add 'die' to the function Aug 05 23:45:24 brebs Yes there is. It's boolean, not tri-state. Aug 05 23:45:27 antarus {true,false,yourmominacan} Aug 05 23:45:33 antarus anyway Aug 05 23:45:53 brebs The logic goes as described in the bug. If the package isn't installed, then it can't possibly be "built_with_use" anything. Aug 05 23:46:23 antarus brebs: see but it could be Aug 05 23:46:23 nichoj well, unless you had way of 'providing' it as being built with some use flags... Aug 05 23:46:25 antarus we jsut can't tell ;) Aug 05 23:46:28 SpanKY read what Caster wrote brebs Aug 05 23:46:44 SpanKY he explained where as i said "youresodumb" Aug 05 23:46:49 antarus nichoj: that would be a good bug :P Aug 05 23:47:31 Caster die would at least put some QA check for missing dep Aug 05 23:48:10 * antarus blinks Aug 05 23:48:14 antarus there is no missing dep? Aug 05 23:48:15 brebs SpanKY: Eh? "it must be installed because obviously you depend on it" - WRONG. Aug 05 23:49:02 Caster it would be best if you provide a real-world example proving that wrong Aug 05 23:49:04 SpanKY great use of capslock tard Aug 05 23:49:22 brebs Caster: I have: games-fps/quake2-data Aug 05 23:49:40 antarus SpanKY: I alwasys wondered why the KY in your name was capitaliz..oh wait that makes perfect sense Aug 05 23:50:04 nichoj gross Aug 05 23:50:11 antarus nichoj: :) Aug 05 23:50:18 Caster brebs: elaborate? :) Aug 05 23:51:32 brebs Caster: In bug 139693 the solution would be to call has_version first, to protect against built_with_use returning a completely wrong answer. Aug 05 23:51:32 jeeves brebs: http://bugs.gentoo.org/139693 nor, P2, All, corsair@gentoo.org->games@gentoo.org, NEW, pending, quake2-data does not merge (dies because of quake2-demodata) Aug 05 23:51:56 SpanKY it's a wrong answer regardless Aug 05 23:52:04 Caster ok I looked in the ebuild and see your point Aug 05 23:52:08 SpanKY true or false, it's wrong Aug 05 23:52:17 SpanKY i'll fix the ebuild to has_version first Aug 05 23:52:35 antarus the bug would be in the provided stuff, that you need to provide with a set of use flags Aug 05 23:52:37 Caster so it really is the "you don't depend on it but if it was installed and had that useflag, it would be bad for you" case Aug 05 23:52:39 antarus and then patch build_with_use Aug 05 23:52:48 antarus s/build/built Aug 05 23:52:55 brebs The point here is simply: built_with_use and has_version ignore package.provided, and I've provided patches to fix the broken commands. Aug 05 23:52:57 antarus Caster: or good, depending on how built_with_use was being used Aug 05 23:52:59 SpanKY if the package is provided, then you have to assume the user didnt fuck it up Aug 05 23:53:09 SpanKY otherwise it'd be impossible for user to install Aug 05 23:53:14 SpanKY they'd have to edit the ebuild Aug 05 23:54:11 brebs SpanKY: You are missing the point that those 2 ebuilds commands are BROKEN. Jeez. Aug 05 23:54:17 * antarus sighs Aug 05 23:54:22 antarus brebs: chill out Aug 05 23:54:49 antarus built_with_use is not broken, as we've stated like a dozen times, because there is no data to know either way Aug 05 23:55:04 antarus and there is nowhere to look up the data Aug 05 23:55:11 brebs There is. That's how my patch fixes it. Aug 05 23:55:20 SpanKY you read the user's mind ? Aug 05 23:55:21 SpanKY awesome Aug 05 23:55:39 brebs In the circumstance described in the bug, I mean. Aug 05 23:55:40 * antarus sighs Aug 05 23:56:01 SpanKY well while you focus on the small picture, we'll fix the bigger picture Aug 05 23:56:19 brebs SpanKY: You're talking about fixing 1 ebuild, I'm talking about fixing portage. Aug 05 23:57:22 * antarus sighs and returns to being pissed at git Aug 05 23:58:38 brebs If the two commands weren't broken, that what's the point in my 2 patches to fix them? They alter portage's behaviour so that the ebuild (which contains correct logic) actually works. Aug 06 00:04:10 SpanKY and we're telling you that your patch doesnt fix anything Aug 06 00:04:27 SpanKY it merely changes the behavior so it works in this one case Aug 06 00:05:06 brebs SpanKY: Yes it does. I tested it. It fixes the broken logic in the circumstance described on the bug. That's a bug, and I submitted patches to fix it. Aug 06 00:05:09 SpanKY the has_version change you posted is correct, the built_with_use is wrong Aug 06 00:05:19 jakub IMO there's no correct logic in pretending that something's been installed with use flags you can't verify, as the whole point of those checks is that something really does need the flags to work Aug 06 00:05:55 SpanKY brebs: you dont get it, it's broken regardless of returning true or false Aug 06 00:05:58 SpanKY it's always going to be wrong Aug 06 00:06:56 brebs SpanKY: Not in the circumstance described on the bug. If a package is not installed, then it cannot be built_with_use *anything*. This is Boolean logic. Portage is wrong, without my patch. Aug 06 00:07:28 SpanKY that's the entire point Aug 06 00:07:34 SpanKY "not in the circumstance described" Aug 06 00:07:53 SpanKY i can come up with a circumstance going the opposite direction where yours breaks but mine works Aug 06 00:08:04 brebs Do tell. Aug 06 00:09:56 SpanKY your example works just as well Aug 06 00:10:15 SpanKY if you package.provide the demo ebuild, the symlink check will return true Aug 06 00:10:42 brebs Correct. So it *should*. Aug 06 00:10:58 SpanKY and so it does Aug 06 00:11:19 brebs So where is my patch broken? Aug 06 00:12:11 SpanKY i'm saying it's flawed fundamentally, no amount of changing the code will fix that Aug 06 00:13:06 brebs Not true. It's a boolean result, so it should return the correct answer where it can. And it can in the situation described on the bug, which the patches fix. Aug 06 00:15:00 SpanKY exactly, you're asking about the state of the system in a corner case that has more than boolean logic ... you're truncating it down to two values Aug 06 00:16:56 brebs When a package isn't installed, it cannot be built_with_use anything. Because it's not installed. So the answer is quite clearly False. It's not unknown, or maybe, or Schroedinger's cat. It's False. Aug 06 00:19:09 Caster I'm getting lost, what it does now? if it's not installed/provide/injected it returns false? if it is provided it returns true? Aug 06 00:19:23 antarus Caster: I believe it returns true Aug 06 00:19:41 Caster hm Aug 06 00:19:45 antarus which IMHO is correct behavior, otherwise building a system with provided packages would be impossible Aug 06 00:20:02 antarus as SpanKY noted, you need to assume the user providing the package knows what they are doing Aug 06 00:20:13 Caster well brebs you should instead fill enhancement bug about specifying USE in package.provided Aug 06 00:20:20 antarus and in most of the corner cases the package fails to build properly if the build_with_use is wrong Aug 06 00:20:27 antarus so they will find out anyway Aug 06 00:20:39 nichoj so is ${FEATURES} considered internal state, and shouldn't be poked from eclasses / ebuilds? Aug 06 00:21:13 antarus nichoj: you can't do any kind of DEPEND stuff based on features Aug 06 00:21:46 nichoj antarus: not what I was getting at Aug 06 00:21:56 nichoj ie, for checking for FEATURES=strict Aug 06 00:22:30 antarus generally no Aug 06 00:22:41 antarus what kind of use case are you shooting for Aug 06 00:23:03 nichoj antarus: mm, well I'm already doing it in java-utils-2.eclass... :) Aug 06 00:23:20 nichoj antarus: like is-java-strict() Aug 06 00:23:25 nichoj to do qa type stuffs Aug 06 00:23:44 * antarus shivers Aug 06 00:23:50 nichoj what? Aug 06 00:23:52 antarus I shall stab you now :P Aug 06 00:24:00 brebs Caster: I provided 2 patches, to fix both has_version and built_with_use so that they don't blindly ignore package.provided. They shouldn't have undesirable side-effects. Aug 06 00:24:04 * nichoj gets his knife proof vest Aug 06 00:24:43 antarus brebs: I suggest you make your case on gentoo-portage-dev and not here Aug 06 00:25:36 brebs Oh, wrong channel? OK. Aug 06 00:25:39 antarus wtf is java-strict Aug 06 00:25:43 antarus brebs: no, the mailing list.. Aug 06 00:25:52 * antarus stabs nichoj Aug 06 00:25:56 brebs Ah.