1 |
commit: e49b8a450aba6eced9caa608a3bfdc38a7dbe677 |
2 |
Author: Richard Yao <ryao <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 25 03:06:41 2014 +0000 |
4 |
Commit: Richard Yao <ryao <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 25 03:10:23 2014 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=e49b8a45 |
7 |
|
8 |
Make --kerncache compatible with recent versions of GNU tar, bug #457168 |
9 |
|
10 |
Older versions of GNU tar would extract files to the interior of the |
11 |
directory specified after an adjustment via -C was taken into |
12 |
consideration. Newer versions will perform extraction to the exterior of |
13 |
that directory. This caused --kerncache to override the /lib symlink |
14 |
with an actual directory. |
15 |
|
16 |
We correct this by switching to a more standard syntax that should be |
17 |
consistent against old and new versions of GNU tar, as well as bsdtar. |
18 |
|
19 |
Signed-off-by: Richard Yao <ryao <AT> gentoo.org> |
20 |
|
21 |
--- |
22 |
gen_package.sh | 4 ++-- |
23 |
1 file changed, 2 insertions(+), 2 deletions(-) |
24 |
|
25 |
diff --git a/gen_package.sh b/gen_package.sh |
26 |
index ed7a5f4..520d771 100755 |
27 |
--- a/gen_package.sh |
28 |
+++ b/gen_package.sh |
29 |
@@ -134,9 +134,9 @@ gen_kerncache_extract_modules() |
30 |
print_info 1 'Extracting kerncache kernel modules' |
31 |
if [ "${INSTALL_MOD_PATH}" != '' ] |
32 |
then |
33 |
- /bin/tar -xjf ${KERNCACHE} -C ${INSTALL_MOD_PATH} lib |
34 |
+ /bin/tar -xjf ${KERNCACHE} --strip-components 1 -C ${INSTALL_MOD_PATH}/lib |
35 |
else |
36 |
- /bin/tar -xjf ${KERNCACHE} -C / lib |
37 |
+ /bin/tar -xjf ${KERNCACHE} --strip-components 1 -C /lib |
38 |
fi |
39 |
fi |
40 |
} |