Commit 302a90d
authored
Fix non-unique /tmp filenames in external library download scripts (#3182)
Description:
bug=fixes #3042
## Problem
Multiple users or processes compiling tflite-micro simultaneously encounter permission conflicts due to fixed temporary filenames in `/tmp`.
## Solution
- Create unique temporary directories using username, PID, and timestamp
- Implement automatic cleanup on all exit conditions
## Files Modified
- tensorflow/lite/micro/tools/make/ext_libs/cmsis_download.sh
- tensorflow/lite/micro/tools/make/ext_libs/cmsis_nn_download.sh
- tensorflow/lite/micro/tools/make/ext_libs/eyalroz_printf_download.sh
## Testing
Tested with multiple concurrent users - no more /tmp conflicts.1 parent 3b20912 commit 302a90d
File tree
3 files changed
+36
-17
lines changed- tensorflow/lite/micro/tools/make/ext_libs
3 files changed
+36
-17
lines changedLines changed: 14 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | 62 | | |
57 | | - | |
58 | | - | |
| 63 | + | |
| 64 | + | |
59 | 65 | | |
60 | | - | |
61 | | - | |
| 66 | + | |
| 67 | + | |
62 | 68 | | |
63 | 69 | | |
64 | 70 | | |
65 | 71 | | |
66 | 72 | | |
67 | 73 | | |
68 | | - | |
69 | | - | |
| 74 | + | |
| 75 | + | |
70 | 76 | | |
71 | | - | |
72 | | - | |
| 77 | + | |
| 78 | + | |
73 | 79 | | |
74 | 80 | | |
75 | 81 | | |
| |||
Lines changed: 11 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
55 | 62 | | |
56 | 63 | | |
57 | | - | |
58 | | - | |
| 64 | + | |
| 65 | + | |
59 | 66 | | |
60 | | - | |
61 | | - | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
53 | 59 | | |
54 | 60 | | |
55 | 61 | | |
56 | | - | |
57 | | - | |
| 62 | + | |
| 63 | + | |
58 | 64 | | |
59 | | - | |
60 | | - | |
| 65 | + | |
| 66 | + | |
61 | 67 | | |
62 | 68 | | |
63 | | - | |
| 69 | + | |
0 commit comments