-#!/bin/bash
+#!@PORTAGE_BASH@
- # Copyright 1999-2008 Gentoo Foundation
+ # Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# Author: Karl Trygve Kalleberg <karltk@gentoo.org>
# Rewritten from the old, Perl-based emerge-webrsync script
mreasons.append(_MaskReason("CHOST", "CHOST: %s" % \
pkg.metadata["CHOST"]))
- if pkg.metadata["REQUIRED_USE"] and \
- eapi_has_required_use(pkg.metadata["EAPI"]):
- required_use = pkg.metadata["REQUIRED_USE"]
- if use is None:
- use = pkg.use.enabled
- try:
- required_use_is_sat = check_required_use(
- required_use, use, pkg.iuse.is_valid_flag)
- except portage.exception.InvalidDependString:
- mreasons.append(_MaskReason("invalid", "invalid: REQUIRED_USE"))
- else:
- if not required_use_is_sat:
- msg = "violated use flag constraints: '%s'" % required_use
- mreasons.append(_MaskReason("REQUIRED_USE", "REQUIRED_USE violated"))
-
+ if pkg.built and not pkg.installed:
+ if not "EPREFIX" in pkg.metadata or not pkg.metadata["EPREFIX"]:
+ mreasons.append("missing EPREFIX")
+ elif len(pkg.metadata["EPREFIX"].strip()) < len(pkgsettings["EPREFIX"]):
+ mreasons.append("EPREFIX: '%s' too small" % pkg.metadata["EPREFIX"])
+
if pkg.invalid:
for msg_type, msgs in pkg.invalid.items():
for msg in msgs: