Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 491764 - euse does not correctly handle package names containing numbers
Summary: euse does not correctly handle package names containing numbers
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Portage Tools Team
Keywords: InVCS
Depends on:
Blocks: 346443
  Show dependency tree
Reported: 2013-11-20 13:06 UTC by Yuri Shatroff
Modified: 2013-11-21 21:26 UTC (History)
2 users (show)

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 Yuri Shatroff 2013-11-20 13:06:09 UTC
When invoking `euse -p` with a package name containing a number, e.g. sys-fs/lvm2, euse fails with an error: Invalid package atom.

# euse -p sys-fs/lvm2 thin
ERROR: Invalid package atom. Did you forget the leading '='?

Other gentoolkit tools e.g. equery, epkginfo do handle such names correctly.
Comment 1 Vikraman (RETIRED) gentoo-dev 2013-11-20 20:19:11 UTC
Looks like an issue with the regex. This fixes it:

diff --git i/bin/euse w/bin/euse
index 7d5c83a..e60cab0 100755
--- i/bin/euse
+++ w/bin/euse
@@ -1070,7 +1070,7 @@ scrub_use_flag() {
 modify_package() {
-       local atom_re="^[<>]?=?([a-z][0-9a-z/-]+[a-z])(-[0-9pr._*-]+)?"
+       local atom_re="^[<>]?=?([a-z][0-9a-z/-]+[0-9a-z])(-[0-9pr._*-]+)?"
        local pkg=$(echo "${PACKAGE}" | sed -re "s/${atom_re}/\1/")
        local V=$(echo "${PACKAGE}" | sed -re "s/${atom_re}/\2/")
        local pkg_re="[<>]?=?${pkg}(-[\dpr._*-]+)?"
Comment 2 Vikraman (RETIRED) gentoo-dev 2013-11-20 20:40:08 UTC
Patch pushed to git.
Comment 3 Brian Dolbec gentoo-dev 2013-11-21 01:53:14 UTC
fixed in commit:;a=commit;h=dc21831a9a058c8f3c110674c5d3dd0de757cb5c

It is available now in gentoolkit-9999.