[master 3/4] dd_extract: -l should not extract modules+firmware
wgwoods
installerbot-noreply at redhat.com
Wed Jun 24 16:25:47 UTC 2015
From: Will Woods <wwoods at 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;
--
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/b537c4502a3851098aaf4563c5b3ab375d926277
More information about the anaconda-patches
mailing list