pkgcheck

Synopsis

pkgcheck [-h] [–version] [–debug] [-q] [-v] [–color BOOLEAN] [–add-config SECTION KEY VALUE] [–new-config SECTION KEY VALUE] [–empty-config] [–config PATH] [–domain DOMAIN] {scan,cache,replay,show} …

Description

pkgcheck is a QA utility based on pkgcore(5) that supports scanning ebuild repositories for various issues.

Base Options

-h, --help Show this help message and exit. To get more information see the related man page.
--version

Show this program’s version information and exit.

When running from within a git repo or a version installed from git the latest commit hash and date will be shown.

--debug Enable debug checks and show verbose debug output.
-q, --quiet Suppress non-error, informational messages.
-v, --verbose Increase the verbosity of various output.
--color BOOLEAN
 Toggle colored output support. This can be used to forcibly enable color support when piping output or other sitations where stdout is not a tty.

Config Options

–add-config SECTION KEY VALUE
modify an existing configuration section
–new-config SECTION KEY VALUE
add a new configuration section
--empty-config do not load user/system configuration
--config PATH override location of config files
--domain DOMAIN
 domain to use for this operation

Subcommands

check applets

Keywords

List of result keywords that can be produced by pkgcheck.

Commit scope

MissingSignOff

Local commit with missing sign offs.

Sign offs are required for commits as specified by GLEP 76 [1].

[1]https://www.gentoo.org/glep/glep-0076.html#certificate-of-origin

Repository scope

ConflictingAccountIdentifiers

Same UID/GID is used by multiple packages.

ArchesWithoutProfiles

Arches without corresponding profile listings.

LaggingProfileEapi

Profile has an EAPI that is older than one of its parents.

NonexistentProfilePath

Specified profile path in profiles.desc doesn’t exist.

ProfileError

Erroneously formatted data in various profile files.

ProfileWarning

Badly formatted data in various profile files.

UnknownCategories

Category directories that aren’t listed in a repo’s categories.

Or the categories of the repo’s masters as well.

UnknownProfilePackageKeywords

Profile files include package keywords that don’t exist.

UnknownProfilePackageUse

Profile files include entries with USE flags that aren’t used on any matching packages.

UnknownProfilePackages

Profile files include package entries that don’t exist in the repo.

UnknownProfileUse

Profile files include USE flags that don’t exist.

UnusedProfileDirs

Unused profile directories detected.

BinaryFile

Binary file found in the repository.

EmptyCategoryDir

Empty category directory in the repository.

EmptyPackageDir

Empty package directory in the repository.

BadPackageUpdate

Badly formatted package update in profiles/updates files.

EmptyProject

A project has no developers.

MovedPackageUpdate

Entry for package already moved in profiles/updates files.

MultiMovePackageUpdate

Entry for package moved multiple times in profiles/updates files.

OldMultiMovePackageUpdate

Old entry for removed package moved multiple times in profiles/updates files.

This means that the reported pkg has been moved at least three times and finally removed from the tree. All the related lines should be removed from the update files.

OldPackageUpdate

Old entry for removed package in profiles/updates files.

PotentialGlobalUse

Local USE flag is a potential global USE flag.

PotentialLocalUse

Global USE flag is a potential local USE flag.

UnknownLicenses

License(s) listed in license group(s) that don’t exist.

UnusedEclasses

Unused eclasses detected.

UnusedGlobalUse

Unused use.desc flag(s).

UnusedLicenses

Unused license(s) detected.

UnusedMirrors

Unused mirrors detected.

Category scope

CatBadlyFormedXml

Badly formed category metadata.xml.

CatInvalidXml

Invalid category metadata.xml.

CatMetadataXmlEmptyElement

Empty element in category metadata.xml file.

CatMetadataXmlIndentation

Inconsistent indentation in category metadata.xml file.

Either all tabs or all spaces should be used, not a mixture of both.

CatMetadataXmlInvalidCatRef

Invalid category reference in category metadata.xml.

CatMetadataXmlInvalidPkgRef

Invalid package reference in category metadata.xml.

CatMissingMetadataXml

Category is missing metadata.xml.

Package scope

BadCommitSummary

Local package commit with poorly formatted or unmatching commit summary.

