summaryrefslogtreecommitdiff
path: root/regress/plus_build_version/files
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2020-01-11 12:24:32 +0000
committerrillig <rillig@pkgsrc.org>2020-01-11 12:24:32 +0000
commit8b2d48678ead7d39b962bc6c0e6b869395817f2c (patch)
tree77a93d5554d76743f0bc910f365048c250abe151 /regress/plus_build_version/files
parentacad0c58f8565f95fe0ee186e92ec8c0f14f3f75 (diff)
downloadpkgsrc-8b2d48678ead7d39b962bc6c0e6b869395817f2c.tar.gz
regress/plus_build_version: RCS Id extraction for +BUILD_VERSION
In pkgtools/pkglint, there are several lines that look almost like RCS Ids. Some parts of the pkgsrc infrastructure expand them and some others don't. This needs to be fixed so that all parts of pkgsrc agree what is a complete RCS Id and what isn't. As long as that is not the case, pbulk unnecessarily builds pkglint over and over again, even if nothing changed. There are probably other unintended side effects as well that just haven't been discovered or considered grave enough.
Diffstat (limited to 'regress/plus_build_version/files')
-rw-r--r--regress/plus_build_version/files/010-only-first-line6
-rw-r--r--regress/plus_build_version/files/020-short-name6
-rw-r--r--regress/plus_build_version/files/021-long-name7
-rw-r--r--regress/plus_build_version/files/030-missing-colon-or-dollar7
-rw-r--r--regress/plus_build_version/files/040-missing-dollar-after-colon7
-rw-r--r--regress/plus_build_version/files/050-cvs4
-rw-r--r--regress/plus_build_version/files/expected5
7 files changed, 42 insertions, 0 deletions
diff --git a/regress/plus_build_version/files/010-only-first-line b/regress/plus_build_version/files/010-only-first-line
new file mode 100644
index 00000000000..2575fc19910
--- /dev/null
+++ b/regress/plus_build_version/files/010-only-first-line
@@ -0,0 +1,6 @@
+From each file, only the first RCS Id is extracted.
+
+first $NetBSD: 010-only-first-line,v 1.1 2020/01/11 12:24:32 rillig Exp $
+second $NetBSD: 010-only-first-line,v 1.1 2020/01/11 12:24:32 rillig Exp $
+
+For this reason, each of these test cases is in its own file.
diff --git a/regress/plus_build_version/files/020-short-name b/regress/plus_build_version/files/020-short-name
new file mode 100644
index 00000000000..4bc1d5206f6
--- /dev/null
+++ b/regress/plus_build_version/files/020-short-name
@@ -0,0 +1,6 @@
+The D at the end of the name is missing intentionally.
+
+Because of this missing letter, this file does not get recorded in
++BUILD_VERSION.
+
+$NetBS
diff --git a/regress/plus_build_version/files/021-long-name b/regress/plus_build_version/files/021-long-name
new file mode 100644
index 00000000000..0c969c1657c
--- /dev/null
+++ b/regress/plus_build_version/files/021-long-name
@@ -0,0 +1,7 @@
+The RCS Id must be exactly NetBSD, not any longer name that happens to
+start with NetBSD. Only the exact name is expanded by CVS, therefore
+recording the other occurrences doesn't make sense.
+
+As of January 2020, this line gets recorded nevertheless.
+
+$NetBSDFoundation$
diff --git a/regress/plus_build_version/files/030-missing-colon-or-dollar b/regress/plus_build_version/files/030-missing-colon-or-dollar
new file mode 100644
index 00000000000..b095a93ff27
--- /dev/null
+++ b/regress/plus_build_version/files/030-missing-colon-or-dollar
@@ -0,0 +1,7 @@
+A complete RCS Id needs a colon or a dollar, otherwise it is not
+expanded.
+
+As of January 2020, this line gets unnecessarily recorded in
++BUILD_VERSION.
+
+$NetBSD
diff --git a/regress/plus_build_version/files/040-missing-dollar-after-colon b/regress/plus_build_version/files/040-missing-dollar-after-colon
new file mode 100644
index 00000000000..535cc701fb7
--- /dev/null
+++ b/regress/plus_build_version/files/040-missing-dollar-after-colon
@@ -0,0 +1,7 @@
+Each RCS Id must end with a second dollar in the same line. Just having
+the colon is not enough.
+
+As of January 2020, this line gets unnecessarily recorded in
++BUILD_VERSION.
+
+$NetBSD:
diff --git a/regress/plus_build_version/files/050-cvs b/regress/plus_build_version/files/050-cvs
new file mode 100644
index 00000000000..07a3a2c3dff
--- /dev/null
+++ b/regress/plus_build_version/files/050-cvs
@@ -0,0 +1,4 @@
+The default CVS Id is not taken into account for the package build
+versions, even though it is expanded(?).
+
+$Id: 050-cvs,v 1.1 2020/01/11 12:24:32 rillig Exp $
diff --git a/regress/plus_build_version/files/expected b/regress/plus_build_version/files/expected
new file mode 100644
index 00000000000..92f1dba2f75
--- /dev/null
+++ b/regress/plus_build_version/files/expected
@@ -0,0 +1,5 @@
+regress/plus_build_version/files/010-only-first-line: *NetBSD*
+regress/plus_build_version/files/021-long-name: *NetBSDFoundation*
+regress/plus_build_version/files/030-missing-colon-or-dollar: *
+regress/plus_build_version/files/040-missing-dollar-after-colon: *
+regress/plus_build_version/spec: *NetBSD*