This commit is contained in:
emmett1
2020-01-12 16:09:07 +08:00
parent 63be06b90c
commit dfbce388d5
2 changed files with 4 additions and 3 deletions

4
pkgadd
View File

@@ -293,8 +293,8 @@ if [ "$UPGRADE_PKG" ] || [ "$REINSTALL_PKG" ]; then
grep -v '/$' "$rmlist_all" | tac > "$rmlist_file" # get files only to remove
grep -Fxv -f "$reserve_dir" "$rmlist_all" | grep '/$' | tac > "$rmlist_dir" # get dirs only (safe) to remove
# remove pseudo fs from remove list
sed '/^dev\//d;/^sys\//d;/^proc\//d;/^run\//d;/^tmp\//d' -i $rmlist_file
sed '/^dev\//d;/^sys\//d;/^proc\//d;/^run\//d;/^tmp\//d' -i $rmlist_dir
#sed '/^dev\//d;/^sys\//d;/^proc\//d;/^run\//d;/^tmp\//d' -i $rmlist_file
#sed '/^dev\//d;/^sys\//d;/^proc\//d;/^run\//d;/^tmp\//d' -i $rmlist_dir
(cd "$ROOT_DIR"/
[ -s $rmlist_file ] && xargs -a $rmlist_file -d'\n' rm $VERBOSE_INSTALL
[ -s $rmlist_dir ] && xargs -a $rmlist_dir -d'\n' rmdir $VERBOSE_INSTALL

View File

@@ -305,9 +305,10 @@ packaging() {
rm -f usr/share/info/dir usr/info/dir
rm -f usr/lib/charset.alias # on musl system
find . \( -name perllocal.pod -o -name .packlist \) -delete
find usr/share/fonts \( -name fonts.dir -o -name fonts.scale \) -delete
# remove pseudo directories
rm -fr dev sys proc run tmp
#rm -fr dev sys proc run tmp
[ "$KEEP_EMPTYDIR" = 0 ] && removeemptydirs
[ "$KEEP_LIBTOOL" = 0 ] && removelibtool