diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | URPM.xs | 7 |
2 files changed, 8 insertions, 2 deletions
@@ -1,3 +1,6 @@ +- add an alias to Pkg_files to only list doc files. This avoids pushing more + than 50k strings on the stack to check if texmf has a README.urpmi + Version 4.12 - 11 August 2012 - do not try to parse current pointer when the line is invalid or @@ -97,6 +97,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 static ssize_t write_nocheck(int fd, const void *buf, size_t count) { @@ -643,6 +644,7 @@ return_files(const 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)); @@ -1972,10 +1974,11 @@ void Pkg_files(pkg) URPM::Package pkg ALIAS: - conf_files = 1 + conf_files = FILTER_MODE_CONF_FILES + doc_files = FILTER_MODE_DOC_FILES PPCODE: PUTBACK; - return_files(pkg->h, ix == 0 ? 0 : FILTER_MODE_CONF_FILES); + return_files(pkg->h, ix); SPAGAIN; void |