1 |
commit: bbacf8674168cf033de0ccb161f568d0b26f032b |
2 |
Author: Zac Medico <zmedico <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jun 2 02:36:52 2012 +0000 |
4 |
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jun 2 02:36:52 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=bbacf867 |
7 |
|
8 |
ecompressdir: fix ln -s for bug #418309 |
9 |
|
10 |
This fixes parallel funk_up_dir decompress calls so that they don't |
11 |
inappropriately compete with eachother to fix the same broken symlinks. |
12 |
|
13 |
--- |
14 |
bin/ebuild-helpers/ecompressdir | 10 +++++++--- |
15 |
1 files changed, 7 insertions(+), 3 deletions(-) |
16 |
|
17 |
diff --git a/bin/ebuild-helpers/ecompressdir b/bin/ebuild-helpers/ecompressdir |
18 |
index 7d5d432..f39f883 100755 |
19 |
--- a/bin/ebuild-helpers/ecompressdir |
20 |
+++ b/bin/ebuild-helpers/ecompressdir |
21 |
@@ -80,9 +80,13 @@ funk_up_dir() { |
22 |
skip_dir_dest=${T}/ecompress-skip/${actual_dir#${ED}}/${brokenlink%/*}/${olddest} |
23 |
fi |
24 |
[[ -e ${skip_dir_dest} ]] && continue |
25 |
- [[ ${act} == "compress" ]] \ |
26 |
- && newdest="${olddest}${suffix}" \ |
27 |
- || newdest="${olddest%${suffix}}" |
28 |
+ if [[ ${act} == "compress" ]] ; then |
29 |
+ newdest=${olddest}${suffix} |
30 |
+ else |
31 |
+ [[ ${olddest} == *${suffix} ]] || continue |
32 |
+ newdest=${olddest%${suffix}} |
33 |
+ fi |
34 |
+ [[ -f ${newdest} ]] || continue |
35 |
rm -f "${brokenlink}" |
36 |
[[ ${act} == "compress" ]] \ |
37 |
&& ln -snf "${newdest}" "${brokenlink}${suffix}" \ |