Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] Re: [PATCH] targets: Don't delete pyc/pyo files
Date: Sun, 17 May 2020 00:38:39
Message-Id: CAEdQ38FDcW5N0DU0yuCpJeH58FzcRdLSEauauFS2US+P_4Oqng@mail.gmail.com
In Reply to: [gentoo-catalyst] [PATCH] targets: Don't delete pyc/pyo files by Matt Turner
1 On Sat, May 16, 2020 at 4:29 PM Matt Turner <mattst88@g.o> wrote:
2 >
3 > These files are actually owned by their packages now, and removing them
4 > can break subsequent builds.
5 >
6 > See https://archives.gentoo.org/gentoo-releng-autobuilds/message/a115781f8e7fb4bd5adfb94a7f2e63b4
7 >
8 > Signed-off-by: Matt Turner <mattst88@g.o>
9 > ---
10 > I'm minimally concerned about the potential for increasing the size of
11 > the ISO. I'll report back with numbers.
12 >
13 > targets/livecd-stage1/controller.sh | 4 ----
14 > targets/livecd-stage2/controller.sh | 2 --
15 > targets/stage1/preclean-chroot.sh | 2 --
16 > 3 files changed, 8 deletions(-)
17 >
18 > diff --git a/targets/livecd-stage1/controller.sh b/targets/livecd-stage1/controller.sh
19 > index ced2634e..c4572ff9 100755
20 > --- a/targets/livecd-stage1/controller.sh
21 > +++ b/targets/livecd-stage1/controller.sh
22 > @@ -13,9 +13,5 @@ case $1 in
23 > ${clst_shdir}/${clst_target}/chroot.sh
24 > echo "${clst_packages}" > ${clst_chroot_path}/tmp/packages.txt
25 > ;;
26 > -
27 > - clean)
28 > - find ${clst_chroot_path}/usr/lib -iname "*.pyc" -exec rm -f {} \;
29 > - ;;
30 > esac
31 > exit $?
32 > diff --git a/targets/livecd-stage2/controller.sh b/targets/livecd-stage2/controller.sh
33 > index 8ee46d7c..0701a26b 100755
34 > --- a/targets/livecd-stage2/controller.sh
35 > +++ b/targets/livecd-stage2/controller.sh
36 > @@ -85,8 +85,6 @@ case $1 in
37 > then
38 > # Clean out man, info and doc files
39 > rm -rf ${clst_chroot_path}/usr/share/{man,doc,info}/*
40 > - # Zap all .pyc and .pyo files
41 > - find ${clst_chroot_path}/usr/lib* -iname "*.py[co]" -exec rm -f {} \;
42
43 I think we may want to keep this intact for livecd-stage2. The ISO
44 sizes goes from 286M to 305M.
45
46 What do other people think?

Replies