forked from pool/rpmlint
49 lines
1.8 KiB
Diff
49 lines
1.8 KiB
Diff
--- FilesCheck.py
|
|
+++ FilesCheck.py
|
|
@@ -173,7 +173,7 @@
|
|
absolute_regex=re.compile('^/([^/]+)')
|
|
absolute2_regex=re.compile('^/?([^/]+)')
|
|
points_regex=re.compile('^\.\./(.*)')
|
|
-doc_regex=re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/')
|
|
+doc_regex=re.compile('^/usr(/share|/X11R6)?/(doc|man|info)/|^/opt/kde3/share/doc|^/usr/share/gnome/help')
|
|
bin_regex=re.compile('^(/usr)?/s?bin/')
|
|
includefile_regex = re.compile('\.(c|h)(pp|xx)?$', re.IGNORECASE)
|
|
develfile_regex = re.compile('\.(a|cmxa?|mli?)$')
|
|
--- I18NCheck.py
|
|
+++ I18NCheck.py
|
|
@@ -69,10 +69,11 @@
|
|
st += ')$'
|
|
|
|
package_regex=re.compile(st)
|
|
-locale_regex=re.compile('^(/usr/share/locale/([^/]+))/')
|
|
+locale_regex=re.compile('^/(usr|opt/kde3)/share/locale/([^/]+)/')
|
|
correct_subdir_regex=re.compile('^(([a-z][a-z]([a-z])?(_[A-Z][A-Z])?)([.@].*$)?)$')
|
|
lc_messages_regex=re.compile('/usr/share/locale/([^/]+)/LC_MESSAGES/.*(mo|po)$')
|
|
man_regex=re.compile('/usr(?:/share)?/man/([^/]+)/man./[^/]+$')
|
|
+doc_regex=re.compile('^/opt/kde3/share/doc/HTML/(^[/]*)/')
|
|
|
|
# list of exceptions
|
|
#
|
|
@@ -122,7 +123,7 @@
|
|
if res:
|
|
locale=res.group(2)
|
|
# checks the same locale only once
|
|
- if not locale in locales:
|
|
+ if locale and not locale in locales:
|
|
locales.append(locale)
|
|
res2=correct_subdir_regex.search(locale)
|
|
if not res2:
|
|
@@ -162,6 +163,12 @@
|
|
if main_lang != lang:
|
|
main_dir, main_lang = f, lang
|
|
|
|
+ res=doc_regex.search(f)
|
|
+ if res:
|
|
+ subdir=res.group(1)
|
|
+ if subdir != 'en' and pkg.fileLang(f) == '':
|
|
+ printWarning(pkg, 'file-not-in-%lang', f)
|
|
+
|
|
name=pkg.name
|
|
res=package_regex.search(name)
|
|
if res:
|