From e9dc56625152991ba535f5be3ab88fc7ec8dbcfc Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 22 Nov 2012 12:42:42 -0500 Subject: [PATCH] strip trailing whitespace No functional changes here. Signed-off-by: Mike Frysinger --- bin/archive-conf | 2 +- bin/ebuild-helpers/dodoc | 2 +- bin/ebuild-helpers/doinfo | 2 +- bin/ebuild-helpers/prepman | 2 +- bin/egencache | 2 +- bin/emerge-webrsync | 2 +- bin/glsa-check | 14 +++++++------- bin/misc-functions.sh | 10 +++++----- bin/repoman | 28 ++++++++++++++-------------- 9 files changed, 32 insertions(+), 32 deletions(-) diff --git a/bin/archive-conf b/bin/archive-conf index af34db628..80fa308a1 100755 --- a/bin/archive-conf +++ b/bin/archive-conf @@ -35,7 +35,7 @@ except ImportError: for ix in range(len(md5sum)): hexform = hexform + "%02x" % ord(md5sum[ix]) return hexform.lower() - + def perform_checksum(filename): f = open(filename, 'rb') blocksize=32768 diff --git a/bin/ebuild-helpers/dodoc b/bin/ebuild-helpers/dodoc index c551735eb..99122c443 100755 --- a/bin/ebuild-helpers/dodoc +++ b/bin/ebuild-helpers/dodoc @@ -13,7 +13,7 @@ fi if [ $# -lt 1 ] ; then __helpers_die "${0##*/}: at least one argument needed" - exit 1 + exit 1 fi if ! ___eapi_has_prefix_variables; then diff --git a/bin/ebuild-helpers/doinfo b/bin/ebuild-helpers/doinfo index 355047f73..2edbdc592 100755 --- a/bin/ebuild-helpers/doinfo +++ b/bin/ebuild-helpers/doinfo @@ -6,7 +6,7 @@ source "${PORTAGE_BIN_PATH:-/usr/lib/portage/bin}"/isolated-functions.sh if [[ -z $1 ]] ; then __helpers_die "${0##*/}: at least one argument needed" - exit 1 + exit 1 fi if ! ___eapi_has_prefix_variables; then diff --git a/bin/ebuild-helpers/prepman b/bin/ebuild-helpers/prepman index 142d40443..55a9483e3 100755 --- a/bin/ebuild-helpers/prepman +++ b/bin/ebuild-helpers/prepman @@ -8,7 +8,7 @@ if ! ___eapi_has_prefix_variables; then ED=${D} fi -if [[ -z $1 ]] ; then +if [[ -z $1 ]] ; then mandir="${ED}usr/share/man" else mandir="${ED}$1/man" diff --git a/bin/egencache b/bin/egencache index 9d88237a3..8870d9994 100755 --- a/bin/egencache +++ b/bin/egencache @@ -474,7 +474,7 @@ class GenUseLocalDesc(object): self._portdb = portdb self._output = output self._preserve_comments = preserve_comments - + def run(self): repo_path = self._portdb.porttrees[0] ops = {'<':0, '<=':1, '=':2, '>=':3, '>':4} diff --git a/bin/emerge-webrsync b/bin/emerge-webrsync index e826ec440..76d31f51c 100755 --- a/bin/emerge-webrsync +++ b/bin/emerge-webrsync @@ -429,7 +429,7 @@ do_latest_snapshot() { usage() { cat <<-EOF Usage: $0 [options] - + Options: --revert=yyyymmdd Revert to snapshot -k, --keep Keep snapshots in DISTDIR (don't delete) diff --git a/bin/glsa-check b/bin/glsa-check index bfae0f997..b3eb14689 100755 --- a/bin/glsa-check +++ b/bin/glsa-check @@ -114,7 +114,7 @@ glsalist = [] if "new" in params: glsalist = todolist params.remove("new") - + if "all" in params: glsalist = completelist params.remove("all") @@ -183,7 +183,7 @@ def summarylist(myglsalist, fd1=sys.stdout, fd2=sys.stderr): fd1.write(")") if list_cve: fd1.write(" "+(",".join([r[:13] for r in myglsa.references if r[:4] in ["CAN-", "CVE-"]]))) - fd1.write("\n") + fd1.write("\n") return 0 if mode == "list": @@ -267,7 +267,7 @@ if mode == "mail": import portage.mail, socket from io import StringIO from email.mime.text import MIMEText - + # color doesn't make any sense for mail nocolor() @@ -275,7 +275,7 @@ if mode == "mail": myrecipient = portage.settings["PORTAGE_ELOG_MAILURI"].split()[0] else: myrecipient = "root@localhost" - + if "PORTAGE_ELOG_MAILFROM" in portage.settings: myfrom = portage.settings["PORTAGE_ELOG_MAILFROM"] else: @@ -303,12 +303,12 @@ if mode == "mail": myglsa.dump(outstream=myfd) myattachments.append(MIMEText(str(myfd.getvalue()), _charset="utf8")) myfd.close() - + mymessage = portage.mail.create_message(myfrom, myrecipient, mysubject, summary, myattachments) portage.mail.send_mail(portage.settings, mymessage) - + sys.exit(0) - + # something wrong here, all valid paths are covered with sys.exit() sys.stderr.write("nothing more to do\n") sys.exit(2) diff --git a/bin/misc-functions.sh b/bin/misc-functions.sh index db023e48a..853489a04 100755 --- a/bin/misc-functions.sh +++ b/bin/misc-functions.sh @@ -397,7 +397,7 @@ install_qa_check() { # Check for files built without respecting LDFLAGS if [[ "${LDFLAGS}" == *,--hash-style=gnu* ]] && \ - ! has binchecks ${RESTRICT} ; then + ! has binchecks ${RESTRICT} ; then f=$(scanelf -qyRF '%k %p' -k .hash "${ED}" | sed -e "s:\.hash ::") if [[ -n ${f} ]] ; then echo "${f}" > "${T}"/scanelf-ignored-LDFLAGS.log @@ -620,8 +620,8 @@ install_qa_check() { done done - # When installing static libraries into /usr/lib and shared libraries into - # /lib, we have to make sure we have a linker script in /usr/lib along side + # When installing static libraries into /usr/lib and shared libraries into + # /lib, we have to make sure we have a linker script in /usr/lib along side # the static library, or gcc will utilize the static lib when linking :(. # http://bugs.gentoo.org/4411 abort="no" @@ -1121,10 +1121,10 @@ preinst_selinux_labels() { ( eval "$(/usr/sbin/selinuxconfig)" || \ die "Failed to determine SELinux policy paths."; - + addwrite /selinux/context addwrite /sys/fs/selinux/context - + /usr/sbin/setfiles "${file_contexts_path}" -r "${D}" "${D}" ) || die "Failed to set SELinux security labels." else diff --git a/bin/repoman b/bin/repoman index 91a98153b..7ecdc6d19 100755 --- a/bin/repoman +++ b/bin/repoman @@ -125,7 +125,7 @@ signal.signal(signal.SIGINT,exithandler) class RepomanHelpFormatter(optparse.IndentedHelpFormatter): """Repoman needs it's own HelpFormatter for now, because the default ones murder the help text.""" - + def __init__(self, indent_increment=1, max_help_position=24, width=150, short_first=1): optparse.HelpFormatter.__init__(self, indent_increment, max_help_position, width, short_first) @@ -135,7 +135,7 @@ class RepomanHelpFormatter(optparse.IndentedHelpFormatter): class RepomanOptionParser(optparse.OptionParser): """Add the on_tail function, ruby has it, optionParser should too """ - + def __init__(self, *args, **kwargs): optparse.OptionParser.__init__(self, *args, **kwargs) self.tail = "" @@ -169,7 +169,7 @@ def ParseArgs(argv, qahelp): 'help' : 'Show this screen', 'manifest' : 'Generate a Manifest (fetches files if necessary)', 'manifest-check' : 'Check Manifests for missing or incorrect digests', - 'scan' : 'Scan directory tree for QA issues' + 'scan' : 'Scan directory tree for QA issues' } mode_keys = list(modes) @@ -196,7 +196,7 @@ def ParseArgs(argv, qahelp): parser.add_option('-p', '--pretend', dest='pretend', default=False, action='store_true', help='don\'t commit or fix anything; just show what would be done') - + parser.add_option('-q', '--quiet', dest="quiet", action="count", default=0, help='do not print unnecessary messages') @@ -244,7 +244,7 @@ def ParseArgs(argv, qahelp): parser.add_option('--without-mask', dest='without_mask', action='store_true', default=False, help='behave as if no package.mask entries exist (not allowed with commit mode)') - parser.add_option('--mode', type='choice', dest='mode', choices=list(modes), + parser.add_option('--mode', type='choice', dest='mode', choices=list(modes), help='specify which mode repoman will run in (default=full)') parser.on_tail("\n " + green("Modes".ljust(20) + " Description\n")) @@ -279,7 +279,7 @@ def ParseArgs(argv, qahelp): if not opts.mode: opts.mode = 'full' - + if opts.mode == 'ci': opts.mode = 'commit' # backwards compat shortcut @@ -329,7 +329,7 @@ qahelp={ "KEYWORDS.dropped":"Ebuilds that appear to have dropped KEYWORDS for some arch", "KEYWORDS.missing":"Ebuilds that have a missing or empty KEYWORDS variable", "KEYWORDS.stable":"Ebuilds that have been added directly with stable KEYWORDS", - "KEYWORDS.stupid":"Ebuilds that use KEYWORDS=-* instead of package.mask", + "KEYWORDS.stupid":"Ebuilds that use KEYWORDS=-* instead of package.mask", "LICENSE.missing":"Ebuilds that have a missing or empty LICENSE variable", "LICENSE.virtual":"Virtuals that have a non-empty LICENSE variable", "DESCRIPTION.missing":"Ebuilds that have a missing or empty DESCRIPTION variable", @@ -1632,7 +1632,7 @@ for x in effective_scanlist: if check_changelog and "ChangeLog" not in checkdirlist: stats["changelog.missing"]+=1 fails["changelog.missing"].append(x+"/ChangeLog") - + musedict = {} #metadata.xml file check if "metadata.xml" not in checkdirlist: @@ -1995,7 +1995,7 @@ for x in effective_scanlist: badlicsyntax = len([z for z in type_list if z == "LICENSE"]) badprovsyntax = len([z for z in type_list if z == "PROVIDE"]) - baddepsyntax = len(type_list) != badlicsyntax + badprovsyntax + baddepsyntax = len(type_list) != badlicsyntax + badprovsyntax badlicsyntax = badlicsyntax > 0 badprovsyntax = badprovsyntax > 0 @@ -2025,7 +2025,7 @@ for x in effective_scanlist: for mypos in range(len(myuse)): stats["IUSE.invalid"]=stats["IUSE.invalid"]+1 - fails["IUSE.invalid"].append(x+"/"+y+".ebuild: %s" % myuse[mypos]) + fails["IUSE.invalid"].append(x+"/"+y+".ebuild: %s" % myuse[mypos]) # license checks if not badlicsyntax: @@ -2127,7 +2127,7 @@ for x in effective_scanlist: # A missing profile will create an error further down # during the KEYWORDS verification. continue - + for prof in profiles[arch]: if prof.status not in ("stable", "dev") or \ @@ -2192,7 +2192,7 @@ for x in effective_scanlist: suffix=suffix+"indev" for mytype in Package._dep_keys: - + mykey = "dependency.bad" + suffix myvalue = myaux[mytype] if not myvalue: @@ -2403,7 +2403,7 @@ else: with repoman_popen("hg status --no-status --unknown .") as f: myunadded = f.readlines() myunadded = ["./" + elem.rstrip() for elem in myunadded] - + # Mercurial doesn't handle manually deleted files as removed from # the repository, so the user need to remove them before commit, # using "hg remove [FILES]" @@ -2707,7 +2707,7 @@ else: elif vcs == "svn": if myfile not in expansion: continue - + # Subversion keywords are case-insensitive in svn:keywords properties, but case-sensitive in contents of files. enabled_keywords = [] for k in expansion[myfile]: -- 2.26.2