olex2: do not preserve ownership when copying into PREFIX
First build failed in install: cp -a onto /opt/psi logs 'failed to preserve ownership ... Permission denied' for every file (chown refused) and exits non-zero, which tripped the die-guard although the copy itself was fine. Use cp -r --preserve=mode,timestamps,links instead. Record the pitfall in the new-module skill guardrails.
This commit is contained in:
1 parent
514ef49dbb
commit
2b5bb570ca
2 files changed
+9
-1
No files matched your search
+5
-1
@@ -38,7 +38,11 @@ pbuild::install() {
|
||||
local -r src="${SRC_DIR}/olex2"
|
||||
|
||||
# 1. vendor tree, flat into $PREFIX (= BaseDir). Slow on /opt/psi: 12k files.
|
||||
cp -a "${src}/." "${PREFIX}/" || std::die 42 "olex2: copying the vendor tree into ${PREFIX} failed"
|
||||
# NOT `cp -a`: on /opt/psi chown is refused, so -a ends with thousands of
|
||||
# "failed to preserve ownership ... Permission denied" and a non-zero exit
|
||||
# (that killed the first build). Keep mode/timestamps/links only.
|
||||
cp -r --preserve=mode,timestamps,links "${src}/." "${PREFIX}/" || \
|
||||
std::die 42 "olex2: copying the vendor tree into ${PREFIX} failed"
|
||||
|
||||
# 2. zip loses nothing, but make sure the ELF binaries are executable and
|
||||
# everything is world-readable on the shared install
|
||||
|
||||
Reference in new issue
Block a user