-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1273 from rpm-software-management/update-desktop-…
…files Add new warning about the usage of %suse_update_desktop_file
- Loading branch information
Showing
5 changed files
with
717 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,6 +84,10 @@ def re_tag_compile(tag): | |
python_module_def_regex = re.compile(r'^[^#]*%{\?!python_module:%define python_module()') | ||
python_sitelib_glob_regex = re.compile(r'^[^#]*%{python_site(lib|arch)}/\*\s*$') | ||
|
||
# %suse_update_desktop_file deprecation | ||
# https://lists.opensuse.org/archives/list/[email protected]/message/TF4QO7ECOSEDHBFI5YDEA3OF4RNSI7D7/ | ||
suse_update_desktop_file_regex = re.compile(r'^BuildRequires:\s*update-desktop-files', re.IGNORECASE) | ||
|
||
UNICODE_NBSP = '\xa0' | ||
|
||
|
||
|
@@ -685,6 +689,7 @@ def _checkline_package(self, line): | |
self._checkline_package_conflicts(line) | ||
|
||
self._checkline_forbidden_controlchars(line) | ||
self._check_suse_update_desktop_file(line) | ||
|
||
def _checkline_changelog(self, line): | ||
if self.current_section == 'changelog': | ||
|
@@ -789,3 +794,13 @@ def _checkline_forbidden_controlchars(self, line): | |
# https://github.com/rpm-software-management/rpmlint/issues/1067 | ||
if Pkg.has_forbidden_controlchars(line): | ||
self.output.add_info('W', self.pkg, 'forbidden-controlchar-found') | ||
|
||
def _check_suse_update_desktop_file(self, line): | ||
""" | ||
Test if update-desktop-files is in BuildRequires. The usage of | ||
%suse_update_desktop_file is deprecated now. | ||
""" | ||
if suse_update_desktop_file_regex.match(line): | ||
self.output.add_info('W', self.pkg, | ||
'suse-update-desktop-file-deprecated', | ||
'%suse_update_desktop_file is deprecated') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.