usage = "usage: emaint [options] COMMAND"
desc = "The emaint program provides an interface to system health " + \
- "checks and maintenance. See the emaint(1) man page for " + \
+ "checks and maintenance. See the emaint(1) man page " + \
"for additional information about the following commands:"
usage += "\n\n"
\fB\-\-search\fR \fIsomestring\fR
.TP
.BR emerge
-\fB\-\-help\fR [\fBsystem\fR | \fBworld\fR | \fB\-\-sync\fR]
+\fB\-\-help\fR [\fB\-\-sync\fR]
.SH "DESCRIPTION"
\fBemerge\fR is the definitive command\-line interface to the Portage
system. It is primarily used for installing packages, and \fBemerge\fR
have been installed if \fB\-\-pretend\fR weren't used. Using \fB\-\-pretend\fR
is strongly recommended before installing an unfamiliar package. In
the printout:
-.br
-
-.br
-\fIN\fR = new (not yet installed)
-.br
-\fIS\fR = new SLOT installation (side-by-side versions)
-.br
-\fIU\fR = updating (to another version)
-.br
-\fID\fR = downgrading (best version seems lower)
-.br
-\fIR\fR = replacing (remerging same version))
-.br
-\fIF\fR = fetch restricted (must be manually downloaded)
-.br
-\fIf\fR = fetch restricted (already downloaded)
-.br
-\fIB\fR = blocked by an already installed package
+
+.TS
+lI l.
+N new (not yet installed)
+S new SLOT installation (side-by-side versions)
+U updating (to another version)
+D downgrading (best version seems lower)
+R replacing (remerging same version))
+F fetch restricted (must be manually downloaded)
+f fetch restricted (already downloaded)
+I interactive (requires user input)
+B blocked by an already installed package
+.TE
.TP
.BR "\-\-quiet " (\fB\-q\fR)
Results may vary, but the general outcome is a reduced or condensed
out GNU info errors, if any, and to show the USE flags that will be used for
each package when pretending. The following symbols are affixed to USE flags
in order to indicate their status:
-.br
-.br
-\fI- prefix\fR = not enabled (either disabled or removed)
-.br
-\fI* suffix\fR = transition to or from the enabled state
-.br
-\fI% suffix\fR = newly added or removed
-.br
-\fI() circumfix\fR = forced, masked, or removed
+.TS
+l l l
+___
+l l l.
+Symbol Location Meaning
+
+- prefix not enabled (either disabled or removed)
+* suffix transition to or from the enabled state
+% suffix newly added or removed
+() circumfix forced, masked, or removed
+.TE
.TP
.BR "\-\-with\-bdeps < y | n >"
In dependency calculations, pull in build time dependencies
site\-specific overrides go in \fB/etc/portage/profile/\fR
.nf
deprecated
+eapi
make.defaults
packages
packages.build
# ln -s /usr/portage/profiles/default-linux/alpha/2005.0 /etc/make.profile
.fi
.TP
+.BR eapi
+The first line of this file specifies the \fBEAPI\fR to which files in the
+same directory conform. See \fBebuild\fR(5) for information about \fBEAPI\fR
+and related features.
+.TP
.BR make.defaults
The profile default settings for Portage. The general format is described
in \fBmake.conf\fR(5). The \fImake.defaults\fR for your profile defines a
print "!!! The short ebuild name \"%s\" is ambiguous. Please specify" % arg
print "!!! one of the above fully-qualified ebuild names instead.\n"
+def profile_check(trees, myaction, myopts):
+ if myaction in ("info", "sync"):
+ return os.EX_OK
+ elif "--version" in myopts or "--help" in myopts:
+ return os.EX_OK
+ for root, root_trees in trees.iteritems():
+ if root_trees["root_config"].settings.profiles:
+ continue
+ # generate some profile related warning messages
+ validate_ebuild_environment(trees)
+ msg = "If you have just changed your profile configuration, you " + \
+ "should revert back to the previous configuration. Due to " + \
+ "your current profile being invalid, allowed actions are " + \
+ "limited to --help, --info, --sync, and --version."
+ writemsg_level("".join("!!! %s\n" % l for l in textwrap.wrap(msg, 70)),
+ level=logging.ERROR, noiselevel=-1)
+ return 1
+ return os.EX_OK
+
def emerge_main():
global portage # NFC why this is necessary now - genone
portage._disable_legacy_globals()
os.umask(022)
settings, trees, mtimedb = load_emerge_config()
portdb = trees[settings["ROOT"]]["porttree"].dbapi
+ rval = profile_check(trees, myaction, myopts)
+ if rval != os.EX_OK:
+ return rval
if portage._global_updates(trees, mtimedb["updates"]):
mtimedb.commit()
print " exist on it, including ones that you may have created. The exceptions"
print " to this are the distfiles, local and packages directories."
print
- elif myaction=="system":
- print
- print bold("Usage: ")+turquoise("emerge")+" [ "+green("options")+" ] "+turquoise("system")
- print
- print " \"emerge system\" is the Portage system update command. When run, it"
- print " will scan the etc/make.profile/packages file and determine what"
- print " packages need to be installed so that your system meets the minimum"
- print " requirements of your current system profile. Note that this doesn't"
- print " necessarily bring your system up-to-date at all; instead, it just"
- print " ensures that you have no missing parts. For example, if your system"
- print " profile specifies that you should have sys-apps/iptables installed"
- print " and you don't, then \"emerge system\" will install it (the most"
- print " recent version that matches the profile spec) for you. It's always a"
- print " good idea to do an \"emerge --pretend system\" before an \"emerge"
- print " system\", just so you know what emerge is planning to do."
- print
- elif myaction=="world":
- print
- print bold("Usage: ")+turquoise("emerge")+" [ "+green("options")+" ] "+turquoise("world")
- print
- print " 'emerge world' is the Portage command for completely updating your"
- print " system. The normal procedure is to first do an 'emerge --sync' and"
- print " then an 'emerge --update --deep world'. The first command brings your"
- print " local Portage tree up-to-date with the latest version information and"
- print " ebuilds. The second command then rebuilds all packages for which newer"
- print " versions or newer ebuilds have become available since you last did a"
- print " sync and update."
- print
-
self.profiles = []
def addProfile(currentPath):
parentsFile = os.path.join(currentPath, "parent")
+ eapi_file = os.path.join(currentPath, "eapi")
+ try:
+ eapi = open(eapi_file).readline().strip()
+ except IOError:
+ pass
+ else:
+ if not eapi_is_supported(eapi):
+ raise portage.exception.ParseError(
+ "Profile contains unsupported " + \
+ "EAPI '%s': '%s'" % \
+ (eapi, os.path.realpath(eapi_file),))
if os.path.exists(parentsFile):
parents = grabfile(parentsFile)
if not parents:
writemsg("!!! ParseError: %s\n" % str(e), noiselevel=-1)
del e
self.profiles = []
- if local_config:
+ if local_config and self.profiles:
custom_prof = os.path.join(
config_root, CUSTOM_PROFILE_PATH.lstrip(os.path.sep))
if os.path.exists(custom_prof):
writemsg_stdout("\n\n")
writemsg_stdout(green("Performing Global Updates: ")+bold(mykey)+"\n")
writemsg_stdout("(Could take a couple of minutes if you have a lot of binary packages.)\n")
- writemsg_stdout(" "+bold(".")+"='update pass' "+bold("*")+"='binary update' "+bold("@")+"='/var/db move'\n"+" "+bold("s")+"='/var/db SLOT move' "+bold("%")+"='binary move' "+bold("S")+"='binary SLOT move' "+bold("p")+"='update /etc/portage/package.*'\n")
+ writemsg_stdout(" "+bold(".")+"='update pass' "+bold("*")+"='binary update' "+bold("@")+"='/var/db move'\n"+" "+bold("s")+"='/var/db SLOT move' "+bold("%")+"='binary move' "+bold("S")+"='binary SLOT move'\n "+bold("p")+"='update /etc/portage/package.*'\n")
valid_updates, errors = parse_updates(mycontent)
myupd.extend(valid_updates)
writemsg_stdout(len(valid_updates) * "." + "\n")