The following commit has been merged in the master branch: commit 8e4bad69462a18d1159fa99e4a9e550f003e7c5b Author: Guillem Jover <guil...@debian.org> Date: Fri Jun 29 20:20:57 2012 +0200
dpkg-query: Refactor pkg_infodb_is_internal() from pkg_infodb_print_filename() diff --git a/src/querycmd.c b/src/querycmd.c index 9107f7d..aeb3ded 100644 --- a/src/querycmd.c +++ b/src/querycmd.c @@ -566,15 +566,24 @@ showpackages(const char *const *argv) return failures; } -static void -pkg_infodb_print_filename(const char *filename, const char *filetype) +static bool +pkg_infodb_is_internal(const char *filetype) { /* Do not expose internal database files. */ if (strcmp(filetype, LISTFILE) == 0 || strcmp(filetype, CONFFILESFILE) == 0) - return; + return true; if (strlen(filetype) > MAXCONTROLFILENAME) + return true; + + return false; +} + +static void +pkg_infodb_print_filename(const char *filename, const char *filetype) +{ + if (pkg_infodb_is_internal(filetype)) return; printf("%s\n", filename); -- dpkg's main repository -- To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org