wok-6.x rev 18816

lxpanel: fix post_install (again)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Jan 15 17:18:19 2016 +0100 (2016-01-15)
parents 49be2e5503d0
children f8c87367c74d
files QtWeb/receipt busybox/receipt dooble/receipt gecko-mediaplayer/receipt libQtGui/receipt lxpanel/receipt
line diff
     1.1 --- a/QtWeb/receipt	Fri Jan 15 16:27:43 2016 +0100
     1.2 +++ b/QtWeb/receipt	Fri Jan 15 17:18:19 2016 +0100
     1.3 @@ -79,7 +79,7 @@
     1.4  EOT
     1.5  
     1.6  	for i in $(ls "$1/home" 2> /dev/null); do
     1.7 -		[ -f "/home/$i/.config/QtWeb.NET/QtWeb Internet Browser.conf" ] && continue
     1.8 +		[ -f "$1/home/$i/.config/QtWeb.NET/QtWeb Internet Browser.conf" ] && continue
     1.9  		mkdir -p "$1/home/$i/.config/QtWeb.NET"
    1.10  		cp "$1/tmp/QtWeb Internet Browser.conf" "$1/home/$i/.config/QtWeb.NET"
    1.11  		chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config/QtWeb.NET"
     2.1 --- a/busybox/receipt	Fri Jan 15 16:27:43 2016 +0100
     2.2 +++ b/busybox/receipt	Fri Jan 15 17:18:19 2016 +0100
     2.3 @@ -180,7 +180,7 @@
     2.4  pre_install()
     2.5  {
     2.6  	local i
     2.7 -	cp -a /etc/resolv.conf /etc/resolv.conf-busybox-install
     2.8 +	cp -a $1/etc/resolv.conf $1/etc/resolv.conf-busybox-install
     2.9  	answer=""
    2.10  	for i in $(cat "$1$INSTALLED/$PACKAGE/files.list"); do
    2.11  		[ -f "$1$i" ] || continue
    2.12 @@ -204,27 +204,27 @@
    2.13  post_install()
    2.14  {
    2.15  	local i
    2.16 -	[ -f /etc/resolv.conf-busybox-install ] &&
    2.17 -	mv -f /etc/resolv.conf-busybox-install /etc/resolv.conf
    2.18 +	[ -f $1/etc/resolv.conf-busybox-install ] &&
    2.19 +	mv -f $1/etc/resolv.conf-busybox-install $1/etc/resolv.conf
    2.20  	while read i ; do
    2.21  		[ -f "$1$i-busybox-install" ] || continue
    2.22  		mv "$1$i-busybox-install" "$1$i"
    2.23  	done < "$1$INSTALLED/$PACKAGE/files.list"
    2.24  	chmod 4755 "$1/bin/busybox"
    2.25  
    2.26 -	touch $root/etc/daemons.conf
    2.27 +	touch $1/etc/daemons.conf
    2.28  	# /etc/daemons.conf (tftp + dnsd + httpd may not be present)
    2.29 -	if ! grep -q ^DNSD_OPTIONS $root/etc/daemons.conf; then
    2.30 -		echo '# Domain name server options.' >> $root/etc/daemons.conf
    2.31 -		echo 'DNSD_OPTIONS="-d"' >> $root/etc/daemons.conf
    2.32 -		echo '' >> $root/etc/daemons.conf
    2.33 +	if ! grep -q ^DNSD_OPTIONS $1/etc/daemons.conf; then
    2.34 +		echo '# Domain name server options.' >> $1/etc/daemons.conf
    2.35 +		echo 'DNSD_OPTIONS="-d"' >> $1/etc/daemons.conf
    2.36 +		echo '' >> $1/etc/daemons.conf
    2.37  	fi
    2.38 -	if ! grep -q ^TFTPD_OPTIONS $root/etc/daemons.conf; then
    2.39 -		echo '# Tftp daemon options.' >> $root/etc/daemons.conf
    2.40 -		echo 'TFTPD_OPTIONS="-r /boot"' >> $root/etc/daemons.conf
    2.41 -		echo '' >> $root/etc/daemons.conf
    2.42 +	if ! grep -q ^TFTPD_OPTIONS $1/etc/daemons.conf; then
    2.43 +		echo '# Tftp daemon options.' >> $1/etc/daemons.conf
    2.44 +		echo 'TFTPD_OPTIONS="-r /boot"' >> $1/etc/daemons.conf
    2.45 +		echo '' >> $1/etc/daemons.conf
    2.46  	fi
    2.47 -	sed -i "s/copy; 20../copy; $(date +%Y)/" $root/var/www/httpd/404.html
    2.48 +	sed -i "s/copy; 20../copy; $(date +%Y)/" $1/var/www/httpd/404.html
    2.49  }
    2.50  
    2.51  pre_remove()
     3.1 --- a/dooble/receipt	Fri Jan 15 16:27:43 2016 +0100
     3.2 +++ b/dooble/receipt	Fri Jan 15 17:18:19 2016 +0100
     3.3 @@ -64,7 +64,7 @@
     3.4  post_install()
     3.5  {
     3.6  	for i in $(ls "$1/home" 2> /dev/null); do
     3.7 -		[ -f "/home/$i/.dooble/Dooble/Dooble.ini" ] && continue
     3.8 +		[ -f "$1/home/$i/.dooble/Dooble/Dooble.ini" ] && continue
     3.9  		mkdir -p "$1/home/$i/.dooble/Dooble"
    3.10  		cp "$1/usr/share/dooble/Dooble.ini" "$1/home/$i/.dooble/Dooble"
    3.11  		rm "$1/home/$i/.local/share/applications/dooble.desktop"
     4.1 --- a/gecko-mediaplayer/receipt	Fri Jan 15 16:27:43 2016 +0100
     4.2 +++ b/gecko-mediaplayer/receipt	Fri Jan 15 17:18:19 2016 +0100
     4.3 @@ -40,8 +40,8 @@
     4.4  
     4.5  post_install()
     4.6  {
     4.7 -	for i in "$1"/usr/lib/mozilla/plugins/$PACKAGE*.so ; do
     4.8 -		ln -s "$i" "$1"/usr/lib/firefox*/plugins
     4.9 +	for i in $(cd "$1"; ls usr/lib/mozilla/plugins/$PACKAGE*.so 2> /dev/null); do
    4.10 +		ln -s "/$i" "$1"/usr/lib/firefox*/plugins
    4.11  	done
    4.12  }
    4.13  
     5.1 --- a/libQtGui/receipt	Fri Jan 15 16:27:43 2016 +0100
     5.2 +++ b/libQtGui/receipt	Fri Jan 15 17:18:19 2016 +0100
     5.3 @@ -30,7 +30,7 @@
     5.4  post_install()
     5.5  {
     5.6          for i in $(ls "$1/home" 2> /dev/null); do
     5.7 -                [ -f "/home/$i/.config/Trolltech.conf" ] && continue
     5.8 +                [ -f "$1/home/$i/.config/Trolltech.conf" ] && continue
     5.9                  cp "$1/etc/skel/.config/Trolltech.conf" "$1/home/$i/.config"
    5.10                  chroot "$1/" chown -R $(stat -c "%u.%g" "$1/home/$i") "/home/$i/.config"
    5.11          done
     6.1 --- a/lxpanel/receipt	Fri Jan 15 16:27:43 2016 +0100
     6.2 +++ b/lxpanel/receipt	Fri Jan 15 17:18:19 2016 +0100
     6.3 @@ -80,7 +80,5 @@
     6.4  post_install()
     6.5  {
     6.6  	# clean LXPanel menu caches
     6.7 -	for i in $1/home/*/.cache/menus; do
     6.8 -		[ -d "$i" ] && rm $i/*
     6.9 -	done
    6.10 +	chroot "$1/" rm home/*/.cache/menus/* 2> /dev/null
    6.11  }