Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 673568 - =app-admin/eselect-1.4.13: mention deprecated profiles in 'eselect profile list'
Summary: =app-admin/eselect-1.4.13: mention deprecated profiles in 'eselect profile list'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2018-12-22 10:14 UTC by Sergei Trofimovich (RETIRED)
Modified: 2019-02-17 08:11 UTC (History)
0 users

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


Attachments
Patch for profile.eselect (profile.eselect.diff,750 bytes, patch)
2018-12-22 15:29 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sergei Trofimovich (RETIRED) gentoo-dev 2018-12-22 10:14:52 UTC
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!
Comment 1 Ulrich Müller gentoo-dev 2018-12-22 12:48:20 UTC
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
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2018-12-22 13:31:48 UTC
'eselect profile set' should work as well.

I'll request something from portage to make profile introspection simpler.
Comment 3 Ulrich Müller gentoo-dev 2018-12-22 15:29:22 UTC
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?
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2018-12-22 18:19:49 UTC
The patch seems to work.

It's a bit confusing though that only red text is printed and yet switch operation succeeded.
Comment 5 Ulrich Müller gentoo-dev 2019-02-13 20:55:00 UTC
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.
Comment 6 Ulrich Müller gentoo-dev 2019-02-17 08:11:59 UTC
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.