To steer people away from deprecated profiles and to allow maintainers to spot deprecated/non-deprecated profiles easier I suggest tweaking output of 'eselect profile list' to mention the status. Hypothetical change in output would look like: $ eselect profile list -[1] default/linux/amd64/13.0 (stable) ... -[12] default/linux/amd64/17.0 (stable) * +[1] default/linux/amd64/13.0 (stable, deprecated) ... +[12] default/linux/amd64/17.0 (stable) * Deprecation bit can be detected by presence of 'deprecated' file in profile directory: $ cat default/linux/amd64/13.0/deprecated default/linux/amd64/17.0 https://dev.gentoo.org/~ulm/pms/head/pms.html#x1-460005.2.3 Thanks!
I'd rather do this in the "set" action, i.e. in function set_symlink(), because all sanity checks are currently done there. find_targets() currently doesn't even check if the profile directory exists, so testing for deprecated there would imply quite some restructuring of the code (which I'd rather avoid). That is, I am thinking of something like this: # eselect profile list Available profile symlink targets: [1] default/linux/amd64/13.0 (stable) ... # eselect profile set 1 !!! Error: Profile default/linux/amd64/13.0 is deprecated !!! Error: Upgrade to default/linux/amd64/17.0 or use the --force option exiting
'eselect profile set' should work as well. I'll request something from portage to make profile introspection simpler.
Created attachment 558352 [details, diff] Patch for profile.eselect Please try attached patch. It would be easy to require --force for selecting a deprecated profile, but maybe that would be too radical?
The patch seems to work. It's a bit confusing though that only red text is printed and yet switch operation succeeded.
In git: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=bbfcc313401c27755a2832c100ad20772bad586c Sorry for the delay. I'll see if I can make a new release in the next days.
This is in the eselect-1.4.14 release. (In reply to Sergei Trofimovich from comment #4) > It's a bit confusing though that only red text is printed and yet switch > operation succeeded. I've addressed this too, warnings are now displayed in yellow.