Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc mk/haskell.mk: fix PLIST status detection



details:   https://anonhg.NetBSD.org/pkgsrc/rev/45e98a79ab7a
branches:  trunk
changeset: 435058:45e98a79ab7a
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Mon Jun 29 20:51:24 2020 +0000

description:
mk/haskell.mk: fix PLIST status detection

As seen in devel/hs-hashable/PLIST r1.1, which listed only the
package-description but not the package-id.

diffstat:

 mk/haskell.mk                      |  7 +++----
 regress/infra-unittests/haskell.sh |  8 +++++---
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (66 lines):

diff -r bd24dad66424 -r 45e98a79ab7a mk/haskell.mk
--- a/mk/haskell.mk     Mon Jun 29 20:30:13 2020 +0000
+++ b/mk/haskell.mk     Mon Jun 29 20:51:24 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: haskell.mk,v 1.23 2020/06/29 20:30:13 rillig Exp $
+# $NetBSD: haskell.mk,v 1.24 2020/06/29 20:51:24 rillig Exp $
 #
 # This Makefile fragment handles Haskell Cabal packages.
 # See: http://www.haskell.org/cabal/
@@ -95,6 +95,7 @@
 
 .include "../../mk/bsd.fast.prefs.mk"
 
+HS_UPDATE_PLIST?=      no
 
 # Declare HASKELL_COMPILER as one of BUILD_DEFS variables. See
 # ../../mk/misc/show.mk
@@ -222,7 +223,7 @@
 _HS_PLIST_STATUS=      missing
 .elif ${${GREP} HS_INTF ${PKGDIR}/PLIST || ${TRUE}:L:sh}
 _HS_PLIST_STATUS=      lib-ok
-.elif !${${GREP} "/package-id" ${PKGDIR}/PLIST || ${TRUE}:L:sh}
+.elif !${${GREP} "/package-description" ${PKGDIR}/PLIST || ${TRUE}:L:sh}
 _HS_PLIST_STATUS=      plain
 .else
 _HS_PLIST_STATUS=      outdated
@@ -261,8 +262,6 @@
 _HS_PRINT_PLIST_AWK+=  { sub( "${_HASKELL_PL_VER}",        "$${HS_VER}") }
 PRINT_PLIST_AWK+=      ${exists(${DESTDIR}${_HASKELL_PKG_DESCR_FILE}):?${_HS_PRINT_PLIST_AWK}:}
 
-HS_UPDATE_PLIST?=      no
-
 .  if ${HS_UPDATE_PLIST} != no && ${_HS_PLIST_STATUS} == missing
 GENERATE_PLIST+=       ${MAKE} print-PLIST > ${PKGDIR}/PLIST;
 .  endif
diff -r bd24dad66424 -r 45e98a79ab7a regress/infra-unittests/haskell.sh
--- a/regress/infra-unittests/haskell.sh        Mon Jun 29 20:30:13 2020 +0000
+++ b/regress/infra-unittests/haskell.sh        Mon Jun 29 20:51:24 2020 +0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $NetBSD: haskell.sh,v 1.3 2020/06/29 20:30:13 rillig Exp $
+# $NetBSD: haskell.sh,v 1.4 2020/06/29 20:51:25 rillig Exp $
 #
 # Tests for mk/haskell.mk.
 #
@@ -149,6 +149,9 @@
 if test_case_begin 'PLIST status: outdated'; then
 
        # See devel/hs-hashable/PLIST, r1.1.
+       # In that file, there was only a package-description but not
+       # package-id.  After the migration, it has both the
+       # package-description and the package-id.
 
        create_file 'Makefile' <<-EOF
                DISTNAME=       hashable-1.3.0.0
@@ -165,9 +168,8 @@
        "$make" 'show-plist-status' 1> "$tmpdir/output" 2>&1 \
        && exitcode=0 || exitcode=$?
 
-       # TODO: should be 'outdated' because of 'package-description'
        assert_that "$tmpdir/output" --file-is-lines \
-               'PLIST status: plain'
+               'PLIST status: outdated'
 
        test_case_end
 fi



Home | Main Index | Thread Index | Old Index