Git commit messages for packages should be formatted in the standardized fashion described in the devmanual [2]. Specifically, a ${CATEGORY}/${PN}: or ${CATEGORY}/${P}: prefix should be used in the summary relating to the modified package.

[2]https://devmanual.gentoo.org/ebuild-maintenance/git/#git-commit-message-format

DirectNoMaintainer

Directly added, new package with no specified maintainer.

DroppedStableKeywords

Stable keywords dropped from package.

DroppedUnstableKeywords

Unstable keywords dropped from package.

MatchingGlobalUse

Local USE flag description matches a global USE flag.

ProbableGlobalUse

Local USE flag description closely matches a global USE flag.

ProbableUseExpand

Local USE flag that isn’t overridden matches a USE_EXPAND group.

The local USE flag starts with a prefix reserved to USE_EXPAND group, yet it is not a globally defined member of this group. According to the standing policy [3], all possible values for each USE_EXPAND must be defined and documented globally.

This warning can be fixed via moving the local flag description into appropriate profiles/desc file.

[3]https://devmanual.gentoo.org/general-concepts/use-flags/

UnderscoreInUseFlag

USE flag uses underscore that is reserved for USE_EXPAND.

The USE flag name uses underscore. However, according to PMS underscores are reserved for USE_EXPAND flags [4]. The recommended replacement is hyphen (‘-‘).

[4]https://projects.gentoo.org/pms/7/pms.html#x1-200003.1.4

UnusedLocalUse

Unused local USE flag(s).

EmptyMaintainer

Package with neither a maintainer or maintainer-needed comment in metadata.xml.

MaintainerWithoutProxy

Package has a proxied maintainer without a proxy.

All package maintainers have non-@gentoo.org e-mail addresses. Most likely, this means that the package is maintained by a proxied maintainer but there is no explicit proxy (developer or project) listed. This means no Gentoo developer will be CC-ed on bug reports, and most likely no developer oversees the proxied maintainer’s activity.

NonexistentProjectMaintainer

Package specifying nonexistent project as a maintainer.

PkgBadlyFormedXml

Badly formed package metadata.xml.

PkgInvalidXml

Invalid package metadata.xml.

PkgMetadataXmlEmptyElement

Empty element in package metadata.xml file.

PkgMetadataXmlIndentation

Inconsistent indentation in package metadata.xml file.

Either all tabs or all spaces should be used, not a mixture of both.

PkgMetadataXmlInvalidCatRef

Invalid category reference in package metadata.xml.

PkgMetadataXmlInvalidPkgRef

Invalid package reference in package metadata.xml.

PkgMissingMetadataXml

Package is missing metadata.xml.

StaleProxyMaintProject

Package lists proxy-maint project but has no proxied maintainers.

The package explicitly lists proxy-maint@g.o as the only maintainer. Most likely, this means that the proxied maintainer has been removed but proxy-maint was left over.

WrongMaintainerType

A person-type maintainer matches an existing project.

BannedCharacter

File or directory name doesn’t abide by GLEP 31 requirements.

See the official GLEP 31 documentation [5] for details.

[5]https://www.gentoo.org/glep/glep-0031.html

DuplicateFiles

Two or more identical files in FILESDIR.

EmptyFile

File in FILESDIR is empty.

EqualVersions

Ebuilds that have equal versions.

For example, cat/pn-1.0.2, cat/pn-1.0.2-r0, cat/pn-1.0.2-r00 and cat/pn-1.000.2 all have equal versions according to PMS and therefore shouldn’t exist in the same repository.

ExecutableFile

File has executable bit, but doesn’t need it.

InvalidPN

Ebuilds that have invalid package names.

InvalidUTF8

File isn’t UTF-8 compliant.

MismatchedPN

Ebuilds that have different names than their parent directory.

SizeViolation

File in $FILESDIR is too large (current limit is 20k).

UnknownPkgDirEntry

Unknown files or directories in package directory.

Relevant for the gentoo repo only since the spec states that a package directory may contain other files or directories.

UnknownManifest

Manifest entries not matching any SRC_URI targets.

UnnecessaryManifest

Manifest entries for non-DIST targets on a repo with thin manifests enabled.

UnstableOnly

Package/keywords that are strictly unstable.

Version scope

MissingAccountIdentifier

