LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 04-21-2007, 07:32 PM   #1
Blackmeth
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
swaret error "invalid arithmetic operator"


hello agen everyone. probly another newbie question..

i just updated using Swaret changing the version to 11.0 sence thas what im running. was following the "how to do it all" web sight

So i ran

Code:
updatedb
 swaret --update
 swaret --upgrade -a
 updatedb
 swaret --upgrade -a
and now i get an error

Code:
/usr/sbin/swaret: line 3913: ((: 36#i4861>36#i486111.0: syntax  error: invalid arithmetic operator (error token is ".0")
New: flex-2.5.4a-i486-3 (170 kB) - Installed: flex-2.5.33-i486-1kjz
New: gkrellm-2.2.9-i486-1 (741 kB) - Installed: gkrellm-2.2.10-i486-1McD
/usr/sbin/swaret: line 3847: test: -ge: unary operator expected
my systems still running fine was just wondering how to fix this

i did a removepkg, installpkg, but this error still popped up
and i tried to find this error on other links but didnt find anything about this .. just what to know what to change the line to so can fix this.. thanx
 
Old 04-21-2007, 07:40 PM   #2
GrapefruiTgirl
Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550Reputation: 550
Having used Swaret successfully for several months now, I can say that the error you mention has *just* started happening for no reason a few days ago.. At least, no reasonable reason that I can come up with
Poor timing too, because Slackpkg isn't working properly either.
Swaret is in limbo as far as who is developing it currently, and Slackpkg is apparently being worked on actively, and hopefully a bug will be fixed soon.
The swaret issue is not with the code itself, far as I know, but caused by something related to what it's downloading/updating from online.

Last edited by GrapefruiTgirl; 04-21-2007 at 07:41 PM.
 
Old 04-21-2007, 08:28 PM   #3
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Which version are you using, can post a bit of '/usr/sbin/swaret', like near line 3847 ? and near the other line too ?

'-ge' in bash is 'greater than or equal to', indeed not a unary operator. Except I don't have swaret (not your version ether ... as you didn't mention it), so I have no idea what should go in its place.

Last edited by H_TeXMeX_H; 04-21-2007 at 08:31 PM.
 
Old 04-21-2007, 09:08 PM   #4
Blackmeth
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Original Poster
Rep: Reputation: 0
im running Swaret 1.6.3-2

and the code from line 3839-3870 is

Code:
makeulist()
{
  rm -f PKGLIST 2>/dev/null
  for x in $PKGLIST; do
    SHORT=`echo $x | sed -e "s/.*\///g"`
    SHORTPKG="$SHORT"
    SHORT=`echo $SHORT | sed s/'.tgz'//`
    xTMP=`echo $SHORT | sed -e s/-[0-9].*//`
    if test `ls $PACKAGES_LOGDIR/$xTMP-* 2>/dev/null | grep -c "$xTMP-[0-9].*"` -ge 1; then
      iSHORT=`ls $PACKAGES_LOGDIR/$xTMP-* 2>/dev/null | grep "$xTMP-[0-9].*" | sed -e "s/.*\///g" | sort -r | uniq | awk '{
if(NR==1)print$1}'`
      if test `ls .exclude/$SHORTPKG.exclude* 2>/dev/null | wc -l` -eq 0 && test `ls .exclude/$iSHORT.exclude.installed 2>/
dev/null | wc -l` -eq 0; then
        iTMP=`echo $iSHORT | sed -e s/-[0-9].*//`
        if [[ "$iTMP" == "$xTMP" ]]; then
          if test `ls $PACKAGES_LOGDIR/$SHORT* 2>/dev/null | wc -l` -eq 0 && test `echo "$SHORT" | grep -c "$iSHORT"` -eq 0
; then
            RSHORT="$SHORT"
            iRSHORT="$iSHORT"
            lRSHORTPART=`echo "$SHORT" | awk -F- '{print$NF}'`
            liRSHORTPART=`echo "$iSHORT" | awk -F- '{print$NF}'`
            lSHORTPART=`echo "$SHORT" | awk -F- '{print$NF}' | sed -e "s:[[:alpha:]]\+::g;s:[\_\-]::g"`
            liSHORTPART=`echo "$iSHORT" | awk -F- '{print$NF}' | sed -e "s:[[:alpha:]]\+::g;s:[\_\-]::g"`
            SHORT=`echo "$SHORT" | sed s/''${lRSHORTPART}''/''${lSHORTPART}''/\g`
            iSHORT=`echo "$iSHORT" | sed s/''${liRSHORTPART}''/''${liSHORTPART}''/\g`
            [[ $SHORT > $iSHORT ]] && UFLAG=1 || UFLAG=0
            PACKAGE_NAME=`echo "$SHORT" | sed -e s/-[0-9].*//`
            PACKAGEA_CUT=`echo "$SHORT" | sed s/$PACKAGE_NAME-//`
            PACKAGEI_CUT=`echo "$iSHORT" | sed s/$PACKAGE_NAME-//`
            VERSIONA=`echo "$PACKAGEA_CUT" | cut -f1 -d-`
            VERSIONI=`echo "$PACKAGEI_CUT" | cut -f1 -d-`
            ASWAP=0
            ISWAP=0
            if test `echo "$PACKAGEA_CUT" | cut -f1 -d- | grep -ce "[[:alpha:]]\+"` -ge 1; then
              ASWAP=1
               
and from the area that errors out is

Code:
RSHORT="$SHORT"
            iRSHORT="$iSHORT"
            lRSHORTPART=`echo "$SHORT" | awk -F- '{print$NF}'`
            liRSHORTPART=`echo "$iSHORT" | awk -F- '{print$NF}'`
            lSHORTPART=`echo "$SHORT" | awk -F- '{print$NF}' | sed -e "s:[[:alpha:]]\+::g;s:[\_\-]::g"`
            liSHORTPART=`echo "$iSHORT" | awk -F- '{print$NF}' | sed -e "s:[[:alpha:]]\+::g;s:[\_\-]::g"`
            SHORT=`echo "$SHORT" | sed s/''${lRSHORTPART}''/''${lSHORTPART}''/\g`
            iSHORT=`echo "$iSHORT" | sed s/''${liRSHORTPART}''/''${liSHORTPART}''/\g`
            [[ $SHORT > $iSHORT ]] && UFLAG=1 || UFLAG=0
            PACKAGE_NAME=`echo "$SHORT" | sed -e s/-[0-9].*//`
            PACKAGEA_CUT=`echo "$SHORT" | sed s/$PACKAGE_NAME-//`
            PACKAGEI_CUT=`echo "$iSHORT" | sed s/$PACKAGE_NAME-//`
            VERSIONA=`echo "$PACKAGEA_CUT" | cut -f1 -d-`
            VERSIONI=`echo "$PACKAGEI_CUT" | cut -f1 -d-`
            ASWAP=0
            ISWAP=0
            if test `echo "$PACKAGEA_CUT" | cut -f1 -d- | grep -ce "[[:alpha:]]\+"` -ge 1; then
              ASWAP=1
            fi
            if test `echo "$PACKAGEI_CUT" | cut -f1 -d- | grep -ce "[[:alpha:]]\+"` -ge 1; then
              ISWAP=1
            fi
            if test $ASWAP -ne $ISWAP; then
              VERSIONA=`echo "$VERSIONA" | sed s/'[a-zA-Z]\+[[:digit:]]\+'//\g` VERSIONI=`echo "$VERSIONI" | sed s/'[a-zA-Z]\+[[:digit:]]\+'//\g`
              if test $ASWAP -eq 0; then
                if [[ $VERSIONA = $VERSIONI ]]; then
                  UFLAG=1
                fi
              else
                if [[ $VERSIONA = $VERSIONI ]]; then
                  UFLAG=2
                fi
              fi
            fi
            if test $UFLAG -eq 0; then
              ASWAP=0
              ISWAP=0
              if test `echo "$PACKAGEA_CUT" | cut -f1 -d- | grep -ce "[[:alpha:]]\+"` -ge 1; then
                ASWAP=1
              fi
              if test `echo "$PACKAGEI_CUT" | cut -f1 -d- | grep -ce "[[:alpha:]]\+"` -ge 1; then
                ISWAP=1
              fi
              if test $ASWAP -ne $ISWAP; then
                VERSIONA=`echo "$VERSIONA" | sed s/'[a-zA-Z]\+[[:digit:]]\+'//\g`
                VERSIONI=`echo "$VERSIONI" | sed s/'[a-zA-Z]\+[[:digit:]]\+'//\g`
                if test $ASWAP -eq 0; then
                  if [[ $VERSIONA = $VERSIONI ]]; then
                    UFLAG=0
                  fi
                fi
              fi
              if test $UFLAG -eq 0; then 
N=`echo $VERSIONA | awk '{print split($0,tmp,".")}'`
                APKGARCH=`echo "$SHORT" | awk -F'-' '{print$(NF-1)}' | sed s:\_::\g | sed s:-::\g`
                IPKGARCH=`echo "$iSHORT" | awk -F'-' '{print$(NF-1)}' | sed s:\_::\g | sed s:-::\g`
                APKGREV=`echo "$SHORT" | awk -F'-' '{print$NF}' | sed s:[a-zA-Z]::\g | sed s:\_::\g | sed s:-::\g`
                IPKGREV=`echo "$iSHORT" | awk -F'-' '{print$NF}' | sed s:[a-zA-Z]::\g | sed s:\_::\g | sed s:-::\g`
                if [[ "$VERSIONA" == "$VERSIONI" ]]; then
                  ((36#"$APKGARCH$APKGREV">36#"$IPKGARCH$IPKGREV")) && UFLAG=1 || UFLAG=0
                else
                  ASWAP=0
                  ISWAP=0
                  if test `echo "$VERSIONA" | grep -c "[[:alpha:]]"` -ge 1; then
                    ASWAP=1
                  fi
                  if test `echo "$VERSIONI" | grep -c "[[:alpha:]]"` -ge 1; then
                    ISWAP=1
                  fi
                  if test $ASWAP -eq 1 && test $ISWAP -eq 1; then
                    VERSIONA=`echo "$VERSIONA" | sed s/'[\_\+]'//\g`
                    VERSIONI=`echo "$VERSIONI" | sed s/'[\_\+]'//\g`
                  else
                    if test $ASWAP -eq 0 && test $ISWAP -eq 0; then
                      VERSIONA=`echo "$VERSIONA" | sed s/'[\_\+]'//\g`
                      VERSIONI=`echo "$VERSIONI" | sed s/'[\_\+]'//\g`
                    else
                      if test `echo "$VERSIONA" | grep -c "_"` -ge 1; then
                        VERSIONA=`echo "$VERSIONA" | sed s/'[a-zA-Z]\+[[:digit:]]_'//\g`
                        VERSIONI=`echo "$VERSIONI" | sed s/'[a-zA-Z]\+[[:digit:]]_'//\g`
                      else
                        VERSIONA=`echo "$VERSIONA" | sed s/'[a-zA-Z]\+[[:digit:]]\+'//\g`
                        VERSIONI=`echo "$VERSIONI" | sed s/'[a-zA-Z]\+[[:digit:]]\+'//\g`
this is the line on 3913

if [[ "$VERSIONA" == "$VERSIONI" ]]; then
((36#"$APKGARCH$APKGREV">36#"$IPKGARCH$IPKGREV")) && UFLAG=1 || UFLAG=0


any tips would be cool..

dont know if this has anything to do with the mirrors.. i gess it could but wouldnt understand why

Last edited by Blackmeth; 04-21-2007 at 09:11 PM.
 
Old 04-25-2007, 10:59 AM   #5
modestos
LQ Newbie
 
Registered: Jul 2003
Location: Greece
Distribution: slack
Posts: 1

Rep: Reputation: 0
Hi,
I'm getting this same error. Did anybody find a solution?

in my case (swaret version 1.6.3-2) line 3913 is:

if test $UFLAG -eq 0; then
N=`echo $VERSIONA | awk '{print split($0,tmp,".")}'`
3913----> APKGARCH=`echo "$SHORT" | awk -F'-' '{print$(NF-1)}' | sed s:\_::\g | sed s:-::\g`
IPKGARCH=`echo "$iSHORT" | awk -F'-' '{print$(NF-1)}' | sed s:\_::\g | sed s:-::\g`
APKGREV=`echo "$SHORT" | awk -F'-' '{print$NF}' | sed s:[a-zA-Z]::\g | sed s:\_::\g | sed s:-::\g`
IPKGREV=`echo "$iSHORT" | awk -F'-' '{print$NF}' | sed s:[a-zA-Z]::\g | sed s:\_::\g | sed s:-::\g`
if [[ "$VERSIONA" == "$VERSIONI" ]]; then
((36#"$APKGARCH$APKGREV">36#"$IPKGARCH$IPKGREV")) && UFLAG=1 || UFLAG=0
else

cheers
 
Old 04-25-2007, 12:14 PM   #6
H_TeXMeX_H
Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269Reputation: 1269
Looks too complicated. Might wanna ask the author, or see the bug reports.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Error for wireless request "Set Mode" (8B06) : invalid argument "roaming" penguin chick Linux - Wireless Networking 5 08-22-2008 02:16 PM
"cp -p" fails with "cp: setting permissions for `/home/svbld/t': Invalid argument" mkhesin Red Hat 1 02-28-2007 01:57 AM
Ndiswrapper "Invalid driver" error - but it worked before i switched distros! drewbug01 Linux - Wireless Networking 5 11-01-2006 01:36 PM
"Invalid File Handle" error on Fat32 Samba deiphage Linux - Networking 1 02-05-2006 02:15 PM
Partition problem windows not booting "Invalid disk error" julian_s Linux - Newbie 1 04-02-2004 10:26 PM


All times are GMT -5. The time now is 03:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration