tazpkg rev 827

tazpkg: fix "ghost" packages (thanks Ceel)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Aug 05 03:48:48 2015 +0300 (2015-08-05)
parents 4bd24f42aff0
children 2f3580bd8c0c
files tazpkg
line diff
     1.1 --- a/tazpkg	Tue Aug 04 19:13:06 2015 +0300
     1.2 +++ b/tazpkg	Wed Aug 05 03:48:48 2015 +0300
     1.3 @@ -513,7 +513,7 @@
     1.4  	local extra
     1.5  
     1.6  	[ "$1" == 'Installed' ] && \
     1.7 -	extra=" - $(fgrep "$PACKAGE-$VERSION" $PKGS_DB/installed.$SUM | awk '{ print $1 }')"
     1.8 +	extra=" - $(fgrep " $PACKAGE-$VERSION" $PKGS_DB/installed.$SUM | awk '{ print $1 }')"
     1.9  
    1.10  	[ -e "$LOG" ] || touch $LOG
    1.11  
    1.12 @@ -846,7 +846,7 @@
    1.13  	check_for_installed_info
    1.14  	SIZES=$(echo $PACKED_SIZE $UNPACKED_SIZE | sed 's|\.0||g')
    1.15  	DEPENDS=$(echo $DEPENDS) # remove newlines from some receipts
    1.16 -	PKG_SUM="$(fgrep "$(basename "$PACKAGE_FILE")" "$ROOT$PKGS_DB/installed.$SUM" | cut -d' ' -f1)"
    1.17 +	PKG_SUM="$(fgrep " $PACKAGE-$VERSION$EXTRAVERSION.tazpkg" "$ROOT$PKGS_DB/installed.$SUM" | cut -d' ' -f1)"
    1.18  	II=$ROOT$PKGS_DB/installed.info
    1.19  	sed -i "/^$PACKAGE	/d" $II # remove old entry
    1.20  	cat >> $II <<EOT