Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 213629

Summary: repoman should complain about eapi when trying to use slot deps in eapi=0
Product: Portage Development Reporter: Bo Ørsted Andresen (RETIRED) <zlin>
Component: RepomanAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: High    
Version: 2.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 216231    
Attachments: a small patch to throw a fatal repoman error if EAPI mismatches are found in *RDEPEND
Same thing with correct spelling ;P

Description Bo Ørsted Andresen (RETIRED) gentoo-dev 2008-03-16 22:26:55 UTC
Got this message in an EAPI=0 ebuild. Took me quite a while to realise it was because I had forgotten to declare EAPI=1. repoman should be able to state that.

  DEPEND.syntax                 1
   x11-libs/qt-4.4.0_beta1.ebuild DEPEND: '!<x11-libs/qt-4.4.0_alpha:4' not a valid atom
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2008-03-17 04:06:31 UTC
We should be able to call portage.dep.dep_getslot and if it is not None require eapi 1 (or greater).

I am unsure how to do this inside of the actual dep parser though; we'd have to validate each atom in DEPEND.

Looking through repoman I see:

          if not portage.isvalidatom(token, allow_blockers=True) or \
            ":" in token and myaux["EAPI"] == "0":

So it looks like we already detect this but don't print anything.

So maybe we should just add a second major error (EAPI1 features in EAPI0 detected)?
Comment 2 Alec Warner (RETIRED) archtester gentoo-dev Security 2008-03-17 04:30:38 UTC
Created attachment 146370 [details, diff]
a small patch to throw a fatal repoman error if EAPI mismatches are found in *RDEPEND

Can you test this?
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2008-03-17 04:31:39 UTC
Created attachment 146372 [details, diff]
Same thing with correct spelling ;P
Comment 4 Bo Ørsted Andresen (RETIRED) gentoo-dev 2008-03-17 07:09:16 UTC
(In reply to comment #2)
> Can you test this?

Given how I only run portage-2.1.4.4 applying the latest patch just results in a traceback. ;)

AttributeError: 'module' object has no attribute 'dep'
Comment 5 Zac Medico gentoo-dev 2008-04-04 22:23:57 UTC
This is fixed in 2.1.5_rc1.