]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
python3: exclude __pycache__ from iso, core and packages
authorArne Fitzenreiter <arne_f@ipfire.org>
Sat, 11 Jan 2020 20:22:07 +0000 (21:22 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sat, 11 Jan 2020 20:22:07 +0000 (21:22 +0100)
Signed-off-by: Arne Fitzenreiter <arne_f@ipfire.org>
lfs/Config
lfs/cdrom
lfs/core-updates

index 8a3ed522764a6d95f484fa8d4db079d4159f9343..5f606f53fc9524d87c6735ba102f58a63c59233c 100644 (file)
@@ -241,7 +241,7 @@ define PAK
        sed -e 's/BUILDTARGET/$(BUILDTARGET)/g' -e 's/KVER/$(KVER)/g' -e 's/MACHINE/$(BUILD_ARCH)/g' -i /install/packages/package/ROOTFILES
        sed -e 's/xxxKVERxxx/$(KVER)/g' -i /install/packages/package/install.sh
        chmod 755 /install/packages/package/{{,un}install,update}.sh
        sed -e 's/BUILDTARGET/$(BUILDTARGET)/g' -e 's/KVER/$(KVER)/g' -e 's/MACHINE/$(BUILD_ARCH)/g' -i /install/packages/package/ROOTFILES
        sed -e 's/xxxKVERxxx/$(KVER)/g' -i /install/packages/package/install.sh
        chmod 755 /install/packages/package/{{,un}install,update}.sh
-       cd / && tar cfp /install/packages/package/files.tmp --numeric-owner --exclude='#*' --files-from=/install/packages/package/ROOTFILES
+       cd / && tar cfp /install/packages/package/files.tmp --numeric-owner --exclude='#*' --exclude='__pycache__' --files-from=/install/packages/package/ROOTFILES
        # Double tar to remove double files
        tar xfp /install/packages/package/files.tmp --numeric-owner -C /install/packages/package/tmp/
        rm -f /install/packages/package/files.tmp
        # Double tar to remove double files
        tar xfp /install/packages/package/files.tmp --numeric-owner -C /install/packages/package/tmp/
        rm -f /install/packages/package/files.tmp
index 56d1fa8fe1f55601ec9600f4caba862543db7c7c..b26db754bde002aa384bd9f60f40013b48093b0c 100644 (file)
--- a/lfs/cdrom
+++ b/lfs/cdrom
@@ -162,7 +162,8 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
 
        # Compress root filesystem
        # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
 
        # Compress root filesystem
        # Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
-       tar -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' --exclude='tmp/ROOTFILES' \
+       tar -c --exclude='#*' --exclude='proc/*' --exclude='dev/pts/*' \
+               --exclude='__pycache__' --exclude='tmp/ROOTFILES' \
                -C / --files-from=/tmp/ROOTFILES -f /$(SNAME).tar
        rm -f /tmp/ROOTFILES
        tar -x -C /tmp -f /$(SNAME).tar
                -C / --files-from=/tmp/ROOTFILES -f /$(SNAME).tar
        rm -f /tmp/ROOTFILES
        tar -x -C /tmp -f /$(SNAME).tar
index 3cd8c0785340f224e85953c37a9164f2e99cb13f..fe4fb837cfffa2b2634b5f7cf110814c5319066b 100644 (file)
@@ -72,7 +72,7 @@ core/%:
        sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES
 
        #Remove doubled files with tar/untar/tar to save space
        sed -e "s/KVER/$(KVER)/g" -i /tmp/ROOTFILES
 
        #Remove doubled files with tar/untar/tar to save space
-       tar -c --exclude='proc/*' --exclude='tmp/ROOTFILES' --exclude='#*' --exclude='dev/pts/*' \
+       tar -c --exclude='proc/*' --exclude='tmp/ROOTFILES' --exclude='__pycache__' --exclude='#*' --exclude='dev/pts/*' \
                --exclude-from=$(DIR_SRC)/config/rootfiles/$@/exclude \
                -C / --files-from=/tmp/ROOTFILES -f /$(SNAME).tar
        mv -f /tmp/ROOTFILES /install/packages/package/ROOTFILES
                --exclude-from=$(DIR_SRC)/config/rootfiles/$@/exclude \
                -C / --files-from=/tmp/ROOTFILES -f /$(SNAME).tar
        mv -f /tmp/ROOTFILES /install/packages/package/ROOTFILES