UID/GID can not be found in account package.

OutsideRangeAccountIdentifier

UID/GID outside allowed allocation range.

RedundantVersion

Redundant version(s) of a package in a specific slot.

BannedEapiCommand

Ebuild uses a banned EAPI command.

DeprecatedEapiCommand

Ebuild uses a deprecated EAPI command.

DeprecatedInsinto

Ebuild uses insinto where more compact commands exist.

DoublePrefixInPath

Ebuild uses two consecutive paths including EPREFIX.

Ebuild combines two path variables (or a variable and a getter), both of which include EPREFIX, resulting in double prefixing. This is the case when combining many pkg-config-based or alike getters with ED or EROOT.

For example, ${ED}$(python_get_sitedir) should be replaced with ${D}$(python_get_sitedir).

HomepageInSrcUri

${HOMEPAGE} is referenced in SRC_URI.

SRC_URI is built on top of ${HOMEPAGE}. This is discouraged since HOMEPAGE is multi-valued by design, and is subject to potential changes that should not accidentally affect SRC_URI.

InvalidCopyright

Ebuild with invalid copyright.

The ebuild does not start with a valid copyright line. Each ebuild must start with a copyright line of the form:

# Copyright YEARS MAIN-CONTRIBUTOR [OTHER-CONTRIBUTOR]… [and others]

Ebuilds in the Gentoo repository must use:

# Copyright YEARS Gentoo Authors

InvalidLicenseHeader

Ebuild with invalid license header.

The ebuild does not have with a valid license header.

Ebuilds in the Gentoo repository must use:

# Distributed under the terms of the GNU General Public License v2

MissingSlash

Ebuild uses a path variable missing a trailing slash.

NonGentooAuthorsCopyright

Ebuild with copyright stating owner other than “Gentoo Authors”.

The ebuild specifies explicit copyright owner, while the Gentoo repository policy specifies that all ebuilds must use “Gentoo Authors”. If the owner is not listed in metadata/AUTHORS, addition can be requested via bugs.gentoo.org.

ObsoleteUri

URI used is obsolete.

The URI used to fetch distfile is obsolete and can be replaced by something more modern. Note that the modern replacement usually results in different file contents, so you need to rename it (to avoid mirror collisions with the old file) and update the ebuild (for example, by removing no longer necessary vcs-snapshot.eclass).

OldGentooCopyright

Ebuild with old Gentoo Foundation copyright.

The ebuild still assigns copyright to the Gentoo Foundation even though it has been committed after the new copyright policy was approved (2018-10-21).

The ebuilds in Gentoo repository must use ‘Gentoo Authors’ instead. Ebuilds in other repositories may specify an explicit copyright holder instead.

StaticSrcUri

SRC_URI contains static value instead of the dynamic equivalent.

UnnecessarySlashStrip

Ebuild uses a path variable that strips a nonexistent slash.

VariableInHomepage

HOMEPAGE includes a variable.

DroppedKeywords

Arch keywords dropped during version bumping.

DeprecatedEclass

Package uses an eclass that is deprecated/abandoned.

DuplicateEclassInherits

An ebuild directly inherits the same eclass multiple times.

Note that this will flag ebuilds that conditionalize global metadata by package version (or some other fashion) while inheriting the same eclass under both branches, e.g. conditional live ebuilds. In this case, shared eclasses should be loaded in a separate, unconditional inherit call.

DirectStableKeywords

Newly committed ebuild with stable keywords.

OutdatedCopyright

Changed ebuild with outdated copyright.

VulnerablePackage

Packages marked as vulnerable by GLSAs.

LaggingStable

Stable arches for stabilized package that are lagging from a stabling standpoint.

PotentialStable

Stable arches with potential stable package candidates.

BadDependency

Package dependency is bad for some reason.

BadDescription

Package’s description is bad for some reason.

BadFilename

URI uses unspecific or poor filename(s).

Archive filenames should be disambiguated using -> to rename them.

BadHomepage

A package’s HOMEPAGE is bad for some reason.

See the HOMEPAGE ebuild variable entry in the devmanual [6] for more information.

[6]https://devmanual.gentoo.org/ebuild-writing/variables/#ebuild-defined-variables

BadKeywords

Packages using -* should use package.mask instead.

BadProtocol

