From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: man/, bin/
Date: Sun, 11 Mar 2012 02:44:43 +0000 (UTC) [thread overview]
Message-ID: <1331433862.188aedeb2822f5c86a0586fd3350800565da5c6c.vapier@gentoo> (raw)
commit: 188aedeb2822f5c86a0586fd3350800565da5c6c
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 11 02:43:30 2012 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Mar 11 02:44:22 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=188aedeb
etc-update: support scan paths on the command line
URL: http://bugs.gentoo.org/59235
Reported-by: Cory Visi <merlin <AT> gentoo.org>
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
---
bin/etc-update | 12 ++++++++----
man/etc-update.1 | 5 +++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/bin/etc-update b/bin/etc-update
index 989d367..c49c4b8 100755
--- a/bin/etc-update
+++ b/bin/etc-update
@@ -52,7 +52,7 @@ scan() {
local find_opts
local path
- for path in ${CONFIG_PROTECT} ; do
+ for path in ${SCAN_PATHS} ; do
path="${EROOT%/}${path}"
[[ -w ${path} ]] || die "Need write access to ${path}"
@@ -544,7 +544,9 @@ usage() {
cat <<-EOF
etc-update: Handle configuration file updates
- Usage: etc-update [options]
+ Usage: etc-update [options] [paths to scan]
+
+ If no paths are specified, then \${CONFIG_PROTECT} will be used.
Options:
-d, --debug Enable shell debugging
@@ -581,7 +583,8 @@ while [[ -n $1 ]] ; do
-v|--verbose) VERBOSE=true;;
-V|--version) emerge --version; exit 0;;
--automode) parse_automode_flag $2 && shift || usage 1 "Invalid mode '$2'";;
- *) usage 1 "Invalid option '$1'";;
+ -*) usage 1 "Invalid option '$1'";;
+ *) break;;
esac
shift
done
@@ -599,6 +602,7 @@ portage_vars=(
)
eval $(portageq envvar -v ${portage_vars[@]})
export PORTAGE_TMPDIR
+SCAN_PATHS=${*:-${CONFIG_PROTECT}}
TMP="${PORTAGE_TMPDIR}/etc-update-$$"
trap "die terminated" SIGTERM
@@ -663,7 +667,7 @@ else
fi
if ${VERBOSE} ; then
- for v in ${portage_vars[@]} ${cfg_vars[@]} TMP ; do
+ for v in ${portage_vars[@]} ${cfg_vars[@]} TMP SCAN_PATHS ; do
echo "${v}=${!v}"
done
fi
diff --git a/man/etc-update.1 b/man/etc-update.1
index bebef5b..85d102d 100644
--- a/man/etc-update.1
+++ b/man/etc-update.1
@@ -3,7 +3,7 @@
etc-update \- handle configuration file updates
.SH SYNOPSIS
.BR etc-update
-[\fIoptions\fR] [\fI--automode <mode>\fR]
+[\fIoptions\fR] [\fI--automode <mode>\fR] [\fIpaths to scan\fR]
.SH DESCRIPTION
.I etc-update
is supposed to be run after merging a new package to see if
@@ -13,7 +13,8 @@ configuration file will override an old one,
will prompt the user for a decision.
.PP
.I etc-update
-will check all directories in the \fICONFIG_PROTECT\fR variable. All
+will check all directories specified on the command line. If no paths
+are given, then the \fICONFIG_PROTECT\fR variable will be used. All
config files found in \fICONFIG_PROTECT_MASK\fR will automatically be
updated for you by \fIetc-update\fR. See \fBmake.conf\fR(5) for more
information.
next reply other threads:[~2012-03-11 2:44 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-11 2:44 Mike Frysinger [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-08-30 17:05 [gentoo-commits] proj/portage:master commit in: man/, bin/ Zac Medico
2013-08-22 4:06 Zac Medico
2013-08-22 2:01 Zac Medico
2013-08-04 20:51 Zac Medico
2013-07-23 20:42 Arfrever Frehtes Taifersar Arahesis
2013-07-13 9:35 Arfrever Frehtes Taifersar Arahesis
2013-05-18 18:47 Zac Medico
2013-04-28 22:06 Zac Medico
2012-10-31 21:32 Zac Medico
2012-10-11 3:10 Zac Medico
2012-09-24 20:26 Zac Medico
2012-09-24 3:47 Mike Frysinger
2012-06-17 15:46 Zac Medico
2012-03-17 21:33 Zac Medico
2012-03-11 2:56 Mike Frysinger
2012-01-02 7:48 Zac Medico
2011-12-22 23:43 Zac Medico
2011-12-21 20:08 Zac Medico
2011-12-21 20:04 Zac Medico
2011-10-17 4:22 Zac Medico
2011-10-14 18:06 Zac Medico
2011-08-31 3:05 Zac Medico
2011-08-13 13:52 Zac Medico
2011-08-11 3:00 Zac Medico
2011-06-24 10:23 Zac Medico
2011-05-01 15:58 Zac Medico
2011-05-01 14:52 Arfrever Frehtes Taifersar Arahesis
2011-05-01 1:23 Arfrever Frehtes Taifersar Arahesis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1331433862.188aedeb2822f5c86a0586fd3350800565da5c6c.vapier@gentoo \
--to=vapier@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox