Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59574 - portage-2.0.51_pre17 repoman doesn't handle dep operators correctly
Summary: portage-2.0.51_pre17 repoman doesn't handle dep operators correctly
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Dependencies (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Brian Harring (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-08-05 17:25 UTC by Anders Rune Jensen (RETIRED)
Modified: 2004-08-16 11:09 UTC (History)
2 users (show)

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


Attachments
repoman-arch-checks-fix.patch (repoman-arch-fix.patch,669 bytes, patch)
2004-08-05 18:00 UTC, Brian Harring (RETIRED)
Details | Diff
repoman-dep_check-fixes.patch (repoman-arch-fix.patch,903 bytes, patch)
2004-08-05 18:12 UTC, Brian Harring (RETIRED)
Details | Diff
repoman-use_reduce-fixes.patch (repoman-use_reduce-related-fixes.patch,912 bytes, patch)
2004-08-05 19:09 UTC, Brian Harring (RETIRED)
Details | Diff
the-I-hate-dep_check-and-use_reduce.patch (repoman-arch-fix.patch,3.69 KB, patch)
2004-08-05 19:47 UTC, Brian Harring (RETIRED)
Details | Diff
the-I-conquered-dep_check-and-use_reduce.patch (use_reduce.patch,7.17 KB, patch)
2004-08-07 18:41 UTC, Jason Stubbs (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Rune Jensen (RETIRED) gentoo-dev 2004-08-05 17:25:35 UTC
running repoman scan doesn't work correctly if DEPEND looks something like this:

!ppc? ( !sparc? ( !alpha? ( !ia64? ( !amd64? ( firebird? ( dev-db/firebird ) ) ) ) ) )

Several !<something>? following each other.

Worked fine in portage-2.0.51_pre13

Reproducible: Always
Steps to Reproduce:
1. Try running repoman scan in gnome-extra/libgda
2.
3.

Actual Results:  
repoman b0rks

Expected Results:  
repoman worked
Comment 1 Brian Harring (RETIRED) gentoo-dev 2004-08-05 18:00:41 UTC
Created attachment 36850 [details, diff]
repoman-arch-checks-fix.patch

Fixes the masklist generation code in dep_check.
InCVS also.
Comment 2 Brian Harring (RETIRED) gentoo-dev 2004-08-05 18:01:44 UTC
This corrects repoman's arch checks, I would bet there is a lingering issues with use flags though.
Comment 3 Brian Harring (RETIRED) gentoo-dev 2004-08-05 18:12:08 UTC
Created attachment 36851 [details, diff]
repoman-dep_check-fixes.patch

Round 2, bit more conclusive (should be back to repoman's old behaviour now).
Comment 4 Brian Harring (RETIRED) gentoo-dev 2004-08-05 19:09:35 UTC
Created attachment 36852 [details, diff]
repoman-use_reduce-fixes.patch

Round 3.
This sucker better be dead.

If you're commiting, better be using this.
Comment 5 Brian Harring (RETIRED) gentoo-dev 2004-08-05 19:47:05 UTC
Created attachment 36856 [details, diff]
the-I-hate-dep_check-and-use_reduce.patch

sucker just won't die :)

I'm splitting at this point, if this doesn't fix it, feel free to keep at it- I
won't be able to work on this for the next 18 hours or so, so g'luck :)
Comment 6 Anders Rune Jensen (RETIRED) gentoo-dev 2004-08-05 20:29:36 UTC
The last one fixes it for me. Many thanx for the patch.
Comment 7 Brian Harring (RETIRED) gentoo-dev 2004-08-06 13:18:42 UTC
A better example is the current gnome-extra/libgda DEPENDS;
x86? ( firebird? ( dev-db/firebird ) )
This is valid, but repoman pre17 seems to disagree.

RDEPEND.bad
ia64 ['>=dev-db/firebird-1.0']

Err... but I just used 'x86?'... :)

The conversion to using use_reduce for nuking operators ('x86?' would be an op) in dep_check was missing a few things, specifically appropriate arch masks, and appropriate use masks.  Either way, this is all InCVS, and would warrant a release when carpaski is no longer in transit (and has a system setup, etc).
Comment 8 Jason Stubbs (RETIRED) gentoo-dev 2004-08-07 18:41:58 UTC
Created attachment 36990 [details, diff]
the-I-conquered-dep_check-and-use_reduce.patch

Just a friendly jest ;)

The use_reduce function was actually incapable of doing things properly. For
repoman, where matchall=1, use_reduce needs to operate under the following
conditions:
* For useflag?, assume as True unless useflag is profile masked or is an
architecture not of the profile
* For !useflag?, assume as True unless useflag is an architecture not of the
profile

useflag? was handleable by adding all architectures not equal to the current
profile to the mask list. However, there was no way to specify the architecture
of the profile for processing !useflag?.

This patch adds a parameter to support this, simplifies use_reduce logic for
easier reading and splits out the dep_opconvert hack.
Comment 9 Brian Harring (RETIRED) gentoo-dev 2004-08-16 11:09:35 UTC
Pre18 is out w/ 'The-I-conquered-dep_check-and-use_reduce' patch :-)