URI uses an unsupported protocol.

Valid protocols are currently: http, https, and ftp

BannedEapi

Package’s EAPI is banned according to repo metadata.

DeprecatedEapi

Package’s EAPI is deprecated according to repo metadata.

DeprecatedPkg

Package dependency is flagged in profiles/package.deprecated.

DuplicateKeywords

Packages having duplicate KEYWORDS.

InvalidBdepend

Package has invalid BDEPEND.

InvalidDepend

Package has invalid DEPEND.

InvalidEapi

Package’s EAPI is invalid.

InvalidLicense

Package’s LICENSE is invalid.

InvalidPdepend

Package has invalid PDEPEND.

InvalidProperties

Package’s PROPERTIES is invalid.

InvalidRdepend

Package has invalid RDEPEND.

InvalidRequiredUse

Package’s REQUIRED_USE is invalid.

InvalidRestrict

Package’s RESTRICT is invalid.

InvalidSlot

Package’s SLOT is invalid.

InvalidSrcUri

Package’s SRC_URI is invalid.

InvalidUseFlags

Package IUSE contains invalid USE flags.

MissingLicense

Package has no LICENSE defined.

MissingLicenseFile

Used license(s) have no matching license file(s).

MissingLicenseRestricts

Restrictive license used without matching RESTRICT.

MissingPackageRevision

Missing package revision in =cat/pkg dependencies.

The dependency string uses the = operator without specifying a revision. This means that only -r0 of the dependency will be matched, and newer revisions of the same ebuild will not be accepted.

If any revision of the package is acceptable, the ~ operator should be used instead of =. If only the initial revision of the dependency is allowed, -r0 should be appended in order to make the intent explicit.

MissingSlotDep

Missing slot value in dependencies.

The package dependency does not specify a slot but the target package has multiple slots. The behavior for satisfying this kind of dependency is not strictly defined, and may result in either any or the newest package slot being accepted.

Please verify whether the package works with all the dependency slots. If only one slot is actually acceptable, specify it explicitly. If multiple slots are acceptable, please use either := or explicit :* slot operator. The operators are described in detail in the devmanual [7].

[7]https://devmanual.gentoo.org/general-concepts/dependencies/#slot-dependencies

MissingTestRestrict

Missing RESTRICT="!test? ( test )".

Traditionally, it was assumed that IUSE=test is a special flag that is implicitly enabled when running src_test() is enabled. However, this is not standarized and packages need to explicitly specify RESTRICT="!test? ( test )" in order to guarantee that test phase will be skipped when the flag is disabled and therefore test dependencies may not be installed.

MissingUnpackerDep

Missing dependency on a required unpacker package.

Package uses an archive format for which an unpacker is not provided by the system set, and lacks an explicit dependency on the unpacker package.

MissingUri

RESTRICT=fetch isn’t set, yet no full URI exists.

MissingUseDepDefault

Package dependencies with USE dependencies missing defaults.

MissingVirtualKeywords

Virtual packages with keywords missing from their dependencies.

NonexistentBlocker

No matches for blocker dependency in repo history.

For the gentoo repo this means it was either removed before the CVS -> git transition (which occurred around 2015-08-08) or it never existed at all.

Note that this ignores slot/subslot deps and USE deps in blocker atoms.

OutdatedBlocker

Blocker dependency removed more than two years ago from the tree.

Note that this ignores slot/subslot deps and USE deps in blocker atoms.

OverlappingKeywords

Packages having overlapping arch and ~arch KEYWORDS.

RequiredUseDefaults

Default USE flag settings don’t satisfy REQUIRED_USE.

The REQUIRED_USE constraints specified in the ebuild are not satisfied by the default USE flags used in one or more profiles. This means that users on those profiles may be unable to install the package out of the box, without having to modify package.use.

This warning is usually fixed via using IUSE defaults to enable one of the needed flags, modifying package.use in the most relevant profiles or modifying REQUIRED_USE.

SourcingError

Failed sourcing ebuild.

TarballAvailable

URI uses .zip archive when .tar* is available.

Tarballs should be preferred over zip archives due to better compression and no extra unpack dependencies.

UnknownKeywords

Packages using unknown KEYWORDS.

UnknownMirror

URI uses an unknown mirror.

UnknownProperties

