commit: 36f490a4476148f800fb7c16a6b45d46cc6ee4f7
Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 22:11:47 2016 +0000
Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 22:11:47 2016 +0000
URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=36f490a4
stage1-controller.sh was *not running in chroot*, move it's functions into the
pre-clean which does safely run in chroot
targets/stage1/stage1-controller.sh | 5 +----
targets/stage1/stage1-preclean-chroot.sh | 5 +++++
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/targets/stage1/stage1-controller.sh
b/targets/stage1/stage1-controller.sh
index 6af1385..ac813de 100755
--- a/targets/stage1/stage1-controller.sh
+++ b/targets/stage1/stage1-controller.sh
@@ -27,10 +27,7 @@ case "$1" in
;;
clean)
- # Clean out man, info and doc files
- rm -rf /tmp/stage1root/usr/share/{man,doc,info}/*
- # Zap all .pyc and .pyo files
- find /tmp/stage1root/ -iname "*.py[co]" -exec rm -f {} \;
+ exit 0
;;
*)
diff --git a/targets/stage1/stage1-preclean-chroot.sh
b/targets/stage1/stage1-preclean-chroot.sh
index 0ba4c00..1b623f1 100755
--- a/targets/stage1/stage1-preclean-chroot.sh
+++ b/targets/stage1/stage1-preclean-chroot.sh
@@ -22,6 +22,11 @@ else
echo UTC > "${ROOT}/etc/TZ"
fi
+# Clean out man, info and doc files
+rm -rf "${ROOT}"/usr/share/{man,doc,info}/*
+# Zap all .pyc and .pyo files
+find "${ROOT}"/ -iname "*.py[co]" -exec rm -f {} \;
+
# unset ROOT for safety (even though cleanup_stages doesn't use it)
unset ROOT
cleanup_stages