pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   rillig
Date:           Mon Jun 29 20:51:25 UTC 2020

Modified Files:
        pkgsrc/mk: haskell.mk
        pkgsrc/regress/infra-unittests: haskell.sh

Log Message:
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.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 pkgsrc/mk/haskell.mk
cvs rdiff -u -r1.3 -r1.4 pkgsrc/regress/infra-unittests/haskell.sh

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/haskell.mk
diff -u pkgsrc/mk/haskell.mk:1.23 pkgsrc/mk/haskell.mk:1.24
--- pkgsrc/mk/haskell.mk:1.23   Mon Jun 29 20:30:13 2020
+++ pkgsrc/mk/haskell.mk        Mon Jun 29 20:51:24 2020
@@ -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 @@ HASKELL_MK=   # defined
 
 .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
 _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
 _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

Index: pkgsrc/regress/infra-unittests/haskell.sh
diff -u pkgsrc/regress/infra-unittests/haskell.sh:1.3 pkgsrc/regress/infra-unittests/haskell.sh:1.4
--- pkgsrc/regress/infra-unittests/haskell.sh:1.3       Mon Jun 29 20:30:13 2020
+++ pkgsrc/regress/infra-unittests/haskell.sh   Mon Jun 29 20:51:25 2020
@@ -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 @@ fi
 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 @@ if test_case_begin 'PLIST status: outdat
        "$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