slitaz-forge rev 451

pkgs: fix paths to wok and dont show files nb (too long to load and not realy usefull)
author Christophe Lincoln <pankso@slitaz.org>
date Sun Feb 16 18:42:20 2014 +0100 (2014-02-16)
parents 3927a22b609e
children 8553ee9ed29d
files pkgs/lib/footer.sh pkgs/search.sh
line diff
     1.1 --- a/pkgs/lib/footer.sh	Sun Feb 16 18:20:41 2014 +0100
     1.2 +++ b/pkgs/lib/footer.sh	Sun Feb 16 18:42:20 2014 +0100
     1.3 @@ -2,7 +2,7 @@
     1.4  
     1.5  <div class="summary">
     1.6  $(eval_ngettext "\$PKGS package" "\$PKGS packages" $PKGS)
     1.7 -$(eval_ngettext "and \$FILES file in \$SLITAZ_VERSION database" "and \$FILES files in \$SLITAZ_VERSION database" $FILES)
     1.8 +$(eval_ngettext "in \$SLITAZ_VERSION database")
     1.9  </div>
    1.10  
    1.11  <!-- End of content -->
     2.1 --- a/pkgs/search.sh	Sun Feb 16 18:20:41 2014 +0100
     2.2 +++ b/pkgs/search.sh	Sun Feb 16 18:42:20 2014 +0100
     2.3 @@ -184,12 +184,16 @@
     2.4  
     2.5  # unescape query
     2.6  SEARCH="$(echo $SEARCH | sed 's/%2B/+/g; s/%3A/:/g; s|%2F|/|g')"
     2.7 -
     2.8 -WOK=$SLITAZ_HOME/$SLITAZ_VERSION/wok
     2.9 -PACKAGES_REPOSITORY=$SLITAZ_HOME/$SLITAZ_VERSION/packages
    2.10 -filelist=$PACKAGES_REPOSITORY/files.list.lzma
    2.11 -pkglist=$PACKAGES_REPOSITORY/packages.txt
    2.12 -equiv=$PACKAGES_REPOSITORY/packages.equiv
    2.13 +SLITAZ_HOME=""
    2.14 +if [ "$SLITAZ_VERSION" == "cooking" ]; then
    2.15 +	WOK=$SLITAZ_HOME/wok
    2.16 +else
    2.17 +	WOK=$SLITAZ_HOME/wok-${VERSION}
    2.18 +fi
    2.19 +pkgsrepo=$SLITAZ_HOME/$SLITAZ_VERSION/packages
    2.20 +filelist=$pkgsrepo/files.list.lzma
    2.21 +pkglist=$pkgsrepo/packages.txt
    2.22 +equiv=$pkgsrepo/packages.equiv
    2.23  
    2.24  # Search form
    2.25  # TODO: add hint 'You are can search for depends loop, if textfield is empty'...
    2.26 @@ -263,7 +267,7 @@
    2.27  # TODO: caching the summary for 5 minutes
    2.28  xhtml_footer() {
    2.29  	PKGS=$(ls $WOK/ | wc -l)
    2.30 -	FILES=$(unlzma -c $filelist | wc -l)
    2.31 +	#FILES=$(unlzma -c $filelist | wc -l)
    2.32  	. lib/footer.sh
    2.33  }
    2.34  
    2.35 @@ -809,7 +813,7 @@
    2.36  <table>
    2.37  _EOT_
    2.38  		unset last
    2.39 -		grep -i "$SEARCH" $PACKAGES_REPOSITORY/packages.desc | \
    2.40 +		grep -i "$SEARCH" $pkgsrepo/packages.desc | \
    2.41  		sort | while read pkg extras ; do
    2.42  			. $WOK/$pkg/receipt
    2.43  			package_entry
    2.44 @@ -938,7 +942,7 @@
    2.45  		for pkg in `ls $WOK/ | grep "$SEARCH"`
    2.46  		do
    2.47  			. $WOK/$pkg/receipt
    2.48 -			DESC=" <a href=\"?object=Desc&query=$pkg&lang=$lang&version=$SLITAZ_VERSION$(ifdebug '&')&submit=go\">$(gettext description)</a>"
    2.49 +			DESC=" <p><a href=\"?object=Desc&query=$pkg&lang=$lang&version=$SLITAZ_VERSION$(ifdebug '&')&submit=go\">$(gettext description)</a><p>"
    2.50  			[ -f $WOK/$pkg/description.txt ] || unset DESC
    2.51  			cat << _EOT_
    2.52  $(package_entry)$DESC