Date: Wed, 25 Feb 2004 10:25:29 +0200 From: Ion-Mihai Tetcu <itetcu@apropo.ro> To: Oliver Eikemeier <eik@FreeBSD.org>, ports@freebsd.org Subject: portaudit not fetching - bad awk code in fetch_locations() Message-ID: <20040225102529.2f5d5bf6@it.buh.cameradicommercio.ro>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040225102529.2f5d5bf6>