Accepting request 96479 from home:coolo:branches:openSUSE:Factory

- the untranslated-desktop-file check is obsolete, in factory 
  all .desktop files are trimmed and marked - in all other projects
  (including devel projects) %suse_update_desktop_file won't touch
  the files for translation only

OBS-URL: https://build.opensuse.org/request/show/96479
OBS-URL: https://build.opensuse.org/package/show/devel:openSUSE:Factory:rpmlint/rpmlint?expand=0&rev=79
This commit is contained in:
Dirk Mueller 2011-12-13 17:13:54 +00:00 committed by Git OBS Bridge
parent ceb493a75c
commit 4b72968beb
3 changed files with 13 additions and 56 deletions

View File

@ -1,48 +0,0 @@
# vim:sw=4:et
#---------------------------------------------------------------
# Module : rpmlint
# File : DesktopTranslationCheck.py
# Author : Dirk Mueller
# Purpose : Check for untranslated desktop files
#---------------------------------------------------------------
from Filter import *
import AbstractCheck
import rpm
import re
import commands
import Config
desktop_re=re.compile('(services|applets)/.*\.desktop$')
class DesktopCheck(AbstractCheck.AbstractFilesCheck):
def __init__(self):
AbstractCheck.AbstractFilesCheck.__init__(self, "DesktopTranslationCheck", ".*\.desktop$")
def check_file(self, pkg, filename):
if pkg.isSource() or filename in pkg.ghostFiles():
return
try:
f = open(pkg.dirName() + '/' + filename)
except Exception, e:
printWarning(pkg, "read-error", e)
return 0
found_desktop_group=False
for line in f:
if line.startswith('X-SuSE-translate='):
return
if line.startswith('[Desktop Entry]'):
found_desktop_group=True
if found_desktop_group:
printWarning(pkg, "untranslated-desktop-file", filename)
check=DesktopCheck()
if Config.info:
addDetails(
'untranslated-desktop-file',
"""Your desktop file hasn't been handled by %suse_update_desktop_file
Please use it to make the desktop file translate-able by Novell translations."""
)

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Tue Dec 13 14:31:28 UTC 2011 - coolo@suse.com
- the untranslated-desktop-file check is obsolete, in factory
all .desktop files are trimmed and marked - in all other projects
(including devel projects) %suse_update_desktop_file won't touch
the files for translation only
-------------------------------------------------------------------
Mon Dec 5 15:57:28 CET 2011 - dmueller@suse.de

View File

@ -15,19 +15,19 @@
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
# norootforbuild
#!BuildIgnore: rpmlint-mini
Name: rpmlint
BuildRequires: rpm-python xz
BuildRequires: rpm-python
BuildRequires: xz
Summary: Rpm correctness checker
License: GPL-2.0+
Group: System/Packages
Version: 1.3
Release: 4
Release: 0
Source0: http://rpmlint.zarb.org/download/rpmlint-%{version}.tar.xz
Source1: config
Source1001: config.in
Source2: DesktopTranslationCheck.py
Source3: DuplicatesCheck.py
Source4: CheckBuildRoot.py
Source5: CheckExecDocs.py
@ -53,8 +53,6 @@ Source24: pie.config
Source25: licenses.config
Source100: syntax-validator.py
Url: http://rpmlint.zarb.org/
License: GPL-2.0+
Group: System/Packages
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: rpm-python, /usr/bin/readelf, file, findutils, cpio, bash
Requires: desktop-file-utils
@ -208,7 +206,6 @@ Authors:
%patch89
%patch90 -p1
cp -p %{SOURCE1} .
cp -p %{SOURCE2} .
cp -p %{SOURCE3} .
cp -p %{SOURCE4} .
cp -p %{SOURCE5} .