Bug 192597 - [PATCH] net/GeoIP: geoipupdate.sh script non-functional
Summary: [PATCH] net/GeoIP: geoipupdate.sh script non-functional
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Adam Weinberger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-08-11 20:06 UTC by Matthias Andree
Modified: 2014-08-11 20:17 UTC (History)
0 users

See Also:


Attachments
Patch to create %%DATADIR%% before attempting download; general overhaul. (2.10 KB, patch)
2014-08-11 20:06 UTC, Matthias Andree
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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!!