Bug 192597

Summary: [PATCH] net/GeoIP: geoipupdate.sh script non-functional
Product: Ports & Packages Reporter: Matthias Andree <mandree>
Component: Individual Port(s)Assignee: Adam Weinberger <adamw>
Status: Closed FIXED    
Severity: Affects Some People    
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch to create %%DATADIR%% before attempting download; general overhaul. none

Description Matthias Andree freebsd_committer freebsd_triage 2014-08-11 20:06:32 UTC
Created attachment 145688 [details]
Patch to create %%DATADIR%% before attempting download; general overhaul.

Hi Adam,

the geoipupdate.sh script is non-functional for me on a fresh ports-based install. Apparently we need to create "%%DATADIR%%" first, and the script can also do with enhanced error checking and refactoring.

Patch attached -- the crucial point is the "mkdir -p" early, and the trap/rm -f/mv -f are to make the script more robust and ask less questions in adverse conditions.
Comment 1 commit-hook freebsd_committer freebsd_triage 2014-08-11 20:16:39 UTC
A commit references this bug:

Author: adamw
Date: Mon Aug 11 20:16:29 UTC 2014
New revision: 364652
URL: http://svnweb.freebsd.org/changeset/ports/364652

Log:
  Ensure that DATADIR exists before attempting to fetch the data files
  into it. Also, make the script more robust and ask fewer questions in
  adverse conditions.

  PORTREVISION bump.

  PR:		192597
  Submitted by:	mandree

Changes:
  head/net/GeoIP/Makefile
  head/net/GeoIP/files/geoipupdate.sh.in
Comment 2 Adam Weinberger freebsd_committer freebsd_triage 2014-08-11 20:17:08 UTC
Awesome work. Thank you!!