diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-05-29 14:07:20 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-05-29 14:10:20 -0400 |
commit | 88d6dc75db97ab9f0d9d4d0d3a8bb08a9787ae44 (patch) | |
tree | 2705087049fbf7ed537c7c9366a125cf474fa6eb | |
parent | eb7d83994532ab989611f7ab165638699f1bff8d (diff) | |
download | rpmlint-88d6dc75db97ab9f0d9d4d0d3a8bb08a9787ae44.tar.gz rpmlint-88d6dc75db97ab9f0d9d4d0d3a8bb08a9787ae44.tar.bz2 rpmlint-88d6dc75db97ab9f0d9d4d0d3a8bb08a9787ae44.zip |
create groups from domains
-rw-r--r-- | TagsCheck.py | 32 | ||||
-rw-r--r-- | packaging/rpmgroups.config | 19 | ||||
-rw-r--r-- | packaging/rpmlint.spec | 2 |
3 files changed, 43 insertions, 10 deletions
diff --git a/TagsCheck.py b/TagsCheck.py index f9368f1..f43e7bd 100644 --- a/TagsCheck.py +++ b/TagsCheck.py @@ -401,7 +401,9 @@ BAD_WORDS = { DEFAULT_INVALID_REQUIRES = ('^is$', '^not$', '^owned$', '^by$', '^any$', '^package$', '^libsafe\.so\.') VALID_GROUPS = Config.getOption('ValidGroups', None) -INVALID_PLACEHOLDERS = Config.getOption('Placeholders', None) +VALID_DOMAINS = Config.getOption('ValidDomains', None) +VALID_SUBDOMAINS = Config.getOption('ValidSubDomains', None) + if VALID_GROUPS is None: # get defaults from rpm package only if it's not set VALID_GROUPS = Pkg.get_default_valid_rpmgroups() VALID_LICENSES = Config.getOption('ValidLicenses', DEFAULT_VALID_LICENSES) @@ -705,17 +707,30 @@ class TagsCheck(AbstractCheck.AbstractCheck): for lang in pkg[rpm.RPMTAG_HEADERI18NTABLE]: self.check_description(pkg, lang, ignored_words) + valid_groups = VALID_GROUPS + app_groups = () + for d in VALID_DOMAINS: + if d == 'Applications': + for dd in ['Multimedia', 'Social', 'Web', 'Telephony', 'Messaging', 'PIM', 'Network', 'Navigation', 'Other', 'Game', 'Tasks', 'Music', 'Photo', 'Video']: + app_groups = app_groups + ("%s/%s" %(d,dd), ) + continue + for sd in VALID_SUBDOMAINS: + valid_groups = valid_groups + ("%s/%s" %(d,sd), ) + + valid_groups = valid_groups + app_groups + print sorted(valid_groups) + group = pkg[rpm.RPMTAG_GROUP] self._unexpanded_macros(pkg, 'Group', group) if group: for p in ['TBD', 'TO BE', 'FILLED', 'Unspecified', 'TO_BE' ]: if p in group: printWarning(pkg, 'group-placeholder-not-allowed', group) - elif not group: + if not group: printError(pkg, 'no-group-tag') - elif pkg.name.endswith('-devel') and not group.startswith('Development/'): + elif pkg.name.endswith('-devel') and not group.startswith('Development/') and not group.endswith('/Development'): printWarning(pkg, 'devel-package-with-non-devel-group', group) - elif VALID_GROUPS and group not in VALID_GROUPS: + elif group not in valid_groups: printWarning(pkg, 'non-standard-group', group) buildhost = pkg[rpm.RPMTAG_BUILDHOST] @@ -1032,16 +1047,15 @@ in your spec file using the Group tag.''', Development/''', 'non-standard-group', -'''The value of the Group tag in the package is not valid. Valid groups are: -"%s".''' % '", "'.join(VALID_GROUPS), +'''The value of the Group tag in the package is not valid. Valid groups are +listed here: https://wiki.tizen.org/wiki/Packaging/Guidelines#Group_Tag''', 'group-placeholder-not-allowed', -'''The value of the Group tag is a placeholder, please use a proper value: -"%s".''' % '", "'.join(VALID_GROUPS), +'''The value of the Group tag is a placeholder, please use a proper value.''', 'no-changelogname-tag', '''There is no changelog. Please insert a '%changelog' section heading in your -spec file and prepare your changes file using e.g. the 'osc vc' command.''', +spec file and prepare your changes file using e.g. the 'gbs ch' command.''', 'no-version-in-last-changelog', '''The latest changelog entry doesn't contain a version. Please insert the diff --git a/packaging/rpmgroups.config b/packaging/rpmgroups.config index 6dfa635..cc8d35c 100644 --- a/packaging/rpmgroups.config +++ b/packaging/rpmgroups.config @@ -5,6 +5,17 @@ setOption("ValidNonDomains", ( "Development" ,\ "Productivity" ,\ )) +setOption("ValidSubDomains", ( + "Libraries", \ + "API", \ + "Documentation", \ + "Utilities", \ + "Testing", \ + "Configuration", \ + "Service", \ + "Other", \ + "Development", \ +)) setOption("ValidDomains", ( "System" , \ "Base" ,\ @@ -37,6 +48,7 @@ setOption("ValidGroups", ( "System/Power Management" ,\ "System/Sensor Framework" ,\ "System/System Info" ,\ + "System/Hardware Adaptation", \ "Application Framework/Package Management", \ "Application Framework/Alarm" ,\ "Application Framework/Application State Management" ,\ @@ -53,16 +65,19 @@ setOption("ValidGroups", ( "Base/Package Management" ,\ "Base/Startup" ,\ "Base/Toolchain" ,\ + "Base/Hardware Adaptation", \ "Connectivity/Bluetooth" ,\ "Connectivity/Connection Management" ,\ "Connectivity/DNS" ,\ "Connectivity/HTTP" ,\ "Connectivity/NFC" ,\ "Connectivity/Wireless" ,\ + "Connectivity/Hardware Adaptation", \ "Development/Languages", \ "Development/Toolchain" ,\ "Development/Testing" ,\ "Graphics/Fonts" ,\ + "Graphics/Hardware Adaptation", \ "Graphics/Input" ,\ "Graphics/Input Service Framework" ,\ "Graphics/Voice Framework" ,\ @@ -78,6 +93,7 @@ setOption("ValidGroups", ( "Multimedia/Camera" ,\ "Multimedia/Framework" ,\ "Multimedia/Policy Management" ,\ + "Multimedia/Hardware Adaptation", \ "PIM/Calendar" ,\ "PIM/Contacts" ,\ "PIM/Events" ,\ @@ -89,6 +105,7 @@ setOption("ValidGroups", ( "Development/Python" ,\ "Development/SDK" ,\ "Development/Tools" ,\ + "Development/Packaging" ,\ "Security/Access Control" ,\ "Security/Network" ,\ "Security/Accounts" ,\ @@ -96,7 +113,9 @@ setOption("ValidGroups", ( "Security/Crypto Libraries" ,\ "Security/DRM" ,\ "Security/Secure Storage" ,\ + "SDK/Hardware Adaptation", \ "Telephony/Cellular" ,\ + "Telephony/Hardware Adaptation", \ "UI Framework/Automotive" ,\ "UI Framework/Mobile" ,\ "UI Framework/PC" ,\ diff --git a/packaging/rpmlint.spec b/packaging/rpmlint.spec index a6d4e5b..28c6b39 100644 --- a/packaging/rpmlint.spec +++ b/packaging/rpmlint.spec @@ -3,7 +3,7 @@ BuildRequires: python-rpm BuildRequires: xz Summary: Rpm correctness checker License: GPL-2.0+ -Group: Development/Tools +Group: Development/Packaging Version: 1.4 Release: 0 Source0: http://rpmlint.zarb.org/download/rpmlint-%{version}.tar.bz2 |