summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-09-30 16:19:20 (EDT)
committer P. J. McDermott <pjm@nac.net>2012-09-30 16:19:20 (EDT)
commit0d3165e0b79d94df943c2f1a08e23e085e76c241 (patch)
tree48a83aba525e172f1ae5dc21b98ffaba402f01cc /lib
parenta359b932674afa1824903f8f8c1a99c53100941f (diff)
Use metadata functions in ob_parse_changelog().
Diffstat (limited to 'lib')
-rw-r--r--lib/changelog.sh19
1 files changed, 3 insertions, 16 deletions
diff --git a/lib/changelog.sh b/lib/changelog.sh
index dedfa9a..c1b3748 100644
--- a/lib/changelog.sh
+++ b/lib/changelog.sh
@@ -22,16 +22,7 @@ _OB_CHANGELOG_SM='true'
ob_use messages
ob_use locale
-
-# Constant global parameters:
-# FIXME: Remove.
-OB_SOURCE_RE='^[a-z0-9][a-z0-9+.-]+$'
-OB_SOURCE_VERSION_ID_RE='^'
-OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'[0-9a-z.~]+'
-OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'(\+sip[1-9][0-9]*)?'
-OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'(-[1-9][0-9]*)?'
-OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'(\+[a-z0-9]+-[1-9][0-9]*)?'
-OB_SOURCE_VERSION_ID_RE="${OB_SOURCE_VERSION_ID_RE}"'$'
+ob_use metadata
OB_CHANGELOG_SOURCE=
OB_CHANGELOG_VERSION=
@@ -100,15 +91,11 @@ ${_obpch_line}"
OB_CHANGELOG_DISTRIBUTION=
OB_CHANGELOG_CHANGES=
else
- echo "${_obpch_source}" | \
- grep -E "${OB_SOURCE_RE}" >/dev/null 2>&1
- if [ ${?} -ne 0 ]; then
+ if ! ob_validate_source_name "${_obpch_source}"; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_bad_source' "${source}"
fi
- echo "${_obpch_version}" | \
- grep -E "${OB_SOURCE_VERSION_ID_RE}" >/dev/null 2>&1
- if [ ${?} -ne 0 ]; then
+ if ! ob_parse_version "${_obpch_version}"; then
_ob_parse_changelog_error "${_obpch_line_nr}" \
'changelog_bad_source_version' "${_obpch_version}"
fi