Package’s PROPERTIES metadata has unknown entries.

UnknownRestrict

Package’s RESTRICT metadata has unknown entries.

UnknownUseFlags

Package IUSE contains unknown USE flags.

UnnecessaryLicense

LICENSE defined for package that is license-less.

UnsortedKeywords

Packages with unsorted KEYWORDS.

KEYWORDS should be sorted in alphabetical order with prefix keywords (those with hyphens in them, e.g. amd64-fbsd) after regular arches and globs (e.g. -*) before them.

UnstatedIuse

Package is reliant on conditionals that aren’t in IUSE.

DeadHomepage

Package with a dead HOMEPAGE.

DeadSrcUrl

Package with a dead SRC_URI target.

HttpsUrlAvailable

URL uses http:// when https:// is available.

RedirectedHomepage

Package with a HOMEPAGE that permanently redirects to a different site.

RedirectedSrcUrl

Package with a SRC_URI target that permanently redirects to a different site.

SSLCertificateError

Package with https:// HOMEPAGE with an invalid SSL cert.

UnusedInMastersEclasses

Eclasses detected that are unused in the master repo(s).

In other words, they’re likely to be removed so should be copied to the overlay.

UnusedInMastersGlobalUse

Global USE flags detected that are unused in the master repo(s).

In other words, they’re likely to be removed so should be copied to the overlay.

UnusedInMastersLicenses

Licenses detected that are unused in the master repo(s).

In other words, they’re likely to be removed so should be copied to the overlay.

UnusedInMastersMirrors

Mirrors detected that are unused in the master repo(s).

In other words, they’re likely to be removed so should be copied to the overlay.

MismatchedPerlVersion

A package’s normalized perl module version doesn’t match its $PV.

MissingPythonEclass

Package depends on Python but does not use the eclasses.

All packages depending on Python are required to use one of the following python eclasses: python-r1, python-single-r1, or python-any-r1. For documentation on choosing the correct eclass, please see the Python project wiki page on eclasses [8].

[8]https://wiki.gentoo.org/wiki/Project:Python/Eclasses

PythonEclassError

Generic python eclass error.

PythonMissingDeps

Package is missing PYTHON_DEPS.

The python-r1 and python-single-r1 eclasses require the packages to explicitly reference ${PYTHON_DEPS} in RDEPEND (and DEPEND, if necessary); python-any-r1 requires it in DEPEND.

If Python is used conditionally, the dependency can be wrapped in appropriate USE conditionals.

PythonMissingRequiredUse

Package is missing PYTHON_REQUIRED_USE.

The python-r1 and python-single-r1 eclasses require the packages to explicitly specify REQUIRED_USE=${PYTHON_REQUIRED_USE}. If Python is used conditionally, it can be wrapped in appropriate USE conditionals.

PythonRuntimeDepInAnyR1

Package depends on Python at runtime but uses any-r1 eclass.

The python-any-r1 eclass is meant to be used purely for build-time dependencies on Python. However, this package lists Python as a runtime dependency. If this is intentional, the package needs to switch to python-r1 or python-single-r1 eclass, otherwise the runtime dependency should be removed.

PythonSingleUseMismatch

Package has mismatched PYTHON_SINGLE_TARGET and PYTHON_TARGETS flags.

The package declares both PYTHON_SINGLE_TARGET and PYTHON_TARGETS flags but each includes a different set of supported Python implementations. This either indicates a bug in the eclasses or the package is manually changing the flags.

ConflictingChksums

Checksum conflict detected between two files.

DeprecatedChksum

A file in the chksum data does not use modern checksum set.

MatchingChksums

Two distfiles share the same checksums but use different names.

MissingChksum

A file in the chksum data lacks required checksums.

MissingManifest

SRC_URI targets missing from Manifest file.

StableRequest

Unstable package added over thirty days ago that could be stabilized.

NonexistentDeps

No matches exist for a package dependency.

NonsolvableDepsInDev

No potential solution for dependency on dev profile.

NonsolvableDepsInExp

No potential solution for dependency on exp profile.

NonsolvableDepsInStable

No potential solution for dependency on stable profile.

UncheckableDep

Given dependency cannot be checked due to the number of transitive use deps in it.

VisibleVcsPkg

Package is VCS-based, but visible.

