aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2012-08-23 19:53:11 +0000
committerPascal Terjan <pterjan@mageia.org>2012-08-23 19:53:11 +0000
commit9e05290c907188c4d1bdf21ca08dd8befe7b8307 (patch)
tree22e38692e60026cd9213e5399b6c741df03daffb
parentfe92d36cc359566c1ddad980a90a02914b665fef (diff)
downloadperl-URPM-9e05290c907188c4d1bdf21ca08dd8befe7b8307.tar
perl-URPM-9e05290c907188c4d1bdf21ca08dd8befe7b8307.tar.gz
perl-URPM-9e05290c907188c4d1bdf21ca08dd8befe7b8307.tar.bz2
perl-URPM-9e05290c907188c4d1bdf21ca08dd8befe7b8307.tar.xz
perl-URPM-9e05290c907188c4d1bdf21ca08dd8befe7b8307.zip
Add a Package::doc_files() method
-rw-r--r--NEWS1
-rw-r--r--URPM.xs10
2 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 6bbc5c1..511b438 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Version 3.40.2 - 13 August 2012
empty (detected by valgrind)
- don't read/write after the string when the synthesis is slightly
malformed
+- add a Package::doc_files() method
Version 3.40.1 - 28 June 2012
diff --git a/URPM.xs b/URPM.xs
index a32bf49..c193521 100644
--- a/URPM.xs
+++ b/URPM.xs
@@ -96,6 +96,7 @@ typedef struct s_Package* URPM__Package;
#define FILTER_MODE_ALL_FILES 0
+#define FILTER_MODE_DOC_FILES 1
#define FILTER_MODE_CONF_FILES 2
/* promote epoch sense should be :
@@ -675,6 +676,7 @@ return_files(Header header, int filter_mode) {
if (filter_mode) {
if ((filter_mode & FILTER_MODE_CONF_FILES) && flags && (flags[i] & RPMFILE_CONFIG) == 0) continue;
+ if ((filter_mode & FILTER_MODE_DOC_FILES) && flags && (flags[i] & RPMFILE_DOC) == 0) continue;
}
mXPUSHs(newSVpv(s, len));
@@ -2283,6 +2285,14 @@ Pkg_changelog_text(pkg)
SPAGAIN;
void
+Pkg_doc_files(pkg)
+ URPM::Package pkg
+ PPCODE:
+ PUTBACK;
+ return_files(pkg->h, FILTER_MODE_DOC_FILES);
+ SPAGAIN;
+
+void
Pkg_queryformat(pkg, fmt)
URPM::Package pkg
char *fmt