Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 670804 - app-portage/repoman-2.3.12: KEYWORDS.unsorted check should show expected order for copy/paste
Summary: app-portage/repoman-2.3.12: KEYWORDS.unsorted check should show expected orde...
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2018-11-10 00:59 UTC by Zac Medico
Modified: 2022-07-12 03:18 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2018-11-10 00:59:21 UTC
The sort_keywords function used by the KEYWORDS.unsorted expects keywords to be sorted by suffix, for example:

~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x64-solaris

Since this may not be obvious to people encountering the error, it would be better if it displayed the expected order for copy/paste. Also, an explanation of the suffix sort algorithm in the man page could be helpful. Suggested patch for copy/paste output:

> diff --git a/repoman/lib/repoman/modules/scan/keywords/keywords.py b/repoman/lib/repoman/modules/scan/keywords/keywords.py
> index 556f352ad..4e1f5f37e 100644
> --- a/repoman/lib/repoman/modules/scan/keywords/keywords.py
> +++ b/repoman/lib/repoman/modules/scan/keywords/keywords.py
> @@ -151,8 +151,8 @@ class KeywordChecks(ScanBase):
>  		sorted_keywords = sorted(ebuild.keywords, key=sort_keywords)
>  		if sorted_keywords != ebuild.keywords:
>  			self.qatracker.add_error("KEYWORDS.unsorted",
> -				"%s/%s.ebuild contains unsorted keywords" %
> -				(xpkg, y_ebuild))
> +				"%s/%s.ebuild contains unsorted keywords (expected: \"%s\")" %
> +				(xpkg, y_ebuild, ' '.join(sorted_keywords)))
>  
>  	@property
>  	def runInPkgs(self):
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-12 03:18:32 UTC
repoman support has been removed per bug 835013.

Please file a new bug (or, I suppose, reopen this one) if you feel this check is still applicable to pkgcheck and doesn't already exist.