Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 418271 - app-admin/eselect: the 'editor' lib should handle no available implementations gracefully
Summary: app-admin/eselect: the 'editor' lib should handle no available implementation...
Status: RESOLVED CANTFIX
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-30 17:04 UTC by Michał Górny
Modified: 2012-05-30 20:22 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2012-05-30 17:04:05 UTC
AFAICS, the do_update() code states:

        [[ ${#targets[@]} -gt 0 ]] \
                || die -q "No valid target for ${EDITOR_VAR} found"

Sadly, this means that after removing the last provider the system is left with a broken selection and there's no help fixing it.

First of all, I think 'eselect ... update' should just remove the envfile (or unset it) in that case, so that broken variable is not spread onto the system, breaking such tools as git (eselect pager).

Secondly, I think it would be useful to have 'eselect ... unset' or some other way to disable a particular variable even though there are working implementations installed.
Comment 1 Ulrich Müller gentoo-dev 2012-05-30 20:22:00 UTC
It's the user's responsibility to set these variables correctly. If he shoots himself in the foot by removing all editors (or pagers, or package managers) from his system, there's not much the eselect module can do about it.