Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jul 2019 18:37:26 +0000 (UTC)
From:      Gleb Popov <arrowd@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r507062 - head/Mk/Uses
Message-ID:  <201907211837.x6LIbQuC077177@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: arrowd
Date: Sun Jul 21 18:37:26 2019
New Revision: 507062
URL: https://svnweb.freebsd.org/changeset/ports/507062

Log:
  cabal.mk: Transforms check-revs aux target into make-use-cabal-revs, which works much better.
  
  Submitted by:	Evilham <contact@evilham.com>

Modified:
  head/Mk/Uses/cabal.mk

Modified: head/Mk/Uses/cabal.mk
==============================================================================
--- head/Mk/Uses/cabal.mk	Sun Jul 21 18:08:21 2019	(r507061)
+++ head/Mk/Uses/cabal.mk	Sun Jul 21 18:37:26 2019	(r507062)
@@ -110,11 +110,11 @@ make-use-cabal:
 	@echo -n USE_CABAL=
 	@find ${CABAL_HOME} -name '*.conf' -exec basename {} + | sed -E 's|-[0-9a-z]{64}\.conf||' | sort | sed 's/$$/ \\/'
 
-# Checks USE_CABAL items that have revisions.
-check-revs:
+# Re-generates USE_CABAL items to have revision numbers.
+make-use-cabal-revs:
 .  for package in ${_use_cabal}
-	@(fetch -o /dev/null http://hackage.haskell.org/package/${package:C/_[0-9]+//}/revision/1.cabal 2>/dev/null && echo "Package ${package} has revisions") || true
-	@([ -d ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//}/revision ] && echo "    hint: " `find ${DISTDIR}/${DIST_SUBDIR}/${package:C/_[0-9]+//} -name *.cabal | xargs basename`) || true
+	@(${ENV} HTTP_ACCEPT="application/json" fetch -q -o - http://hackage.haskell.org/package/${package:C/_[0-9]+//}/revisions/ | sed -Ee 's/.*":([0-9]+)}\]/${package:C/_[0-9]+//}_\1 /' -e 's/_0//')
+	@echo '\'
 .  endfor
 
 .  if !defined(CABAL_BOOTSTRAP)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907211837.x6LIbQuC077177>