Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 139842
Alias:
Product:
Component:
Status: RESOLVED
Resolution: WONTFIX
Assigned To: Gentoo's Team for Core System packages <base-system@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Paul Bredbury <brebs@sent.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
portageq.patch portageq.patch patch Paul Bredbury 2006-07-30 19:12 0000 560 bytes Details | Diff
eutils.eclass.patch eutils.eclass.patch patch Paul Bredbury 2006-07-30 19:13 0000 622 bytes Details | Diff
irc.log irc.log text/plain Paul Bredbury 2006-08-06 12:45 0000 10.29 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 139842 depends on: Show dependency tree
Bug 139842 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-07-09 20:54 0000
Hi, as seen in bug #139693, built_with_use will return 0 (True) if the
package's USE *file* doesn't exist. However, a package can't possibly be built
with any USE *flag* if it's not even installed (i.e. built).

In built_with_use() in eutils.eclass, the function should distinguish between
the package being installed, not installed, package.provided or injected. It's
not obvious how to do that, though.

If has_version were aware of package.provided and injected packages, then
built_with_use() could contain near its start:

        if ! has_version $1 ; then
                # Package is not installed
                return 1
        fi

------- Comment #1 From Paul Bredbury 2006-07-30 19:12:02 0000 -------
Created an attachment (id=93098) [details]
portageq.patch

Fixes has_version to look in package.provided.

------- Comment #2 From Paul Bredbury 2006-07-30 19:13:27 0000 -------
Created an attachment (id=93099) [details]
eutils.eclass.patch

Fixes built_with_use to use the fixed has_version.

------- Comment #3 From SpanKY 2006-08-05 14:01:38 0000 -------
if you're using built_with_use on a package that isnt installed, then your
ebuild logic is flawed in a larger sense

perhaps the correct fix would be to just call 'die'

------- Comment #4 From Paul Bredbury 2006-08-05 14:30:58 0000 -------
(In reply to comment #3)
> if you're using built_with_use on a package that isnt installed, then your
> ebuild logic is flawed in a larger sense

Nope, it is Portage's logic that is flawed (and fixed by these patches). Having
to work around Portage's flaws in ebuilds, rather than fixing Portage's
commands so that they do not produce the *opposite* result of what anyone would
reasonably expect, is no way to program.

There are two bugs which these patches fix:

* has_version ignores package.provided.
* built_with_use is wrong, as mentioned above.

Should I split this into 2 bugs rather than 1?

------- Comment #5 From SpanKY 2006-08-05 15:23:26 0000 -------
two different issues

file a new bug about the has_version as that is a portage issue

as for built_with_use, my previous comment still stands

------- Comment #6 From Paul Bredbury 2006-08-06 12:45:57 0000 -------
Created an attachment (id=93613) [details]
irc.log

Here's the discussion on IRC, for reference. Note that the sentence "i can come
up with a circumstance going the opposite direction where yours breaks but mine
works" on line 94 turns out to be false.

------- Comment #7 From Jakub Moc (RETIRED) 2007-01-23 20:16:59 0000 -------
*** Bug 163435 has been marked as a duplicate of this bug. ***

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug