aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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