Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 762331 - app-portage/gentoolkit: ekeyword has no way to distinguish ebuild arguments aside from the .ebuild file suffix
Summary: app-portage/gentoolkit: ekeyword has no way to distinguish ebuild arguments a...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Normal enhancement (vote)
Assignee: Portage Tools Team
Keywords: PATCH
Depends on:
Reported: 2020-12-29 01:51 UTC by Zac Medico
Modified: 2020-12-31 07:26 UTC (History)
0 users

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


Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2020-12-29 01:51:02 UTC
We'd like to use ekeyword in a git merge driver implementation (see, but the files that the driver will pass to ekeyword do not necessarily have a .ebuild suffix. Therefore, it would be handy to be able to distinguish ebuild arguments some other way. Perhaps os.path.isfile(arg) would be sufficient.
Comment 2 Brian Dolbec gentoo-dev 2020-12-31 05:45:59 UTC
Looks good to me.  Go ahead from me.
Comment 3 Zac Medico gentoo-dev 2020-12-31 07:26:03 UTC
FWIW, our git merge driver could potentially bypass the argument parsing logic like this:

   ekeyword.process_ebuild(pathname, list(map(ekeyword.arg_to_op, args))
except Exception:
   result = 1
   result = 0