Gentoo Archives: gentoo-commits

From: "Ulrich Müller" <ulm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/eselect:master commit in: /, man/, doc/, bin/
Date: Sat, 08 Jan 2022 13:21:53
Message-Id: 1641642971.285b2c59ed8234d1480012ca3020cbd4368a9d16.ulm@gentoo
1 commit: 285b2c59ed8234d1480012ca3020cbd4368a9d16
2 Author: Ulrich Müller <ulm <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 8 11:42:39 2022 +0000
4 Commit: Ulrich Müller <ulm <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 8 11:56:11 2022 +0000
6 URL: https://gitweb.gentoo.org/proj/eselect.git/commit/?id=285b2c59
7
8 New global option --root
9
10 * bin/eselect.in: New global option --root.
11 (es_do_help): Document it.
12 * doc/user-guide.txt:
13 * man/eselect.1: Document the --root option.
14
15 Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>
16
17 ChangeLog | 7 +++++++
18 bin/eselect.in | 9 ++++++++-
19 doc/user-guide.txt | 10 +++++++---
20 man/eselect.1 | 12 ++++++++++--
21 4 files changed, 32 insertions(+), 6 deletions(-)
22
23 diff --git a/ChangeLog b/ChangeLog
24 index 2a8be3d..0f0579d 100644
25 --- a/ChangeLog
26 +++ b/ChangeLog
27 @@ -1,3 +1,10 @@
28 +2022-01-08 Ulrich Müller <ulm@g.o>
29 +
30 + * bin/eselect.in: New global option --root.
31 + (es_do_help): Document it.
32 + * doc/user-guide.txt:
33 + * man/eselect.1: Document the --root option.
34 +
35 2022-01-07 Ulrich Müller <ulm@g.o>
36
37 * modules/profile.eselect (set_symlink): Don't call canonicalise
38
39 diff --git a/bin/eselect.in b/bin/eselect.in
40 index 5d3fc9b..3422197 100755
41 --- a/bin/eselect.in
42 +++ b/bin/eselect.in
43 @@ -1,6 +1,6 @@
44 #!@BASH@
45 # -*-eselect-*- vim: ft=eselect
46 -# Copyright (c) 2005-2020 Gentoo Authors
47 +# Copyright (c) 2005-2022 Gentoo Authors
48 #
49 # This file is part of the 'eselect' tools framework.
50 #
51 @@ -88,6 +88,8 @@ es_do_help() {
52 write_kv_list_entry "--brief" "Make output shorter"
53 write_kv_list_entry "--colour=<yes|no|auto>" \
54 "Enable or disable colour output (default 'auto')"
55 + write_kv_list_entry "--root=<path>" \
56 + "The target root path for eselect's operations"
57 echo
58 # display all available eselect modules
59 do_action modules list
60 @@ -147,6 +149,11 @@ while [[ ${1##--} != "$1" ]]; do
61 [[ -z ${action} ]] || die -q "Too many parameters"
62 action=${1##--}
63 ;;
64 + root=*|root)
65 + # set ROOT and recalculate EROOT
66 + ROOT=${1#*=}
67 + EROOT="${ROOT%${EPREFIX:+/}}${EPREFIX}"
68 + ;;
69 "")
70 # -- indicates end of options
71 shift
72
73 diff --git a/doc/user-guide.txt b/doc/user-guide.txt
74 index 8ec35c4..16c2629 100644
75 --- a/doc/user-guide.txt
76 +++ b/doc/user-guide.txt
77 @@ -91,10 +91,14 @@ eselect should be called as shown below: ::
78 eselect [<global-options>] <module> <action> <options>
79
80 eselect features consistently named actions among most of its modules.
81 -There are only two global options as of now; --brief, which makes
82 +There are only three global options as of now; --brief, which makes
83 eselect's output shorter (e.g., to use it as input for other programs);
84 -and --colour, which controls coloured output. The following are standard
85 -action names -- each module may provide a subset of these actions:
86 +--colour, which controls coloured output; and --root, which specifies
87 +the path that eselect should use as the target root filesystem for its
88 +operations.
89 +
90 +The following are standard action names -- each module may provide a
91 +subset of these actions:
92
93 help
94 Print the module's help screen.
95
96 diff --git a/man/eselect.1 b/man/eselect.1
97 index 22a2fcb..fad2aac 100644
98 --- a/man/eselect.1
99 +++ b/man/eselect.1
100 @@ -1,8 +1,8 @@
101 .\" -*- coding: utf-8 -*-
102 -.\" Copyright 2005-2020 Gentoo Authors
103 +.\" Copyright 2005-2022 Gentoo Authors
104 .\" Distributed under the terms of the GNU GPL version 2 or later
105 .\"
106 -.TH ESELECT 1 "October 2011" "Gentoo Linux" eselect
107 +.TH ESELECT 1 "January 2022" "Gentoo Linux" eselect
108 .SH NAME
109 eselect \- Gentoo's multi\-purpose configuration and management tool
110 .SH SYNOPSIS
111 @@ -32,6 +32,14 @@ The default is
112 .BR auto ,
113 for which colour output is enabled only if standard output is
114 connected to a terminal.
115 +.TP
116 +.BI \-\-root= path
117 +The
118 +.I path
119 +that eselect should use as the target root filesystem for its operations.
120 +If not specified, the value of the
121 +.I ROOT
122 +environment variable is used as a default.
123 .SH BUILT-INS
124 .TP
125 .B help