Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 36887 - Repoman doesnt catch 'missing operator' and dies
Summary: Repoman doesnt catch 'missing operator' and dies
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2003-12-31 06:35 UTC by Sven Blumenstein (RETIRED)
Modified: 2004-02-08 17:55 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Blumenstein (RETIRED) gentoo-dev 2003-12-31 06:35:41 UTC
I use app-emulation/win4lin as example here as I found the bug in this ebuild.

All 5.x ebuilds had an error in RDEPEND:

win4lin-5.0.1.ebuild:RDEPEND="!<=app/emulation/win4lin-4.0.22"
win4lin-5.0.4.ebuild:RDEPEND="!<=app/emulation/win4lin-4.0.22"
win4lin-5.0.8.ebuild:RDEPEND="!<=app/emulation/win4lin-4.0.22"

Repoman didnt like it much:

checking package app-emulation/win4lin
Traceback (most recent call last):
  File "/usr/bin/repoman", line 720, in ?
    mydep=portage.dep_check(myvalue,portage.db["/"]["porttree"].dbapi,repoman_settings,use="all",mode=matchmode)
  File "/usr/lib/portage/pym/portage.py", line 3015, in dep_check
    mysplit2=dep_wordreduce(mysplit2,mydbapi,mode)
  File "/usr/lib/portage/pym/portage.py", line 3041, in dep_wordreduce
    mydep=mydbapi.xmatch(mode,deplist[mypos])
  File "/usr/lib/portage/pym/portage.py", line 4502, in xmatch
    myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep,mykey))
  File "/usr/lib/portage/pym/portage.py", line 3180, in match_from_list
    raise KeyError, "Specific key requires an operator (%s)" % (mydep)
KeyError: Specific key requires an operator (app-emulation/win4lin-4.0.22)

Further testing showed that it handles the "foo/bar/baz" typo (instead of foo-bar/baz) wrong:

     20 DEPEND="app/arch/rpm2targz
     21         virtual/winkernel"
     22 RDEPEND="!<=app-emulation/win4lin-4.0.22"

checking package app-emulation/win4lin

  DEPEND.bad           1
   app-emulation/win4lin/win4lin-5.0.8.ebuild: ~x86 ['app/arch/rpm2targz']

Removing the operators from the RDEPEND line gives some the same traceback as above even if the 'foo/bar/baz' error is not made:

     20 DEPEND="app-arch/rpm2targz
     21         virtual/winkernel"
     22 RDEPEND="app-emulation/win4lin-4.0.22"

checking package app-emulation/win4lin
Traceback (most recent call last):
  File "/usr/bin/repoman", line 720, in ?
    mydep=portage.dep_check(myvalue,portage.db["/"]["porttree"].dbapi,repoman_settings,use="all",mode=matchmode)
  File "/usr/lib/portage/pym/portage.py", line 3015, in dep_check
    mysplit2=dep_wordreduce(mysplit2,mydbapi,mode)
  File "/usr/lib/portage/pym/portage.py", line 3041, in dep_wordreduce
    mydep=mydbapi.xmatch(mode,deplist[mypos])
  File "/usr/lib/portage/pym/portage.py", line 4502, in xmatch
    myval=match_from_list(mydep,self.xmatch("list-visible",None,mydep,mykey))
  File "/usr/lib/portage/pym/portage.py", line 3180, in match_from_list
    raise KeyError, "Specific key requires an operator (%s)" % (mydep)
KeyError: Specific key requires an operator (app-emulation/win4lin-4.0.22)

More fun:

If the RDEPEND is not the package itself, repoman doesnt detect the 'foo/bar/baz' error IF there are operators. It does but reports the wrong error if you remove the operators:

     21 RDEPEND="!<=app/emulation/wine"

checking package app-emulation/win4lin


RepoMan sez: "If everyone were like you, I'd be out of business!"

     21 RDEPEND="app/emulation/wine"

checking package app-emulation/win4lin

  RDEPEND.bad          1
   app-emulation/win4lin/win4lin-5.0.8.ebuild: ~x86 ['app/emulation/wine']


Thats about it, happy new year! ;)
Comment 1 Masatomo Nakano (RETIRED) gentoo-dev 2004-01-04 02:41:32 UTC
Fixed in CVS
Comment 2 Sven Blumenstein (RETIRED) gentoo-dev 2004-01-09 15:36:02 UTC
Tried Portage .50pre12.

If there is an Operator like  '!<=' in front of the DEPEND/RDEPEND, repoman still doesnt catch the foo/bar/baz instead of foo-bar/baz error.
Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-02-08 17:55:28 UTC
supposed to be fixed in 2.0.50 which is stable now. If this bug is not fixed please reopen.