Hi,
OK, I see in the receipt of package "busybox" that it cannot be removed. So we just have to patch tazpkg, and the receipts of other packages (coreutils-*, grep, find...) can be left unchanged.
Well, attaching my diff fails. Tell me how I can send it to you. I post it below, but all tabs will be lost I fear:
--- tazpkg 2014-05-28 10:16:54.599867816 +0200
+++ tazpkg.new 2014-05-28 10:37:56.162096117 +0200
@@ -517,17 +517,17 @@
[ "$1" ] || return
local dir
- rm -f $1 2>/dev/null
+ busybox rm -f $1 2>/dev/null
dir="$1"
while [ "$dir" != "/" ]; do
dir="$(dirname $dir)"
- rmdir $dir 2> /dev/null || break
+ busybox rmdir $dir 2> /dev/null || break
done
}
grepesc()
{
- sed 's/\[/\\[/g'
+ busybox sed 's/\[/\\[/g'
}
# This function installs a package in the rootfs.
@@ -661,20 +661,23 @@
# save 'official' configuration files
action "Saving configuration files for \$PACKAGE..."
for i in $CONFIG_FILES; do
- { cd fs ; find ${i#/} -type f 2> /dev/null; cd ..; }
- done | { cd fs ; cpio -o -H newc --quiet | gzip -9; cd ..; } > \
+ { cd fs ; busybox find ${i#/} -type f 2> /dev/null;
+ cd ..; }
+ done | { cd fs ; busybox cpio -o -H newc --quiet | \
+ busybox gzip -9; cd ..; } > \
$ROOT$INSTALLED/$PACKAGE/volatile.cpio.gz
# keep user configuration files
for i in $CONFIG_FILES; do
- { cd fs ; find ${i#/} -type f 2> /dev/null; cd ..; }
+ { cd fs ; busybox find ${i#/} -type f 2> /dev/null;
+ cd ..; }
done | while read i; do
[ -e $ROOT/$i ] || continue
- cp -a $ROOT/$i fs/$i
+ busybox cp -a $ROOT/$i fs/$i
done
status
fi
action "Installing \$PACKAGE..."
- [ "$(busybox ls fs/* 2> /dev/null)" ] && cp -a fs/* $ROOT/
+ [ "$(busybox ls fs/* 2> /dev/null)" ] && busybox cp -a fs/* $ROOT/
status
if [ -s files2remove.list ]; then
action "Removing old \$PACKAGE..."
@@ -686,10 +689,10 @@
fi
# Remove the temporary random directory.
action "Removing all tmp files..."
- cd .. && rm -rf $TMP_DIR
+ cd .. && busybox rm -rf $TMP_DIR
status
# Post install commands.
- if grep -q ^post_install $ROOT$INSTALLED/$PACKAGE/receipt; then
+ if busybox grep -q ^post_install $ROOT$INSTALLED/$PACKAGE/receipt; then
post_install $ROOT
fi
# Update-desktop-database if needed.
@@ -2068,9 +2071,9 @@
if [ -f $ROOT$INSTALLED/$PACKAGE/modifiers ]; then
for file in cat $ROOT$INSTALLED/$PACKAGE/files.list
do
- for mod in cat $ROOT$INSTALLED/$PACKAGE/modifiers
+ for mod in busybox cat $ROOT$INSTALLED/$PACKAGE/modifiers
do
- [ -f $ROOT$INSTALLED/$mod/files.list ] && [ $(grep "^$(echo $file | grepesc)$" $ROOT$INSTALLED/$mod/files.list | wc -l) -gt 1 ] && continue 2
+ [ -f $ROOT$INSTALLED/$mod/files.list ] && [ $(busybox grep "^$(echo $file | grepesc)$" $ROOT$INSTALLED/$mod/files.list | busybox wc -l) -gt 1 ] && continue 2
done
remove_with_path $ROOT$file
done
@@ -2081,7 +2084,7 @@
done
fi
status
- if grep -q ^post_remove $ROOT$INSTALLED/$PACKAGE/receipt; then
+ if busybox grep -q ^post_remove $ROOT$INSTALLED/$PACKAGE/receipt; then
post_remove $ROOT
fi
# Remove package receipt.