Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-catalyst] [PATCH] targets: Don't delete pyc/pyo files
Date: Sat, 16 May 2020 23:29:56
Message-Id: 20200516232939.2709013-1-mattst88@gentoo.org
1 These files are actually owned by their packages now, and removing them
2 can break subsequent builds.
3
4 See https://archives.gentoo.org/gentoo-releng-autobuilds/message/a115781f8e7fb4bd5adfb94a7f2e63b4
5
6 Signed-off-by: Matt Turner <mattst88@g.o>
7 ---
8 I'm minimally concerned about the potential for increasing the size of
9 the ISO. I'll report back with numbers.
10
11 targets/livecd-stage1/controller.sh | 4 ----
12 targets/livecd-stage2/controller.sh | 2 --
13 targets/stage1/preclean-chroot.sh | 2 --
14 3 files changed, 8 deletions(-)
15
16 diff --git a/targets/livecd-stage1/controller.sh b/targets/livecd-stage1/controller.sh
17 index ced2634e..c4572ff9 100755
18 --- a/targets/livecd-stage1/controller.sh
19 +++ b/targets/livecd-stage1/controller.sh
20 @@ -13,9 +13,5 @@ case $1 in
21 ${clst_shdir}/${clst_target}/chroot.sh
22 echo "${clst_packages}" > ${clst_chroot_path}/tmp/packages.txt
23 ;;
24 -
25 - clean)
26 - find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \;
27 - ;;
28 esac
29 exit $?
30 diff --git a/targets/livecd-stage2/controller.sh b/targets/livecd-stage2/controller.sh
31 index 8ee46d7c..0701a26b 100755
32 --- a/targets/livecd-stage2/controller.sh
33 +++ b/targets/livecd-stage2/controller.sh
34 @@ -85,8 +85,6 @@ case $1 in
35 then
36 # Clean out man, info and doc files
37 rm -rf ${clst_chroot_path}/usr/share/{man,doc,info}/*
38 - # Zap all .pyc and .pyo files
39 - find ${clst_chroot_path}/usr/lib* -iname "*.py[co]" -exec rm -f {} \;
40 fi
41 rm -f ${clst_chroot_path}/tmp/packages.txt
42 ;;
43 diff --git a/targets/stage1/preclean-chroot.sh b/targets/stage1/preclean-chroot.sh
44 index ea9056e8..2dc761e9 100755
45 --- a/targets/stage1/preclean-chroot.sh
46 +++ b/targets/stage1/preclean-chroot.sh
47 @@ -22,8 +22,6 @@ fi
48
49 # Clean out man, info and doc files
50 rm -rf "${ROOT}"/usr/share/{man,doc,info}/*
51 -# Zap all .pyc and .pyo files
52 -find "${ROOT}"/ -iname "*.py[co]" -exec rm -f {} \;
53
54 # unset ROOT for safety (even though cleanup_stages doesn't use it)
55 unset ROOT
56 --
57 2.26.2

Replies

Subject Author
[gentoo-catalyst] Re: [PATCH] targets: Don't delete pyc/pyo files Matt Turner <mattst88@g.o>