#!/usr/bin/python
-# Copyright 2008-2009 Gentoo Foundation
+# Copyright 2008-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
parser.print_help()
sys.exit(1)
elif mode in ["fix", "inject"] and os.geteuid() != 0:
- # we need root priviledges for write access
+ # we need root privileges for write access
sys.stderr.write("\nThis tool needs root access to "+options.mode+" this GLSA\n\n")
sys.exit(2)
elif mode == "list" and not params:
+# ============
+# This should be left to the default value of sparc-unknown-linux-gnu unless
+# you are absolutely certain of the consequences. In addition to potentially
-+# destroying your system, you will recieve no support and your bugs will be
++# destroying your system, you will receive no support and your bugs will be
+# marked INVALID if you change this.
+#
+# CHOST="sparc-unknown-linux-gnu"
<section id='package-ebuild-eapi-4-metadata-required-use-motivation'>
<title>Motivation</title>
<para>
-It's a semi common occurence that an ebuild may need to state that they disallow USE flags in specific combinations- either mysql or sqlite for example, but not both.
+It's a semi common occurrence that an ebuild may need to state that they disallow USE flags in specific combinations- either mysql or sqlite for example, but not both.
</para>
<para>
Existing solutions rely on checking the the USE configuration in pkg_setup which is non-optimal due to pkg_setup being ran potentially hours after the initial emerge -p invocation.
</listitem>
<listitem>
<para>
-The common implementation of this can result in an iterative process where the user hits a USE constraint, fixs it, reruns the emerge invocation only to find that there is another constraint still violated for the ebuild, thus requiring them to fix it, rerun emerge, etc.
+The common implementation of this can result in an iterative process where the user hits a USE constraint, fixes it, reruns the emerge invocation only to find that there is another constraint still violated for the ebuild, thus requiring them to fix it, rerun emerge, etc.
</para>
</listitem>
<listitem>
:default: http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo
:valdesc: space separated list of mirror locations
-Insert your space-seperated list of local mirrors here. These locations are
+Insert your space-separated list of local mirrors here. These locations are
used to download files before the ones listed in the ebuild scripts. Merging
'app-portage/mirrorselect' can help to select an appropriate mirror.
-.TH "EBUILD" "5" "Feb 2011" "Portage VERSION" "Portage"
+.TH "EBUILD" "5" "May 2011" "Portage VERSION" "Portage"
.SH "NAME"
ebuild \- the internal format, variables, and functions in an ebuild script
.SH "DESCRIPTION"
.TP
\fBprepstrip\fR \fI[dir]\fR
.PD 1
-Similiar to the \fBprepall\fR functions, these are subtle in their differences.
+Similar to the \fBprepall\fR functions, these are subtle in their differences.
.RS
.PD 0
.TP
http://gcc.gnu.org/onlinedocs/
.TP
\fBGENTOO_MIRRORS\fR = \fI[URIs]\fR
-Insert your space\-seperated list of local mirrors here. These
+Insert your space\-separated list of local mirrors here. These
locations are used to download files before the ones listed in
the \fIebuild scripts\fR. Merging 'mirrorselect' can help. Entries in this
variable that have no protocol and simply start with a '/' path separator may
def _display_autounmask(self):
"""
- Display --autounmask message and optionally write them to config files
+ Display --autounmask message and optionally write it to config files
(using CONFIG_PROTECT). The message includes the comments and the changes.
"""
def find_config_file(abs_user_config, file_name):
"""
- Searches /etc/portage for an appropiate file to append changes to.
- If the file_name is a file it is returned, if it is a directoy, the
+ Searches /etc/portage for an appropriate file to append changes to.
+ If the file_name is a file it is returned, if it is a directory, the
last file in it is returned.
- file_name - String containg a file name like "package.use"
- return value - String. Absolte path of file to write to. None if
+ file_name - String containing a file name like "package.use"
+ return value - String. Absolute path of file to write to. None if
no suitable file exists.
"""
file_path = os.path.join(abs_user_config, file_name)
files = sorted(f for f in os.listdir(file_path) \
if os.path.isfile(os.path.join(file_path, f)))
if len(files) != 0:
- return os.path.join(file_path, files[-1])
+ return os.path.join(file_path, files[-1])
except OSError:
pass
file_to_write_to.get((abs_user_config, "package.license")))
if problems:
- writemsg_stdout("\nThe following problems occured while writing autounmask changes:\n", \
+ writemsg_stdout("\nThe following problems occurred while writing autounmask changes:\n", \
noiselevel=-1)
writemsg_stdout("".join(problems), noiselevel=-1)
elif write_to_file and roots:
- writemsg_stdout("\nAutounmask changes successfully written. Remeber to run etc-update.\n", \
+ writemsg_stdout("\nAutounmask changes successfully written. Remember to run etc-update.\n", \
noiselevel=-1)
elif not pretend and not autounmask_write and roots:
writemsg_stdout("\nUse --autounmask-write to write changes to config files (honoring CONFIG_PROTECT).\n", \
go to stdout for parsing by programs such as autounmask.
"""
- # Note that show_masked_packages() sends it's output to
+ # Note that show_masked_packages() sends its output to
# stdout, and some programs such as autounmask parse the
# output in cases when emerge bails out. However, when
# show_masked_packages() is called for installed packages
sets = setconfig.getSets()
- # display errors that occured while loading the SetConfig instance
+ # display errors that occurred while loading the SetConfig instance
for e in setconfig.errors:
print(colorize("BAD", "Error during set creation: %s" % e))
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-"""Contains private suport functions for the Display class
+"""Contains private support functions for the Display class
in output.py
"""
__all__ = (
# cvstree.py -- cvs tree utilities
-# Copyright 1998-2004 Gentoo Foundation
+# Copyright 1998-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
def getentries(mydir,recursive=0):
"""(basedir,recursive=0)
- Scans the given directory and returns an datadict of all the entries in
- the directory seperated as a dirs dict and a files dict."""
+ Scans the given directory and returns a datadict of all the entries in
+ the directory separated as a dirs dict and a files dict."""
myfn=mydir+"/CVS/Entries"
# entries=[dirs, files]
entries={"dirs":{},"files":{}}
myrecipient = "root@localhost"
# Syntax for PORTAGE_ELOG_MAILURI (if defined):
- # adress [[user:passwd@]mailserver[:port]]
- # where adress: recipient adress
+ # address [[user:passwd@]mailserver[:port]]
+ # where address: recipient address
# user: username for smtp auth (defaults to none)
# passwd: password for smtp auth (defaults to none)
# mailserver: smtp server that should be used to deliver the mail (defaults to localhost)
myconn = smtplib.SMTP(mymailhost, int(mymailport) - 100000)
myconn.ehlo()
if not myconn.has_extn("STARTTLS"):
- raise portage.exception.PortageException(_("!!! TLS support requested for logmail but not suported by server"))
+ raise portage.exception.PortageException(_("!!! TLS support requested for logmail but not supported by server"))
myconn.starttls()
myconn.ehlo()
else:
myconn.sendmail(myfrom, myrecipient, message_str)
myconn.quit()
except smtplib.SMTPException as e:
- raise portage.exception.PortageException(_("!!! An error occured while trying to send logmail:\n")+str(e))
+ raise portage.exception.PortageException(_("!!! An error occurred while trying to send logmail:\n")+str(e))
except socket.error as e:
- raise portage.exception.PortageException(_("!!! A network error occured while trying to send logmail:\n%s\nSure you configured PORTAGE_ELOG_MAILURI correctly?") % str(e))
+ raise portage.exception.PortageException(_("!!! A network error occurred while trying to send logmail:\n%s\nSure you configured PORTAGE_ELOG_MAILURI correctly?") % str(e))
return
-# Copyright 1998-2009 Gentoo Foundation
+# Copyright 1998-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
__docformat__ = "epytext"
split_line = line.split("=")
if len(split_line) != 2:
- e = ParseError(_("'%s', line %s: expected exactly one occurence of '=' operator") % \
+ e = ParseError(_("'%s', line %s: expected exactly one occurrence of '=' operator") % \
(myfile, lineno))
raise e
if onerror:
class ResolverPlayground(object):
"""
- This class help to create the necessary files on disk and
+ This class helps to create the necessary files on disk and
the needed settings instances, etc. for the resolver to do
- it's work.
+ its work.
"""
config_files = frozenset(("package.use", "package.mask", "package.keywords", \
def __init__(self, ebuilds={}, installed={}, profile={}, repo_configs={}, \
user_config={}, sets={}, world=[], debug=False):
"""
- ebuilds: cpv -> metadata mapping simulating avaiable ebuilds.
+ ebuilds: cpv -> metadata mapping simulating available ebuilds.
installed: cpv -> metadata mapping simulating installed packages.
If a metadata key is missing, it gets a default value.
profile: settings defined by the profile.
checks = dict.fromkeys(result.checks)
for key, value in self._checks.items():
if not key in checks:
- raise KeyError("Not an avaiable check: '%s'" % key)
+ raise KeyError("Not an available check: '%s'" % key)
checks[key] = value
fail_msgs = []
-# Copyright 1999-2010 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import codecs
write_atomic(updating_file, "".join(file_contents[x]))
except PortageException as e:
writemsg("\n!!! %s\n" % str(e), noiselevel=-1)
- writemsg(_("!!! An error occured while updating a config file:") + \
+ writemsg(_("!!! An error occurred while updating a config file:") + \
" '%s'\n" % updating_file, noiselevel=-1)
continue
-# Copyright 2010 Gentoo Foundation
+# Copyright 2010-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
"""Provides an easy-to-use python interface to Gentoo's metadata.xml file.
@type name: str or None
@ivar name: USE flag
@type restrict: str or None
- @ivar restrict: e.g. >=portage-2.2 means flag is only avaiable in
+ @ivar restrict: e.g. >=portage-2.2 means flag is only available in
versions greater than 2.2
@type description: str
@ivar description: description of the USE flag