From: Will Woods wwoods@redhat.com
The -l|--libraries flag to dd_extract is (apparently) supposed to only unpack the contents of /lib, /lib64, /usr/lib, and /usr/lib64.
Except... kernel modules are in /lib/modules, and firmware is in /lib/firmware. So --libraries also extracts firmware and modules, if present.
This patch makes it exclude files under /lib/modules and /lib/firmware when using --libraries. --- utils/dd/dd_extract.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/utils/dd/dd_extract.c b/utils/dd/dd_extract.c index d0a386e..35b8108 100644 --- a/utils/dd/dd_extract.c +++ b/utils/dd/dd_extract.c @@ -102,7 +102,9 @@ int dlabelFilter(const char* name, const struct stat *fstat, int packageflags, v
/* unpack lib and lib64 if the package was marked as installer-enhancement */ if ((packageflags & dup_libraries)) { - if(!strncmp("lib/", name, 4)) + if(!strncmp("lib/", name, 4) && + strncmp("lib/firmware/", name, 13) && + strncmp("lib/modules/", name, 12)) return 1; else if (!strncmp("lib64/", name, 6)) return 1;