# Unset some variables that break things.
unset GZIP BZIP BZIP2 CDPATH GREP_OPTIONS GREP_COLOR GLOBIGNORE
-#export PATH="/usr/local/sbin:/sbin:/usr/sbin:$PORTAGE_BIN_PATH/ebuild-helpers:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}"
+ROOTPATH=${ROOTPATH##:}
+ROOTPATH=${ROOTPATH%%:}
+PREROOTPATH=${PREROOTPATH##:}
+PREROOTPATH=${PREROOTPATH%%:}
+#PATH=$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin${ROOTPATH:+:}$ROOTPATH
# PREFIX: we deviate in path order, should we split up DEFAULT_PATH?
-export PATH="${DEFAULT_PATH}:$PORTAGE_BIN_PATH/ebuild-helpers:${ROOTPATH}"
-[ ! -z "$PREROOTPATH" ] && export PATH="${PREROOTPATH%%:}:$PATH"
+PATH="$PORTAGE_BIN_PATH/ebuild-helpers:$PREROOTPATH${PREROOTPATH:+:}${DEFAULT_PATH}:${ROOTPATH:+:}$ROOTPATH"
+export PATH
source "${PORTAGE_BIN_PATH}/isolated-functions.sh" &>/dev/null
SANDBOX_DEBUG_LOG SANDBOX_DISABLED SANDBOX_LIB
SANDBOX_LOG SANDBOX_ON"
filtered_vars="${readonly_bash_vars} ${READONLY_PORTAGE_VARS}
- BASH_.* PATH POSIXLY_CORRECT"
+ BASH_.* HISTFILE PATH POSIXLY_CORRECT"
if hasq --filter-sandbox $* ; then
filtered_vars="${filtered_vars} SANDBOX_.*"
else
;;
esac
- #export PATH="/usr/local/sbin:/sbin:/usr/sbin:${ebuild_helpers_path}:/usr/local/bin:/bin:/usr/bin:${ROOTPATH}"
+ #PATH=$ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}/usr/local/sbin:/sbin:/usr/sbin:/usr/local/bin:/bin:/usr/bin${ROOTPATH:+:}$ROOTPATH
# PREFIX: same deviation as at the top of this file
- export PATH="${DEFAULT_PATH}:${ebuild_helpers_path}:${ROOTPATH}"
- [[ -n $PREROOTPATH ]] && export PATH="${PREROOTPATH%%:}:$PATH"
+ PATH="$ebuild_helpers_path:$PREROOTPATH${PREROOTPATH:+:}${DEFAULT_PATH}${ROOTPATH:+:}$ROOTPATH"
unset ebuild_helpers_path
if ! hasq $EBUILD_SH_ARGS clean depend help info nofetch ; then
"LICENSE.missing":"Ebuilds that have a missing or empty LICENSE variable",
"DESCRIPTION.missing":"Ebuilds that have a missing or empty DESCRIPTION variable",
"DESCRIPTION.toolong":"DESCRIPTION is over %d characters" % max_desc_len,
+ "EAPI.definition":"EAPI is defined after an inherit call (must be defined before)",
"EAPI.incompatible":"Ebuilds that use features that are only available with a different EAPI",
"EAPI.unsupported":"Ebuilds that have an unsupported EAPI version (you must upgrade portage)",
"SLOT.missing":"Ebuilds that have a missing or empty SLOT variable",
.B DESCRIPTION.missing
Ebuilds that have a missing or empty DESCRIPTION variable
.TP
+.B EAPI.definition
+EAPI is defined after an inherit call (must be defined before)
+.TP
.B EAPI.incompatible
Ebuilds that use features that are only available with a different EAPI
.TP
|<-----dataN_offset----->|<--dataN_len->|
|<data1data2data3data...>|<data-we-want>|
.SH AUTHORS
-Lars Hartmann <lars<at>chaotika<dot>org>
+Lars Hartmann <lars@chaotika.org>
+.SH "SEE ALSO"
+.BR qtbz2 (1),
+.BR quickpkg (1),
+.BR qxpak (1)
# variables that break bash
_environ_filter += [
- "POSIXLY_CORRECT",
+ "HISTFILE", "POSIXLY_CORRECT",
]
# portage config variables and variables set directly by portage
elif self.method_re.match(line):
self.check_next_line = True
+class EapiDefinition(LineCheck):
+ """ Check that EAPI is defined before inherits"""
+ repoman_check_name = 'EAPI.definition'
+
+ eapi_re = re.compile(r'^EAPI=')
+ inherit_re = re.compile(r'^\s*inherit\s')
+
+ def new(self, pkg):
+ self.inherit_line = None
+
+ def check(self, num, line):
+ if self.eapi_re.match(line) is not None:
+ if self.inherit_line is not None:
+ return errors.EAPI_DEFINED_AFTER_INHERIT
+ elif self.inherit_re.match(line) is not None:
+ self.inherit_line = line
+
class EbuildPatches(LineCheck):
"""Ensure ebuilds use bash arrays for PATCHES to ensure white space safety"""
repoman_check_name = 'ebuild.patches'
EbuildHeader, EbuildWhitespace, EbuildQuote,
EbuildAssignment, EbuildUselessDodoc,
EbuildUselessCdS, EbuildNestedDie,
- EbuildPatches, EbuildQuotedA,
+ EbuildPatches, EbuildQuotedA, EapiDefinition,
IUseUndefined, ImplicitRuntimeDeps, InheritAutotools,
EMakeParallelDisabled, EMakeParallelDisabledViaMAKEOPTS,
DeprecatedBindnowFlags, WantAutoDefaultValue)))
EMAKE_PARALLEL_DISABLED = 'Upstream parallel compilation bug (ebuild calls emake -j1 on line: %d)'
EMAKE_PARALLEL_DISABLED_VIA_MAKEOPTS = 'Upstream parallel compilation bug (MAKEOPTS=-j1 on line: %d)'
DEPRECATED_BINDNOW_FLAGS = 'Deprecated bindnow-flags call on line: %d'
+EAPI_DEFINED_AFTER_INHERIT = 'EAPI defined after inherit on line: %d'