diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-16 22:21:32 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-06-16 22:21:32 (EDT) |
commit | e90bfa447904d9621782213ef87bd8592ec026fa (patch) | |
tree | 6ca3673e9a6efa2e1e5a0fae3d481a3570f08807 | |
parent | db25745e4910f8faed6c9152c1d19b53dce1e8da (diff) |
ob_get_system_path(): Allow package-less platconf
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | lib/metadata.sh | 5 | ||||
-rw-r--r-- | lib/metadata/proteanos.sh | 7 |
3 files changed, 11 insertions, 3 deletions
@@ -25,6 +25,8 @@ libopkbuild: added. * ob_set_source_substvar(), ob_set_binary_substvar(), and ob_substvars() are now covered by the test suite. + * ob_get_system_path() with the "platconf" path_id now accepts a + single "plat" argument. The three-argument form is now deprecated. [1]: https://reproducible-builds.org/specs/source-date-epoch/ diff --git a/lib/metadata.sh b/lib/metadata.sh index e3ed407..0597841 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -313,8 +313,9 @@ ob_plat_is_concerned() ## \fIpath_id\fP. The arguments for a \fIpath_id\fP of either ## \fBpackage-source\fP or \fBpackage-docs\fP are \fIsource\fP and ## \fIversion\fP. For \fBbuildflags\fP the argument is \fI arch\fP. -## For \fBplatconf\fP they are \fIsource\fP, \fIversion\fP, and -## \fIplat\fP. +## For \fBplatconf\fP they can be either only \fIplat\fP or all of +## \fIsource\fP, \fIversion\fP, and \fIplat\fP; the latter form is +## deprecated. ## @operand path_id req One of \fBpackage-source\fP, \fBpackage-docs\fP, ## \fBbuildflags\fP, or \fBplatconf\fP. ## @operand args req Additional arguments specific to each \fIpath_id\fP. diff --git a/lib/metadata/proteanos.sh b/lib/metadata/proteanos.sh index 4cc982d..f007c22 100644 --- a/lib/metadata/proteanos.sh +++ b/lib/metadata/proteanos.sh @@ -139,8 +139,13 @@ _ob_get_system_path() printf '%s/opkbuild/buildflags/%s' "${DATADIR}" "${1}" ;; 'platconf') - # source version plat + # [source version] plat + if [ ${#} -eq 1 ]; then + printf '%s/platconf/%s\n' "${DATADIR}" "${1}" + return 0 + fi [ ${#} -eq 3 ] || _ob_abort + # Deprecated: ob_parse_version -u 'pkgver' -- "${2}" printf '%s/platconf/%s/%s\n' "${DATADIR}" "${3}" "${1}" printf '%s/platconf/%s/%s_%s\n' "${DATADIR}" \ |