BadWhitespaceCharacter

Ebuild uses whitespace that isn’t a tab, newline, or single space.

DoubleEmptyLine

Unneeded blank lines found.

NoFinalNewline

Ebuild’s last line does not have a final newline.

TrailingEmptyLine

Unneeded trailing blank lines found.

WhitespaceFound

Leading or trailing whitespace found.

WrongIndentFound

Incorrect indentation whitespace found.

Checks

List of checks that can be selected to run.

By default, all checks that operate at the current scope or below will be run. In other words, if running inside a package directory in a repo, only checks that operate at a package or version scope will be run. On the other hand, when running against an entire repo, all defined checks will be run.

Commit scope

GitCommitsCheck

Check unpushed git commits for various issues.

(known result: MissingSignOff)

Repository scope

AcctCheck

Various checks for acct-* packages.

Verify that acct-* packages do not use conflicting, invalid or out-of-range UIDs/GIDs.

(known results: ConflictingAccountIdentifiers, MissingAccountIdentifier, OutsideRangeAccountIdentifier)

UnusedInMastersCheck

Check for various metadata that may be removed from master repos.

(known results: UnusedInMastersEclasses, UnusedInMastersGlobalUse, UnusedInMastersLicenses, UnusedInMastersMirrors)

ProfilesCheck

Scan repo profiles for unknown flags/packages.

(known results: ProfileError, ProfileWarning, UnknownProfilePackageKeywords, UnknownProfilePackageUse, UnknownProfilePackages, UnknownProfileUse)

RepoProfilesCheck

Scan repo for various profiles directory issues.

Including unknown arches in profiles, arches without profiles, and unknown categories.

(known results: ArchesWithoutProfiles, LaggingProfileEapi, NonexistentProfilePath, ProfileError, ProfileWarning, UnknownCategories, UnusedProfileDirs)

EmptyDirsCheck

Scan for empty category or package directories.

(known results: EmptyCategoryDir, EmptyPackageDir)

RepoDirCheck

Scan all files in the repository for issues.

(known result: BinaryFile)

GlobalUseCheck

Check global USE and USE_EXPAND flags for various issues.

(known results: PotentialGlobalUse, PotentialLocalUse, UnusedGlobalUse)

LicenseGroupsCheck

Scan license groups for unknown licenses.

(known result: UnknownLicenses)

ManifestCollisionCheck

Search Manifest entries for different types of distfile collisions.

In particular, search for matching filenames with different checksums and different filenames with matching checksums.

(known results: ConflictingChksums, MatchingChksums)

PackageUpdatesCheck

