file/mail.
* New QA loglevel and matching eqawarn function
* `ebuild foo test` now always runs src_test if available
+* If DOC_SYMLINK_DIR is set portage installs symlinks to html documention there
portage-2.1.1
------------
source @PORTAGE_BASE@/bin/ebuild.sh
+install_symlink_html_docs() {
+ cd "${ED}" || die "cd failed"
+ #symlink the html documentation (if DOC_SYMLINKS_DIR is set in make.conf)
+ if [ -n "${DOC_SYMLINKS_DIR}" ] ; then
+ local mydocdir docdir
+ for docdir in "${HTMLDOC_DIR:-does/not/exist}" "${PF}/html" "${PF}/HTML" "${P}/html" "${P}/HTML" ; do
+ if [ -d "usr/share/doc/${docdir}" ] ; then
+ mydocdir="${EPREFIX}/usr/share/doc/${docdir}"
+ fi
+ done
+ if [ -n "${mydocdir}" ] ; then
+ local mysympath
+ if [ -z "${SLOT}" -o "${SLOT}" = "0" ] ; then
+ mysympath="${DOC_SYMLINKS_DIR}/${CATEGORY}/${PN}"
+ else
+ mysympath="${DOC_SYMLINKS_DIR}/${CATEGORY}/${PN}-${SLOT}"
+ fi
+ einfo "Symlinking ${mysympath} to the HTML documentation"
+ dodir "${DOC_SYMLINKS_DIR}/${CATEGORY}"
+ dosym "${mydocdir}" "${mysympath}"
+ fi
+ fi
+}
+
install_qa_check() {
cd "${ED}" || die "cd failed"
prepall
override those specified in the default locations, letting you
avoid using some dependencies you may not want to have. \fBUSE
flags specified on the command line are NOT remembered\fR. For
-example, \fBUSE="\-X \-gnome" emerge mc\fR will emerge mc with
-those USE settings. If you want those USE settings to be more
+example, \fBenv USE="\-X \-gnome" emerge mc\fR will emerge mc with
+those USE settings (on Bourne-compatible shells you may omit the \fBenv\fR
+part). If you want those USE settings to be more
permanent, you can put them in /etc/portage/package.use instead.
.LP
If \fBemerge \-\-update system\fR or \fBemerge \-\-update world\fR
del rawpuseforce
try:
- mygcfg_dlists = [getconfig(os.path.join(x, "make.globals")) \
- for x in self.profiles + [os.path.join(config_root + EPREFIX, "etc")]]
- self.mygcfg = stack_dicts(mygcfg_dlists, incrementals=portage_const.INCREMENTALS, ignore_none=1)
+ self.mygcfg = getconfig(os.path.join(config_root + EPREFIX, "etc", "make.globals"))
if self.mygcfg is None:
self.mygcfg = {}
apply_secpass_permissions(fpath, uid=myuid, gid=mygid,
mode=mystat.st_mode, stat_cached=mystat,
follow_links=False)
- mycommand = " ".join([MISC_SH_BINARY, "install_qa_check"])
+ mycommand = " ".join([MISC_SH_BINARY, "install_qa_check", "install_symlink_html_docs"])
qa_retval = spawn(mycommand, mysettings, debug=debug, logfile=logfile, **kwargs)
if qa_retval:
writemsg("!!! install_qa_check failed; exiting.\n",
"""Calls pkgsplit on a cpv and returns only the cp."""
return pkgsplit(mycpv)[0]
-
def dep_virtual(mysplit, mysettings):
"Does virtual dependency conversion"
newsplit=[]
import portage_exception
from portage_versions import catpkgsplit, catsplit, pkgcmp, pkgsplit, ververify
+def cpvequal(cpv1, cpv2):
+ split1 = catpkgsplit(cpv1)
+ split2 = catpkgsplit(cpv2)
+
+ if not split1 or not split2:
+ raise portage_exception.PortageException("Invalid data '%s, %s', parameter was not a CPV" % (cpv1, cpv2))
+
+ if split1[0] != split2[0]:
+ return False
+
+ return (pkgcmp(split1[1:], split2[1:]) == 0)
+
def strip_empty(myarr):
"""
Strip all empty elements from an array
mylist.append(x)
elif operator == "=": # Exact match
- if mycpv in candidate_list:
- mylist = [mycpv]
+ mylist = [cpv for cpv in candidate_list if cpvequal(cpv, mycpv)]
elif operator == "=*": # glob match
- # The old verion ignored _tag suffixes... This one doesn't.
+ # XXX: Nasty special casing for leading zeros
+ # Required as =* is a literal prefix match, so can't
+ # use vercmp
+ mysplit = catpkgsplit(mycpv)
+ myver = mysplit[2].lstrip("0")
+ if not myver or not myver[0].isdigit():
+ myver = "0"+myver
+ mycpv = mysplit[0]+"/"+mysplit[1]+"-"+myver
for x in candidate_list:
- if x[0:len(mycpv)] == mycpv:
+ xs = catpkgsplit(x)
+ myver = xs[2].lstrip("0")
+ if not myver or not myver[0].isdigit():
+ myver = "0"+myver
+ xcpv = xs[0]+"/"+xs[1]+"-"+myver
+ if xcpv.startswith(mycpv):
mylist.append(x)
elif operator == "~": # version, any revision, match
for x in candidate_list:
xs = catpkgsplit(x)
- if xs[0:2] != mycpv_cps[0:2]:
+ if not cpvequal(xs[0]+"/"+xs[1]+"-"+xs[2], mycpv_cps[0]+"/"+mycpv_cps[1]+"-"+mycpv_cps[2]):
continue
if xs[2] != ver:
continue