forked from pool/rpmlint
b2da5d3790
Accepted submit request 52161 from user lnussel OBS-URL: https://build.opensuse.org/request/show/52161 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpmlint?expand=0&rev=76
45 lines
1.4 KiB
Diff
45 lines
1.4 KiB
Diff
From 1300bf63e4f5e345329b040e3ccd982c02ee35bd Mon Sep 17 00:00:00 2001
|
|
From: Ludwig Nussel <ludwig.nussel@suse.de>
|
|
Date: Wed, 3 Nov 2010 16:57:00 +0100
|
|
Subject: [PATCH] make file capabilities available in PkgFile
|
|
|
|
---
|
|
Pkg.py | 7 +++++++
|
|
1 files changed, 7 insertions(+), 0 deletions(-)
|
|
|
|
diff --git a/Pkg.py b/Pkg.py
|
|
index 73bd0ba..a2c864d 100644
|
|
--- a/Pkg.py
|
|
+++ b/Pkg.py
|
|
@@ -603,6 +603,10 @@ class Pkg:
|
|
provides = self.header[rpm.RPMTAG_FILEPROVIDE]
|
|
files = self.header[rpm.RPMTAG_FILENAMES]
|
|
magics = self.header[rpm.RPMTAG_FILECLASS]
|
|
+ try:
|
|
+ filecaps = self.header[rpm.RPMTAG_FILECAPS]
|
|
+ except:
|
|
+ filecaps = None
|
|
|
|
# rpm-python < 4.6 does not return a list for this (or FILEDEVICES,
|
|
# FWIW) for packages containing exactly one file
|
|
@@ -629,6 +633,8 @@ class Pkg:
|
|
pkgfile.requires = parse_deps(requires[idx])
|
|
pkgfile.provides = parse_deps(provides[idx])
|
|
pkgfile.lang = langs[idx]
|
|
+ if filecaps:
|
|
+ pkgfile.filecaps = filecaps[idx]
|
|
pkgfile.magic = magics[idx]
|
|
if not pkgfile.magic and _magic:
|
|
pkgfile.magic = _magic.file(pkgfile.path)
|
|
@@ -806,6 +812,7 @@ class PkgFile(object):
|
|
self.provides = []
|
|
self.lang = ''
|
|
self.magic = ''
|
|
+ self.filecaps = None
|
|
|
|
# TODO: decompression support
|
|
|
|
--
|
|
1.7.1
|
|
|