Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 90077 Details for
Bug 137907
Localepurge parses options badly
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to change the way localpurge parses options
rewrite.diff (text/plain), 3.52 KB, created by
Charlie Shepherd (RETIRED)
on 2006-06-25 01:14:40 UTC
(
hide
)
Description:
Patch to change the way localpurge parses options
Filename:
MIME Type:
Creator:
Charlie Shepherd (RETIRED)
Created:
2006-06-25 01:14:40 UTC
Size:
3.52 KB
patch
obsolete
>diff -urN localepurge.orig/localepurge localepurge/localepurge >--- localepurge.orig/localepurge 2006-06-24 22:21:32.000000000 +0100 >+++ localepurge/localepurge 2006-06-25 10:04:30.000000000 +0100 >@@ -3,6 +3,8 @@ > # Deleting all locale files on system > # *not* listed in /etc/locale.nopurge > >+set -e >+ > LOCALEDIRS="/usr/share/locale /usr/local/share/locale /usr/kde/?.?/share/locale /opt/sun-jdk-*/jre/lib/locale /opt/sun-jre-bin-*/lib/locale /usr/lib/locale" > MANPAGEDIRS="/usr/share/man /usr/man /usr/local/share/man /usr/kde/?.?/share/man /usr/kde/?.?/man /opt/sun-jdk-*/man /opt/sun-jre-bin-*/man" > LOCALELIST="/var/cache/localepurge/localelist" >@@ -11,36 +13,14 @@ > LOCALETOTAL=0 > MANTOTAL=0 > >-set -e >- >-if [ "$1" = "-debug" ] || [ "$1" = "-d" ] \ >- || [ "$2" = "-debug" ] || [ "$2" = "-d" ] \ >- || [ "$3" = "-debug" ] || [ "$3" = "-d" ] \ >- || [ "$4" = "-debug" ] || [ "$4" = "-d" ] \ >- || [ "$5" = "-debug" ] || [ "$5" = "-d" ]; then >-set -x >-fi >+GOOD=$'\e[32;01m' >+WARN=$'\e[33;01m' >+BAD=$'\e[31;01m' >+NORMAL=$'\e[0m' >+HILITE=$'\e[36;01m' >+BRACKET=$'\e[34;01m' >+BOLD=$'\e[1m' > >-if [ "`grep -x ^NOCOLOR /etc/locale.nopurge`" ] \ >- || [ "$1" = "-nocolor" ] || [ "$1" = "-nc" ] \ >- || [ "$2" = "-nocolor" ] || [ "$2" = "-nc" ] \ >- || [ "$3" = "-nocolor" ] || [ "$3" = "-nc" ] \ >- || [ "$4" = "-nocolor" ] || [ "$4" = "-nc" ] \ >- || [ "$5" = "-nocolor" ] || [ "$5" = "-nc" ]; then >- NOCOLOR=yes >-fi >- >-if [[ ${NOCOLOR} == yes ]]; then >- unset GOOD WARN BAD NORMAL HILITE BRACKET BOLD >-else >- GOOD=$'\e[32;01m' >- WARN=$'\e[33;01m' >- BAD=$'\e[31;01m' >- NORMAL=$'\e[0m' >- HILITE=$'\e[36;01m' >- BRACKET=$'\e[34;01m' >- BOLD=$'\e[1m' >-fi > eerror () { > echo -e " ${BAD}*${NORMAL} $*" > } >@@ -75,36 +55,46 @@ > version () { > einfo "${BRACKET}[${NORMAL} ${GOOD}${VERSION}${NORMAL} ${BRACKET}]${NORMAL}" > } >-if [ "$1" = "-help" ] || [ "$1" = "-h" ] \ >- || [ "$2" = "-help" ] || [ "$2" = "-h" ] \ >- || [ "$3" = "-help" ] || [ "$3" = "-h" ] \ >- || [ "$4" = "-help" ] || [ "$4" = "-h" ] \ >- || [ "$5" = "-help" ] || [ "$5" = "-h" ]; then >- ayuda >- exit 0 >-fi >- >-if [ "$1" = "-version" ] \ >- || [ "$2" = "-version" ] \ >- || [ "$3" = "-version" ] \ >- || [ "$4" = "-version" ] \ >- || [ "$5" = "-version" ] ; then >- version >- exit 0 >-fi > > if [ "`grep -x ^SHOWFREEDSPACE /etc/locale.nopurge`" ]; then > SHOWFREEDSPACE=enabled > fi > >-if [ "`grep -x ^VERBOSE /etc/locale.nopurge`" ] \ >- || [ "$1" = "-verbose" ] || [ "$1" = "-v" ] \ >- || [ "$2" = "-verbose" ] || [ "$2" = "-v" ] \ >- || [ "$3" = "-verbose" ] || [ "$3" = "-v" ] \ >- || [ "$4" = "-verbose" ] || [ "$4" = "-v" ] \ >- || [ "$5" = "-verbose" ] || [ "$5" = "-v" ]; then >- VERBOSE=enabled >-fi >+# We need to loop through for no color first, otherwise options that exit >+# will make us ignore nocolor, so we might as well loop for debug first as well >+ >+for x in $@ >+do >+ if [ "$x" = "-debug" ] || [ "$x" = "-d" ]; then >+ set -x >+ fi >+ >+ if [ "`grep -x ^NOCOLOR /etc/locale.nopurge`" ] || [ "$x" = "-nocolor" ] || [ "$x" = "-nc" ]; then >+ unset GOOD WARN BAD NORMAL HILITE BRACKET BOLD >+ fi >+ >+done >+ >+# Loop through the rest of the options >+ >+for x in $@ >+do >+ >+ if [ "`grep -x ^VERBOSE /etc/locale.nopurge`" ] || [ "$x" = "-verbose" ] || [ "$x" = "-v" ]; then >+ VERBOSE=enabled >+ fi >+ >+ if [ "$x" = "-version" ] ; then >+ version >+ exit 0 >+ fi >+ >+ if [ "$x" = "-help" ] || [ "$x" = "-h" ]; then >+ ayuda >+ exit 0 >+ fi >+ >+done > > # Do nothing and report why if no valid configuration file exists: >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 137907
: 90077