portaudit not fetching - bad awk code in fetch_locations()

Ion-Mihai Tetcu itetcu at apropo.ro
Wed Feb 25 00:23:39 PST 2004


Hi,


Checking my log for distfiles fetching I've seen: 
===>  WARNING: Vulnerability database out of date, checking anyway 

so I've checked to see what was happening. It seems that the awk code
from fetch_locations() doesn't return the right thing, e.g.
redirecting:

        echo "${MASTER_SITE_LOCAL}" | awk "
                BEGIN { RS=\"[ \\t\\n]\"; IGNORECASE=1; srand() }
                /^$/ { next }
                {
                        if (\$0 ~ /${MASTER_SORT_REGEX}/ ) rank=0; else rank=rand()
                        gsub(/%SUBDIR%/, \"${MASTER_SITE_SUBDIR}\")
                        print rank \"\\t\" \$0
                }
        "  | sort > /tmp/portul

produce:
 # cat /tmp/portul



                ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/eik/
                ftp://ftp.jp.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/eik/
                ftp://ftp.ru.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/eik/
                ftp://ftp.se.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/eik/
                ftp://ftp.tw.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/eik/
                ftp://ftp.uk.FreeBSD.org/pub/FreeBSD/ports/local-distfiles/eik/
0.45396

so cut -f 2 returns nothing useful ==> no fetch locations.

As my akw skills are at the sea level I cannot provide the trivial fix for this.

A workaround is to delete the 
| cut -f 2 
at the end of fetch_locations() from  /usr/local/share/portaudit/portaudit.functions


-- 
IOnut
Unregistered ;) FreeBSD user



More information about the freebsd-ports mailing list