summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-05-21 18:48:43 +0000
committerrillig <rillig@pkgsrc.org>2020-05-21 18:48:43 +0000
commit6b8380697ae6e844130fc95577bf090a084ab9d1 (patch)
tree28b75905fbbfe93d0df7175e6ab03c8cabf952e1 /regress
parentc732598bfc680965bcfd3cb38a285116e5c3542a (diff)
downloadpkgsrc-6b8380697ae6e844130fc95577bf090a084ab9d1.tar.gz
mk/pkgformat/metadata.mk: fix relative paths in PATCHDIR and FILESDIR
Before, relative paths had been stored as-is. This affected those packages that defined PATCHDIR or FILESDIR as relative directory instead of prefixing it with ${.CURDIR}. Since there are already several other paths that are interpreted relative to the package directory (CONFLICTS, DEPENDS), allow PATCHDIR and FILESDIR to be specified as relative paths, too. This makes the package Makefiles a bit shorter.
Diffstat (limited to 'regress')
-rw-r--r--regress/infra-unittests/pkgformat-pkg-metadata.sh12
1 files changed, 5 insertions, 7 deletions
diff --git a/regress/infra-unittests/pkgformat-pkg-metadata.sh b/regress/infra-unittests/pkgformat-pkg-metadata.sh
index 93c878327cf..935644f7bb0 100644
--- a/regress/infra-unittests/pkgformat-pkg-metadata.sh
+++ b/regress/infra-unittests/pkgformat-pkg-metadata.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# $NetBSD: pkgformat-pkg-metadata.sh,v 1.1 2020/05/19 06:09:53 rillig Exp $
+# $NetBSD: pkgformat-pkg-metadata.sh,v 1.2 2020/05/21 18:48:43 rillig Exp $
#
# Demonstrates how mk/pkgformat/pkg/metadata.mk creates the versioning
# information in +BUILD_VERSION.
@@ -74,7 +74,8 @@ fi
if test_case_begin 'relative paths'; then
- # As of May 2020, the +BUILD_VERSION contains corrupt data.
+ # Up to 2020-05-21, relative paths were stored wrong in the
+ # +BUILD_VERSION file.
wrkdir="$PWD"
pkgdir="$mocked_pkgsrcdir/category/package"
@@ -104,13 +105,10 @@ if test_case_begin 'relative paths'; then
assert_that "$exitcode" --equals '0'
assert_that "$tmpdir/output" --file-is-empty
- # FIXME: All files listed here are supposed to be relative to
- # the pkgsrc root directory.
assert_that "$wrkdir/.pkgdb/+BUILD_VERSION" --file-is-lines \
- "./Makefile: $cvsid" \
"category/package/Makefile: $cvsid" \
- "files/README: $cvsid" \
- "patches/patch-aa: $cvsid"
+ "category/package/files/README: $cvsid" \
+ "category/package/patches/patch-aa: $cvsid"
test_case_end
fi