summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/gentoolkit/ChangeLog12
-rw-r--r--app-admin/gentoolkit/files/digest-gentoolkit-0.1.12 (renamed from app-admin/gentoolkit/files/digest-gentoolkit-0.1.11-r1)0
-rw-r--r--app-admin/gentoolkit/files/lintool/lintool11
-rw-r--r--app-admin/gentoolkit/files/scripts/useflag582
-rw-r--r--app-admin/gentoolkit/files/scripts/useflag.169
-rw-r--r--app-admin/gentoolkit/gentoolkit-0.1.12.ebuild (renamed from app-admin/gentoolkit/gentoolkit-0.1.11-r1.ebuild)4
6 files changed, 674 insertions, 4 deletions
diff --git a/app-admin/gentoolkit/ChangeLog b/app-admin/gentoolkit/ChangeLog
index a3fe6fe0ddc1..4e738d4f8318 100644
--- a/app-admin/gentoolkit/ChangeLog
+++ b/app-admin/gentoolkit/ChangeLog
@@ -1,6 +1,16 @@
# ChangeLog for app-admin/gentoolkit
# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL
-# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/ChangeLog,v 1.22 2002/06/08 13:38:45 lostlogic Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/ChangeLog,v 1.23 2002/06/24 23:02:32 karltk Exp $
+
+*gentoolkit-0.1.12 (25 Jun 2002)
+
+ 25 Jun 2002; Karl Trygve Kalleberg <karltk@gentoo.org> gentoolkit-0.1.12.ebuild files/digest-gentoolkit-0.1.12:
+
+ Added gentoo-bump-version.
+ Added useflag.
+ Fixed bugs in emerge-webrsync.
+
+ Removed gentoolkit-0.1.11-r1.ebuild files/digest-gentoolkit-0.1.11-r1
*gentoolkit-0.1.11-r1 (08 Jun 2002)
diff --git a/app-admin/gentoolkit/files/digest-gentoolkit-0.1.11-r1 b/app-admin/gentoolkit/files/digest-gentoolkit-0.1.12
index e69de29bb2d1..e69de29bb2d1 100644
--- a/app-admin/gentoolkit/files/digest-gentoolkit-0.1.11-r1
+++ b/app-admin/gentoolkit/files/digest-gentoolkit-0.1.12
diff --git a/app-admin/gentoolkit/files/lintool/lintool b/app-admin/gentoolkit/files/lintool/lintool
index b1d251d2a7ab..247760be8280 100644
--- a/app-admin/gentoolkit/files/lintool/lintool
+++ b/app-admin/gentoolkit/files/lintool/lintool
@@ -433,7 +433,7 @@ def parse_opts(argv):
options['showSeparate'] = 1
elif option in [ '--no-summary']:
options['showTotal'] = 0
- elif option in [ '--ebuilds' ]:
+ elif option in [ '--from-file' ]:
lines = open(value, 'r').readlines()
lines = [o.strip() for o in lines]
args = lines + args
@@ -441,6 +441,10 @@ def parse_opts(argv):
options['desiredTests'] = value.split(",")
elif option in [ '--list-tests' ]:
options['listTests'] = 1
+ elif option in [ '--ebuild' ]:
+ options['testmode'] = 'ebuild'
+ elif option in [ '--changelog' ]:
+ options['testmode'] = 'changelog'
elif option in [ '-h', '-?', '--help' ]:
usage(opts)
sys.exit(0)
@@ -523,7 +527,10 @@ def main():
" (" + str(totalErrors*100/numFiles) + "%)"
print "Total number of ebuilds with warnings : " + str(totalWarnings) + \
" (" + str(totalWarnings*100/numFiles) + "%)"
-
+
+ if totalErrors:
+ sys.exit(1)
+
if __name__ == "__main__":
main()
diff --git a/app-admin/gentoolkit/files/scripts/useflag b/app-admin/gentoolkit/files/scripts/useflag
new file mode 100644
index 000000000000..e63c553b26fd
--- /dev/null
+++ b/app-admin/gentoolkit/files/scripts/useflag
@@ -0,0 +1,582 @@
+#!/bin/bash
+# useflag v0.3.0
+# Script to help users manage USE flags in Gentoo Linux
+#
+# Distributed under the terms of the GNU General Public License, v2 or later
+# Author: Michael Thompson <psionix@grandecom.net>, (c) 2002
+
+run_name=`basename $0`
+use_desc="/usr/portage/profiles/use.desc"
+make_conf_dir="/etc"
+make_conf="${make_conf_dir}/make.conf"
+# Home directory was chosen as the use of /tmp allows for symlink attacks
+make_temp="${HOME}/use.make.conf.tmp"
+use_cache_parent="/var/cache"
+use_cache_dir="${use_cache_parent}/use_desc"
+use_cache="${use_cache_dir}/use.cache"
+lock_cache="${use_cache_dir}/lock.cache"
+changes="0"
+
+
+# Get flag description
+# parm1 = Use flag to get description of
+do_get_desc() {
+ local parm1=$1
+ # Strip the comments and find the flag.
+ local out_get_desc=`grep -v "#" ${use_desc} | grep -w -e "${parm1} -"`
+ if [ "${out_get_desc}" = "" ]; then
+ local lcl_avail=`grep -v "#" ${use_desc} | cut -d ' ' -f1 | \
+ grep -w -e "${parm1}"`
+ if [ "${lcl_avail}" != "" ]; then
+ echo "${parm1} - No description available."
+ else
+ echo "!!! ${parm1} does not exist."
+ fi
+ else
+ echo "${out_get_desc}"
+ fi
+}
+
+# Get the contents of the USE variable
+# parm1 controls whether or not to include the '-' with each flag
+do_get_make() {
+ local parm1=$1
+ # Get the USE flags from make.conf
+ local get_make_out=`grep "USE=\"" ${make_conf} | grep -v "#" | \
+ cut -d "\"" -f2 -s`
+ # If called with "nodashes", then strip the leading dashes
+ if [ "${parm1}" = "nodashes" ]; then
+ for tr_sucks in ${get_make_out}; do
+ if [ "${tr_sucks:0:1}" = "-" ]; then
+ local tr_out="${tr_out} ${tr_sucks:1}"
+ else
+ local tr_out="${tr_out} ${tr_sucks}"
+ fi
+ done
+ get_make_out="${tr_out}"
+ fi
+ echo "${get_make_out}"
+}
+
+# Yes, it's pointless. But it could be used more than once in the future
+# so it's a function.
+# Gets the master list of available USE flags from use.desc
+do_get_avail() {
+ grep -v "#" ${use_desc} | cut -d " " -f1 | tr '\n' ' '
+}
+
+# Get depreciated flags.
+# parm1 = flag to check for depreciation
+# parm2 = list of available flags
+do_get_depr() {
+ local parm1=$1
+ local parm2=${@:2}
+ # This next var can't be local
+ get_depr_tmp=`echo "${parm2}" | tr ' ' '\n' | grep -x -e "${parm1}"`
+ local ret_code=$?
+ if [ "${ret_code}" != "0" ]; then
+ echo "${parm1}" | tr '\n' ' '
+ fi
+}
+
+# Removes a USE flag from make.conf
+# parm1 = flag to remove
+# use_rm_out = list of available flags
+do_use_rm() {
+ local parm1=$1
+ local use_rm_out=${@:2}
+ # Strip matching USE flags. Yes, this is ugly, I know.
+ use_rm_out=`echo "${use_rm_out}" | tr ' ' '\n' | \
+ grep -x -v -e "${parm1}" | tr '\n' ' '`
+ # Also strip the inverse. Even uglier...
+ if [ "${parm1:0:1}" = "-" ]; then
+ use_rm_out=`echo "${use_rm_out}" | tr ' ' '\n' | \
+ grep -x -v -e "${parm1:1}" | tr '\n' ' '`
+ else
+ use_rm_out=`echo "${use_rm_out}" | tr ' ' '\n' | \
+ grep -x -v -e "-${parm1}" | tr '\n' ' '`
+ fi
+ echo "${use_rm_out}"
+}
+
+# Adds a USE flag to make.conf
+# parm1 = flag to add
+# use_add_out = list of available flags
+do_use_add() {
+ local parm1=$1
+ local use_add_out=${@:2}
+ # First strip existing flags (matching or inverse), then add.
+ # This is not the best way to do this. Better would be to replace a
+ # flag if it already exists. That turned out to be a real PITA.
+ # Maybe in a later version...
+ use_add_out=`do_use_rm ${parm1} ${use_add_out}`
+ use_add_out="${use_add_out} ${parm1}"
+ echo "${use_add_out}"
+}
+
+# Adds a flag to the locked flag cache
+# Pass list of flags to lock as parameter.
+do_lock_flags() {
+ local flag_list=$@
+ # Merge the new list of flags flags that are already locked.
+ if [ -r ${lock_cache} ]; then
+ local lock_old=`cat ${lock_cache}`
+ fi
+ flag_list="${lock_old} ${flag_list}"
+ # Remove duplicates.
+ echo "${flag_list}" | tr ' ' '\n' | sort | uniq | tr '\n' ' '
+}
+
+# Writes the list of locked flags to the cache file
+# Pass list of flags to write as parameter.
+do_write_lock() {
+ local write_flags=$@
+ if [ -r ${make_conf} ]; then
+ local make_prune=`do_get_make nodashes`
+ else
+ do_report_err ${make_conf} read
+ fi
+ # Be sure and remove any locked flags that no longer exist in USE.
+ for prune in ${write_flags}; do
+ local prune_test=`do_get_depr ${prune} ${make_prune}`
+ if [ "$prune_test" = "" ]; then
+ local new_cache="${prune} ${new_cache}"
+ fi
+ done
+ if [ -w ${use_cache_parent} ]; then
+ mkdir -p ${use_cache_dir}
+ chmod 700 ${use_cache_dir}
+ echo "${new_cache}" > ${lock_cache}
+ chmod 600 ${lock_cache}
+ else
+ do_report_err ${lock_cache} write
+ fi
+}
+
+# Writes new USE variable to make.conf
+# Pass new list of USE flags as parameter.
+do_write_make() {
+ local use_write="USE=\"$@\""
+ local old_use="USE=\"`do_get_make dashes`\""
+ if [ -w ${make_conf} ] && [ -w ${make_conf_dir} ]; then
+ cat ${make_conf} | \
+ sed -e "s/${old_use}/${use_write}/" > ${make_temp}
+ cp ${make_temp} ${make_conf}
+ rm ${make_temp}
+ else
+ do_report_err ${make_conf} write
+ fi
+}
+
+# Reports a read/write error and exits
+# parm1 = File to report on
+# parm2 = read, write, etc
+do_report_err() {
+ local parm1=$1
+ local parm2=$2
+ if [ "${parm2}" = "read" ]; then
+ echo "!!! Could not read ${parm1}"
+ echo -n "!!! Verify that file exists and that you have "
+ echo "appropriate permissions."
+ elif [ "${parm2}" = "write" ]; then
+ echo "!!! Could not write ${parm1}"
+ echo "!!! Got root?"
+ elif [ "${parm2}" = "nolock" ]; then
+ echo "!!! Could not read ${parm1}"
+ echo -n "!!! You have no locked flags or you have "
+ echo "insufficient permissions."
+ fi
+ exit 1
+}
+
+
+# The main section of the script
+# desc:
+# This is the feature for getting USE descriptions.
+if [ "$1" = "desc" ] || [ "$1" = "-i" ]; then
+ if [ -r ${use_desc} ]; then
+ for flag in ${@:2}; do
+ do_get_desc ${flag}
+ done
+ else
+ do_report_err ${use_desc} read
+ fi
+
+# show:
+# This is the feature for showing the contents of the USE variable.
+elif [ "$1" = "show" ] || [ "$1" = "-s" ]; then
+ if [ -r ${make_conf} ]; then
+ do_get_make dashes
+ else
+ do_report_err ${make_conf} read
+ fi
+
+# del:
+# This is the feature for removing a USE flag.
+elif [ "$1" = "del" ] || [ "$1" = "-d" ]; then
+ if [ -r ${make_conf} ]; then
+ make_use=`do_get_make dashes`
+ else
+ do_report_err ${make_conf} read
+ fi
+ for flag in ${@:2}; do
+ # Strip leading dashes.
+ if [ "${flag:0:1}" = "-" ]; then
+ flag="${flag:1}"
+ fi
+ del_test1=`do_get_depr ${flag} ${make_use}`
+ del_test2=`do_get_depr -${flag} ${make_use}`
+ if [ "${del_test1}" = "" ] || [ "${del_test2}" = "" ]; then
+ changes="1"
+ make_use=`do_use_rm ${flag} ${make_use}`
+ else
+ echo "!!! ${flag} is not in your USE variable."
+ fi
+ done
+ if [ "${changes}" != "0" ]; then
+ do_write_make ${make_use}
+ # Prune deleted USE flags from lock cache
+ lock_flags=`do_lock_flags $2`
+ do_write_lock ${lock_flags}
+ fi
+
+# add:
+# This is the feature for explicitly enabling or disabling a USE flag.
+elif [ "$1" = "add" ] || [ "$1" = "-a" ]; then
+ if [ -r ${make_conf} ]; then
+ make_use=`do_get_make dashes`
+ else
+ do_report_err ${make_conf} read
+ fi
+ for flag in ${@:2}; do
+ changes="1"
+ make_use=`do_use_add ${flag} ${make_use}`
+ done
+ if [ "${changes}" != "0" ]; then
+ do_write_make ${make_use}
+ fi
+
+# lock:
+# This is the feature to lock a depreciated USE flag to prevent removal
+elif [ "$1" = "lock" ] || [ "$1" = "-l" ]; then
+ if [ -r ${make_conf} ]; then
+ make_use=`do_get_make nodashes`
+ else
+ do_report_err ${make_conf} read
+ fi
+ for flag in ${@:2}; do
+ # Strip leading dashes.
+ if [ "${flag:0:1}" = "-" ]; then
+ flag="${flag:1}"
+ fi
+ lock_test=`do_get_depr ${flag} ${make_use}`
+ if [ "${lock_test}" = "" ]; then
+ lock_flags="${lock_flags} ${flag}"
+ else
+ echo "!!! ${flag} is not in your USE variable."
+ fi
+ done
+ lock_out=`do_lock_flags ${lock_flags}`
+ do_write_lock ${lock_out}
+
+# unlock:
+# This is the feature to unlock a depreciated USE flag to allow removal
+elif [ "$1" = "unlock" ] || [ "$1" = "-k" ]; then
+ if [ -r ${lock_cache} ]; then
+ lock_out=`cat ${lock_cache}`
+ else
+ do_report_err nolock
+ fi
+ for flag in ${@:2}; do
+ # Strip leading dashes.
+ if [ "${flag:0:1}" = "-" ]; then
+ flag="${flag:1}"
+ fi
+ lock_flag_check=`do_get_depr ${flag} ${lock_out}`
+ if [ "${lock_flag_check}" = "" ]; then
+ lock_out=`do_use_rm ${flag} ${lock_out}`
+ else
+ echo "!!! ${flag} is not a locked flag."
+ fi
+ done
+ do_write_lock ${lock_out}
+
+# showlock:
+# This feature prints a list of USE flags that have been locked
+elif [ "$1" = "showlock" ] || [ "$1" = "-w" ]; then
+ if [ -r ${lock_cache} ]; then
+ cat ${lock_cache}
+ else
+ do_report_err nolock
+ fi
+
+# update:
+# This is the feature to update your USE by removing depreciated flags and
+# handling new flags.
+elif [ "$1" = "update" ] || [ "$1" = "-u" ]; then
+ if [ -r ${make_conf} ]; then
+ # Get our USE but strip leading dashes
+ make_use=`do_get_make nodashes`
+ else
+ do_report_err ${make_conf} read
+ fi
+ # Get available USE flags from use.desc
+ if [ -r ${use_desc} ]; then
+ use_avail=`do_get_avail`
+ else
+ do_report_err ${use_desc} read
+ fi
+ # First we check for depreciated flags.
+ echo "Your USE variable currently looks like this:"
+ echo
+ echo `do_get_make dashes`
+ echo
+ # Print the list of locked flags if any exist.
+ if [ -r ${lock_cache} ]; then
+ lock_test=`cat ${lock_cache} | tr -d ' '`
+ if [ "${lock_test}" != "" ]; then
+ echo "The following flags are locked:"
+ cat ${lock_cache}
+ echo
+ fi
+ fi
+ echo
+ echo "*** Checking for depreciated USE flags ..."
+ echo
+ for check_flag in ${make_use}; do
+ depr_ret=`do_get_depr ${check_flag} ${use_avail}`
+ flag_depr="${flag_depr}${depr_ret}"
+ done
+ # Filter out locked flags
+ if [ -r ${lock_cache} ] && [ "${lock_test}" != "" ]; then
+ lock_list=`cat ${lock_cache}`
+ for check_locks in ${flag_depr}; do
+ lock_ret=`do_get_depr ${check_locks} ${lock_list}`
+ lock_out="${lock_out}${lock_ret}"
+ done
+ flag_depr="${lock_out}"
+ fi
+ make_use=`do_get_make dashes`
+ if [ "${flag_depr}" = "" ]; then
+ echo "!!! No depreciated flags were found."
+ else
+ echo "The following USE flags appear to be depreciated:"
+ echo "${flag_depr}"
+ echo
+ echo "How would you like to handle them?"
+ echo "1) Handle them individually"
+ echo "2) Remove all depreciated flags"
+ echo "3) Don't remove any depreciated flags"
+ echo "4) Lock all depreciated flags"
+ echo
+ echo -n "Type (1, 2, 3, or 4): "
+ while [ "${luser_input}" = "" ]; do
+ read luser_input
+ case ${luser_input} in
+ "2")
+ changes="1"
+ for flag in ${flag_depr}; do
+ make_use=`do_use_rm \
+ ${flag} ${make_use}`
+ done
+ echo
+ echo -n "*** All depreciated flags were "
+ echo "removed."
+ ;;
+ "3")
+ echo
+ echo "*** No flags were removed."
+ ;;
+ "1")
+ for flag in ${flag_depr}; do
+ echo -n "${flag} appears to be "
+ echo -n "depreciated. Remove it? "
+ echo -n "[Y]es/[N]o/[L]ock : "
+ luser_yn=""
+ while [ "${luser_yn}" = "" ]; do
+ read luser_yn
+ case ${luser_yn} in
+ "y" | "Y")
+ changes="1"
+ make_use=`do_use_rm \
+ ${flag} \
+ ${make_use}`
+ ;;
+ "n" | "N")
+ ;;
+ "l" | "L")
+ wlk="${flag} ${wlk}"
+ ;;
+ *)
+ luser_yn=""
+ ;;
+ esac
+ done
+ done
+ echo
+ echo -n "*** All depreciated flags "
+ echo "processed."
+ ;;
+ "4")
+ wlk="${flag_depr}"
+ echo
+ echo "*** All depreciated flags were locked."
+ ;;
+ *)
+ luser_input=""
+ ;;
+ esac
+ done
+ fi
+ if [ "${wlk}" != "" ]; then
+ do_write_lock ${wlk}
+ fi
+ # Now we check for new flags.
+ echo
+ echo
+ echo "*** Checking for new USE flags ..."
+ echo
+ # Load up our cached USE flags for comparison with use.desc
+ # Create the cache if it does not exist
+ if [ -w ${use_cache} ]; then
+ use_old=`cat ${use_cache}`
+ echo "${use_avail}" > ${use_cache}
+ chmod 600 ${use_cache}
+ elif [ -w ${use_cache_parent} ]; then
+ mkdir -p ${use_cache_dir}
+ chmod 700 ${use_cache_dir}
+ echo "${use_avail}" > ${use_cache}
+ chmod 600 ${use_cache}
+ use_old=""
+ else
+ do_report_err ${use_cache} write
+ fi
+ # Grab the contents of the USE variable.
+ make_cand=`do_get_make nodashes`
+ # Build a list of flags that do not exist in the USE variable.
+ for flag in ${use_avail}; do
+ new_cand="${new_cand}`do_get_depr ${flag} ${make_cand}`"
+ done
+ # Filter that list through the cached master list of flags.
+ for flag in ${new_cand}; do
+ new_flags="${new_flags}`do_get_depr ${flag} ${use_old}`"
+ done
+ if [ "${new_flags}" = "" ]; then
+ echo "!!! No new USE flags are available."
+ else
+ echo "The following new USE flags are available:"
+ echo "${new_flags}"
+ echo
+ echo "How would you like to handle them?"
+ echo "1) Handle them individually"
+ echo "2) Use Portage defaults (do not add to USE)"
+ echo "3) Explicitly enable all new flags"
+ echo "4) Explicitly disable all new flags"
+ echo
+ echo -n "Type (1, 2, 3, or 4): "
+ luser_input=""
+ while [ "${luser_input}" = "" ]; do
+ read luser_input
+ case ${luser_input} in
+ "1")
+ for h_flag in ${new_flags}; do
+ do_get_desc ${h_flag}
+ echo -n "How would you like to handle "
+ echo -n "${h_flag}? [e]nable, "
+ echo -n "[d]isable, [u]se default : "
+ luser_handle=""
+ while [ "${luser_handle}" = "" ]; do
+ read luser_handle
+ case ${luser_handle} in
+ "e" | "E")
+ changes="1"
+ make_use=`do_use_add \
+ ${h_flag} \
+ ${make_use}`
+ echo
+ ;;
+ "d" | "D")
+ changes="1"
+ make_use=`do_use_add \
+ "-${h_flag}" \
+ ${make_use}`
+ echo
+ ;;
+ "u" | "U")
+ echo
+ ;;
+ *)
+ luser_handle=""
+ ;;
+ esac
+ done
+ done
+ echo -n "*** All new flags have been "
+ echo "processed."
+ ;;
+ "2")
+ echo
+ echo -n "*** No new flags were added to "
+ echo "your USE."
+ ;;
+ "3")
+ changes="1"
+ for h_flag in ${new_flags}; do
+ make_use=`do_use_add ${h_flag} \
+ ${make_use}`
+ done
+ echo
+ echo -n "*** All new flags were enabled in "
+ echo "your USE."
+ ;;
+ "4")
+ changes="1"
+ for h_flag in ${new_flags}; do
+ make_use=`do_use_add \
+ "-${h_flag}" ${make_use}`
+ done
+ echo
+ echo -n "*** All new flags were disabled in "
+ echo "your USE."
+ ;;
+ *)
+ luser_input=""
+ ;;
+ esac
+ done
+ fi
+ # Write the changes if necessary.
+ if [ "${changes}" != "0" ]; then
+ do_write_make ${make_use}
+ # Prune any locked flags that do not exist in the USE variable
+ lock_prot=`do_lock_flags fakeflag`
+ do_write_lock ${lock_prot}
+ fi
+ echo
+ echo
+ echo "*** Script finished ..."
+
+# Display USAGE statement for unhandled parameters
+else
+ echo "Usage:"
+ echo " ${run_name} action [flag] [...]"
+ echo
+ echo "Actions:"
+ echo "-s, show Displays the contents of the USE variable."
+ echo "-i, desc Displays a description of one or more USE flags."
+ echo -n "-a, add Adds the specified flag(s) to the USE "
+ echo "variable."
+ echo -n "-d, del Deletes the specified flag(s) from "
+ echo "the USE variable."
+ echo "-l, lock Locks the specified flag(s) to prevent depreciation."
+ echo -n "-k, unlock Unlocks the specified flags to allow "
+ echo "depreciation."
+ echo "-w, showlock Displays a list of locked flags."
+ echo -n "-u, update Interactively updates the USE variable to "
+ echo "reflect changes"
+ echo " to use.desc."
+ echo
+ exit 1
+fi
+exit 0
+
diff --git a/app-admin/gentoolkit/files/scripts/useflag.1 b/app-admin/gentoolkit/files/scripts/useflag.1
new file mode 100644
index 000000000000..9496fa9594f3
--- /dev/null
+++ b/app-admin/gentoolkit/files/scripts/useflag.1
@@ -0,0 +1,69 @@
+.TH useflag "1" "May 2002" "gentoolkit"
+.SH NAME
+useflag \- manage and update Gentoo Linux USE flags
+.SH SYNOPSIS
+.B useflag
+\fIaction\fR [\fIflag\fR] [\fI...\fR]
+.SH DESCRIPTION
+The \fBuseflag\fR utility allows the user to manage Gentoo Linux USE flags through a simple command-line interface. It allows quick and easy, single-command manipulation of the USE variable defined in \fI/etc/make.conf\fR. It also simplifies the process of handling changes to the master list of USE flags defined in \fI/usr/portage/profile/use.desc\fR.
+.br
+
+It is important to note that a USE variable must exist in \fImake.conf\fR for this utility to work. Be sure that the USE variable is uncommented. It is OK for the USE variable to be empty. Please be sure to back up \fImake.conf\fR before using this utility for the first time.
+.PP
+.SH ACTIONS
+.TP
+\fBshow, -s\fR
+Displays the raw contents of the USE variable as defined in \fImake.conf\fR. The output contains only the flags themselves.
+.TP
+\fBdesc, -i [flag] ...\fR
+Displays a description of one or more USE flags specified on the command line. The flags should be seperated by spaces and should not contain leading dashes. Specifying a flag that does not exist returns a non-fatal error.
+.TP
+\fBadd, -a [[\-]flag] ...\fR
+Adds one or more specified flags to the USE variable defined in \fImake.conf\fR. The flags are appended to the USE variable exactly as they appear on the command line. If a specified flag already exists in the USE variable, it is removed before the new set of flags is appended. The utility removes existing flags regardless of whether they are in an enabled or disabled state, allowing the user to enable or disable a flag with a single command. The user may add flags that are not defined in the \fIuse.desc\fR master list.
+.TP
+\fBdel, -d [flag] ...\fR
+Deletes one or more specified flags from the USE variable defined in \fImake.conf\fR. The enabled/disabled state of a flag in the USE variable as well as any dashes prepended to flags on the command line is ignored. Attempting to delete a flag that is not in the USE variable returns a non-fatal error. When a flag is deleted from the USE variable using this utility, it is automatically unlocked.
+.TP
+\fBlock, -l [flag] ...\fR
+Locks one or more specified flags that exist in the USE variable defined in \fImake.conf\fR. Locked flags are not considered to be depreciated by the update function of this utility. This allows the user to avoid being queried by the utility about depreciated, undocumented, or custom flags that the user wishes to preserve when performing an update. A flag must exist in the USE variable in order to be locked. The enabled/disabled state of a flag in the USE variable as well as any dashes prepended to flags on the command line is ignored.
+.TP
+\fBunlock, -k [flag] ...\fR
+Unlocks one or more specified USE flags. This allows the update function to consider a flag depreciated if it no longer exists in the master list defined in \fIuse.desc\fR. Any dashes prepended to flags on the command line are ignored. Attempting to unlock flags that are not locked returns a non-fatal error.
+.TP
+\fBshowlock, -w\fR
+Displays the raw list of locked flags, seperated by spaces.
+.TP
+\fBupdate, -u\fR
+Interactively updates the USE variable defined in \fImake.conf\fR to reflect changes to the master list of USE flags defined in \fI use.desc\fR.
+.br
+
+First, the user is presented with the current raw contents of the USE variable. The user is also shown the list of locked flags if any exist.
+.br
+
+Next, the USE variable is searched for flags that do not appear in the master list. If any are found and they are not locked, then they are considered to be depreciated and are displayed to the user along with a list of options for handling them. The user may choose to remove all of the flags, remove none of the flags, lock all of the flags, or handle each flag individually.
+.br
+
+Last, the master list is searched for any new flags that have become available since the last time the update function was run, and these are displayed to the user. If this is the first time, then all flags not currently defined in the USE variable will be displayed. The user will then be presented with a list of options for handling these flags. The user may choose to add all of the new flags to the USE variable as enabled, add all of the new flags as disabled, use Portage defaults for all of the flags, or handle each flag individually.
+.SH FILES
+.TP
+\fI/etc/make.conf\fR
+Contains the USE variable that Portage uses to control build-time functionality.
+.TP
+\fI/usr/portage/profile/use.desc\fR
+Contains a master list of all documented USE flags along with their descriptions.
+.TP
+\fI/var/cache/use_desc/use.cache\fR
+Contains a cached list of flags from \fIuse.desc\fR. This prevents the user from being repeatedly queried about flags that exist in \fIuse.desc\fR but not in the USE variable. DO NOT EDIT THIS FILE MANUALLY.
+.TP
+\fI/var/cache/use_desc/lock.cache\fR
+Contains a list of USE flags that have been locked. DO NOT EDIT THIS FILE MANUALLY.
+.SH AUTHOR
+Michael Thompson <psionix@grandecom.net>, 2002
+.SH SEE ALSO
+ebuild(1), ebuild(5), emerge(1), make.conf(5).
+.TP
+See \fI/usr/share/doc/gentoolkit-<version>/\fR for documentation on other gentoolkit utilities.
+.SH TIPS
+.TP
+Deleting \fI/var/cache/use_desc/use.cache\fR will allow the utility to query about all flags not currently defined in the USE variable.
+
diff --git a/app-admin/gentoolkit/gentoolkit-0.1.11-r1.ebuild b/app-admin/gentoolkit/gentoolkit-0.1.12.ebuild
index 17fd167459dd..d6df1ecc35e2 100644
--- a/app-admin/gentoolkit/gentoolkit-0.1.11-r1.ebuild
+++ b/app-admin/gentoolkit/gentoolkit-0.1.12.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
-# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/gentoolkit-0.1.11-r1.ebuild,v 1.1 2002/06/08 13:38:46 lostlogic Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/gentoolkit-0.1.12.ebuild,v 1.1 2002/06/24 23:02:32 karltk Exp $
S=${WORKDIR}/${P}
DESCRIPTION="Collection of unofficial administration scripts for Gentoo"
@@ -32,6 +32,8 @@ src_install () {
fperms 0750 /usr/bin/qpkg
dobin ${FILESDIR}/scripts/pkg-size
+ dobin ${FILESDIR}/scripts/useflag
+ doman ${FILESDIR}/scripts/useflag.1
dosbin ${FILESDIR}/scripts/pkg-clean
dosbin ${FILESDIR}/scripts/mkebuild