[ Thread Index |
Date Index
| More lists.tuxfamily.org/slitaz Archives
]
- To: slitaz@xxxxxxxxxxxxxxxxxxx
- Subject: Re: Tazpanel - pkgs.cgi
- From: Daniele Guerrieri <d.guerrieri@xxxxxxxxx>
- Date: Tue, 24 May 2011 17:05:05 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=S4KPZO2tTr/r9F/Tq4eRidMmdAeq5A471W7QplK8eLo=; b=ZJKPWi7dKQxjEASk0VwQs9eHjs9wrq0KdWN0CoQ438RyI/UV6GpziCPdJ9+/iANxZG dEwEiuNRc6SD7r6q85hWr+NljSV3sY9hL3rVrCAx80O3dBhVjSiUllMkk09kbBJnqyUd RRt/aSSGLQVo4HEfA1MRPw0dUA4Q6g55JTorY=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=XsBpNeoTTKUnEG29rZm9x+YoSZnF01VwG5H3lSjnpeJ33upZOvn50jxoPZuG+rJjj/ eEK5hwnE9zHB8/ZxX3Nnudc3wv4jeAgWxneVbT3A+LMwBBEeUHQH9+wzu5MBvfKvC9KR K2keFNlLAuQqY4fEF0l8pZXdSGnkpoxQ4xM8k=
Hi, i'm here again :)
i think now it should work perfectly, for ALL the packages selected in
the checkboxes: just add
cmdline=${cmdline#*repo=* }
between line 465 and 466.
This way it will chop the shortest string matched with '*repo=* ', for
example for the string
'Remove repo=Any pkg=aria2+ pkg=b43-fwcutter', it will chop 'Remove
repo=Any ' and will leave 'pkg=....'. So we don't ever need to know
what's the name of the repo, nor we need to use sed to chop the
string; only it is important to have repo=* before pkg=*.
Here the diff, pkgs.cgi is the working one, taz2/tazpanel/pkgs.cgi is
the cloned tazpanel from hg.slitaz.org/tazpanel
--- pkgs.cgi
+++ taz2/tazpanel/pkgs.cgi
@@ -463,7 +463,6 @@
pkgs=""
cmdline=`echo ${QUERY_STRING#do=} | sed s'/&/ /g'`
cmd=`echo ${cmdline} | awk '{print $1}'`
- cmdline=${cmdline#*repo=* }
pkgs=`echo $cmdline | sed -e s'/+/ /g' -e s'/pkg=//g' -e s/$cmd//`
cmd=`echo $cmd | tr [A-Z] [a-z]`
case $cmd in
Daniele
---
SliTaz GNU/Linux Mailing list - http://www.slitaz.org/