tazpkg rev 757

Using $ROOT for installed.info (fix bug with installed.info absence when installed package with --root= option, incl. ISO generation)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Mar 27 10:33:13 2015 +0200 (2015-03-27)
parents a8a4dad5b9e1
children 815e7efac70c
files tazpkg
line diff
     1.1 --- a/tazpkg	Wed Mar 25 03:17:20 2015 +0200
     1.2 +++ b/tazpkg	Fri Mar 27 10:33:13 2015 +0200
     1.3 @@ -8,7 +8,7 @@
     1.4  # can use 'tazpkg usage' to get a list of commands with short descriptions.
     1.5  # TazPKG also resolves dependencies and can upgrade packages from a mirror.
     1.6  #
     1.7 -# (C) 2007-2014 SliTaz - GNU General Public License v3.
     1.8 +# (C) 2007-2015 SliTaz - GNU General Public License v3.
     1.9  #
    1.10  # Authors: See the AUTHORS files
    1.11  #
    1.12 @@ -390,11 +390,11 @@
    1.13  
    1.14  check_for_installed_info()
    1.15  {
    1.16 -	info_path="$PKGS_DB/installed.info"
    1.17 +	info_path="$ROOT$PKGS_DB/installed.info"
    1.18  	if [ ! -f "$info_path" ]; then
    1.19  		if [ "$(id -u)" == "0" ]; then
    1.20  			_ 'File "%s" generated. Please wait...' installed.info
    1.21 -			for pkg in $PKGS_DB/installed/*/receipt; do
    1.22 +			for pkg in $ROOT$PKGS_DB/installed/*/receipt; do
    1.23  				unset_receipt
    1.24  				. $pkg
    1.25  				SIZES=$(echo $PACKED_SIZE $UNPACKED_SIZE | sed 's|\.0||g')
    1.26 @@ -863,7 +863,7 @@
    1.27  	check_for_installed_info
    1.28  	SIZES=$(echo $PACKED_SIZE $UNPACKED_SIZE | sed 's|\.0||g')
    1.29  	DEPENDS=$(echo $DEPENDS) # remove newlines from some receipts
    1.30 -	II=$PKGS_DB/installed.info
    1.31 +	II=$ROOT$PKGS_DB/installed.info
    1.32  	sed -i "/^$PACKAGE	/d" $II # remove old entry
    1.33  	cat >> $II << EOT
    1.34  $PACKAGE	$VERSION$EXTRAVERSION	$CATEGORY	$SHORT_DESC	$WEB_SITE	$TAGS	$SIZES	$DEPENDS