Scan profiles/updates/* for outdated entries and other issues.

(known results: BadPackageUpdate, MovedPackageUpdate, MultiMovePackageUpdate, OldMultiMovePackageUpdate, OldPackageUpdate)

ProjectMetadataCheck

Check projects.xml for issues.

(known result: EmptyProject)

UnusedEclassesCheck

Check for unused eclasses.

(known result: UnusedEclasses)

UnusedLicensesCheck

Check for unused license files.

(known result: UnusedLicenses)

UnusedMirrorsCheck

Check for unused mirrors.

(known result: UnusedMirrors)

Package scope

RedundantVersionCheck

Scan for overshadowed package versions.

Scan for versions that are likely shadowed by later versions from a keywords standpoint (ignoring live packages that erroneously have keywords).

Example: pkga-1 is keyworded amd64, pkga-2 is amd64. pkga-1 can potentially be removed.

(known result: RedundantVersion)

DroppedKeywordsCheck

Scan packages for keyword dropping across versions.

(known result: DroppedKeywords)

GitPkgCommitsCheck

Check unpushed git package commits for various issues.

(known results: BadCommitSummary, DirectNoMaintainer, DirectStableKeywords, DroppedStableKeywords, DroppedUnstableKeywords, OutdatedCopyright)

ImlateCheck

Scan for ebuilds that are lagging in stabilization.

(known results: LaggingStable, PotentialStable)

LocalUseCheck

Check local USE flags in metadata.xml for various issues.

(known results: MatchingGlobalUse, ProbableGlobalUse, ProbableUseExpand, UnderscoreInUseFlag, UnstatedIuse, UnusedLocalUse)

EqualVersionsCheck

Scan package ebuilds for semantically equal versions.

(known result: EqualVersions)

PkgDirCheck

Scan ebuild directory for various file-related issues.

(known results: BannedCharacter, DuplicateFiles, EmptyFile, ExecutableFile, InvalidPN, InvalidUTF8, MismatchedPN, SizeViolation, UnknownPkgDirEntry)

ManifestCheck

Manifest related checks.

Verify that the Manifest file exists, doesn’t have missing or extraneous entries, and that the required hashes are in use.

(known results: DeprecatedChksum, MissingChksum, MissingManifest, UnknownManifest, UnnecessaryManifest)

StableRequestCheck

Ebuilds that have sat unstable with no changes for over a month.

By default, only triggered for arches with stable profiles. To check additional arches outside the stable set specify them manually using the -a/–arches option.

Note that packages with no stable keywords won’t trigger this at all. Instead they’ll be caught by the UnstableOnly check.

(known result: StableRequest)

UnstableOnlyCheck

Scan for packages that have just unstable keywords.

(known result: UnstableOnly)

Version scope

AbsoluteSymlinkCheck

Scan ebuild for dosym absolute path usage instead of relative.

(known result: AbsoluteSymlink)

BadCommandsCheck

Scan ebuild for various deprecated and banned command usage.

(known results: BannedEapiCommand, DeprecatedEapiCommand)

EbuildHeaderCheck

Scan ebuild for incorrect copyright/license headers.

(known results: InvalidCopyright, InvalidLicenseHeader, NonGentooAuthorsCopyright, OldGentooCopyright)

InsintoCheck

Scan ebuild for deprecated insinto usage.

(known result: DeprecatedInsinto)

ObsoleteUriCheck

Scan ebuild for obsolete URIs.

(known result: ObsoleteUri)

PathVariablesCheck

Scan ebuild for path variables with various issues.

(known results: DoublePrefixInPath, MissingSlash, UnnecessarySlashStrip)

RawEbuildCheck

Scan raw ebuild content for various issues.

(known results: HomepageInSrcUri, StaticSrcUri, VariableInHomepage)

EclassCheck

Scan packages for various eclass-related issues.

(known results: DeprecatedEclass, DuplicateEclassInherits)

GlsaCheck

Scan for vulnerable ebuilds in the tree.

Requires a GLSA directory for vulnerability info.

(known result: VulnerablePackage)

DescriptionCheck

DESCRIPTION checks.

Check on length (<=150), too short (<10), or generic (lifted from eclass or just using the package’s name.

(known result: BadDescription)

EapiCheck

Scan for packages with banned or deprecated EAPIs.

(known results: BannedEapi, DeprecatedEapi)

HomepageCheck

HOMEPAGE checks.

(known result: BadHomepage)

IuseCheck

IUSE validity checks.

(known results: InvalidUseFlags, UnknownUseFlags)

KeywordsCheck

Check package keywords for sanity; empty keywords, and -* are flagged.

(known results: BadKeywords, DuplicateKeywords, MissingVirtualKeywords, OverlappingKeywords, UnknownKeywords, UnsortedKeywords)

MissingSlotDepCheck

Check for missing slot dependencies.

(known result: MissingSlotDep)

MissingUnpackerDepCheck

Check whether package is missing unpacker dependencies.

(known result: MissingUnpackerDep)

PropertiesCheck

PROPERTIES related checks.

(known results: InvalidProperties, UnknownProperties, UnstatedIuse)

RequiredUseCheck

REQUIRED_USE validity checks.

(known results: InvalidRequiredUse, RequiredUseDefaults, UnstatedIuse)

RestrictCheck

RESTRICT related checks.

(known results: InvalidRestrict, UnknownRestrict, UnstatedIuse)

RestrictTestCheck

Check whether packages specify RESTRICT=”!test? ( test )”.

(known result: MissingTestRestrict)

SourcingCheck

Scan for packages with sourcing errors or invalid, sourced metadata variables.

(known results: InvalidEapi, InvalidSlot, SourcingError)

SrcUriCheck

SRC_URI related checks.

Verify that URIs are valid, fetchable, using a supported protocol, and don’t use unspecific filenames.

(known results: BadFilename, BadProtocol, InvalidSrcUri, MissingUri, TarballAvailable, UnknownMirror, UnstatedIuse)

FetchablesUrlCheck

Various SRC_URI related checks that require internet access.

(known results: DeadSrcUrl, HttpsUrlAvailable, RedirectedSrcUrl, SSLCertificateError)

HomepageUrlCheck

Various HOMEPAGE related checks that require internet access.

(known results: DeadHomepage, HttpsUrlAvailable, RedirectedHomepage, SSLCertificateError)

PerlCheck

Perl ebuild related checks.

(known result: MismatchedPerlVersion)

PythonCheck

Python eclass checks.

Check whether Python eclasses are used for Python packages, and whether they don’t suffer from common mistakes.

(known results: MissingPythonEclass, PythonEclassError, PythonMissingDeps, PythonMissingRequiredUse, PythonRuntimeDepInAnyR1, PythonSingleUseMismatch)

VisibilityCheck

Visibility dependency scans.

Check that at least one solution is possible for a pkg, checking all profiles (defined by arch.list) visibility modifiers per stable/unstable keyword.

(known results: NonexistentDeps, NonsolvableDepsInDev, NonsolvableDepsInExp, NonsolvableDepsInStable, UncheckableDep, VisibleVcsPkg)

WhitespaceCheck

Scan ebuild for useless whitespace.

(known results: BadWhitespaceCharacter, DoubleEmptyLine, NoFinalNewline, TrailingEmptyLine, WhitespaceFound, WrongIndentFound)

Reporters

BinaryPickleStream

Dump a binary pickle stream using the highest pickling protocol.

Unlike PickleStream which uses the most compatible pickling protocol available, this uses the newest version so it won’t be compatible with older versions of Python.

For more details of the stream, see PickleStream.

CsvReporter

Comma-separated value reporter, convenient for shell processing.

Example:

,,,"global USE flag 'big-endian' is a potential local, used by 1 package: dev-java/icedtea-bin"
sys-apps,portage,2.1-r2,sys-apps/portage-2.1-r2.ebuild has whitespace in indentation on line 169
sys-apps,portage,2.1-r2,"rdepend  ppc-macos: unsolvable default-darwin/macos/10.4, solutions: [ >=app-misc/pax-utils-0.1.13 ]"
sys-apps,portage,2.1-r2,"no change in 75 days, keywords [ ~x86-fbsd ]"

FancyReporter

grouped colored output

Example:

sys-apps/portage
  WrongIndentFound: sys-apps/portage-2.1-r2.ebuild has whitespace in indentation on line 169
  NonsolvableDeps: sys-apps/portage-2.1-r2: rdepend  ppc-macos: unsolvable default-darwin/macos/10.4, solutions: [ >=app-misc/pax-utils-0.1.13 ]
  StableRequest: sys-apps/portage-2.1-r2: no change in 75 days, keywords [ ~x86 ]

FormatReporter

Custom format string reporter.

JsonReporter

Dump a json feed of reports.

Note that the format is newline-delimited JSON with each line being related to a separate report. To merge the objects together a tool such as jq can be leveraged similar to the following:

jq -c -s 'reduce.[]as$x({};.*$x)' orig.json > new.json

JsonStream

Generate a stream of result objects serialized in JSON.

NullReporter

Reporter used for timing tests; no output.

PickleStream

Generate a stream of pickled objects using the original pickling protocol.

For each specific target for checks, a header is pickled detailing the checks used, possible results, and search criteria.

This reporter uses the original “human-readable” protocol that is backwards compatible with earlier versions of Python.

StrReporter

Simple string reporter, pkgcheck-0.1 behaviour.

Example:

sys-apps/portage-2.1-r2: sys-apps/portage-2.1-r2.ebuild has whitespace in indentation on line 169
sys-apps/portage-2.1-r2: rdepend  ppc-macos: unsolvable default-darwin/macos/10.4, solutions: [ >=app-misc/pax-utils-0.1.13 ]
sys-apps/portage-2.1-r2: no change in 75 days, keywords [ ~x86-fbsd ]

XmlReporter

dump an xml feed of reports

Reporting Bugs

Please submit an issue via github:

https://github.com/pkgcore/pkgcheck/issues

You can also stop by #pkgcore on freenode.

See Also

pkgcore(5)