summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2013-08-15 16:02:33 (EDT)
committer P. J. McDermott <pjm@nac.net>2013-08-15 16:02:33 (EDT)
commitacfa9033519e86de7a18421fa52f1cfa635a1669 (patch)
treea093951fe25ae67e00045603a5fbb532a5ddf79a
parenta6d2f9e2f8e6d846779f457b06d965557ca19d92 (diff)
include_changes(): Check format field.
-rw-r--r--lib/include.sh8
-rw-r--r--locale/en_US/pro_archman.sh1
2 files changed, 9 insertions, 0 deletions
diff --git a/lib/include.sh b/lib/include.sh
index 0621fc6..77b9ce3 100644
--- a/lib/include.sh
+++ b/lib/include.sh
@@ -25,6 +25,7 @@ use output
_INCLUDE_CHANGES_FIELDS='Format Source Binary Version Architecture Platform
Distribution Maintainer Changed-By Date Description Changes Files'
+_include_format=
_include_source=
_include_version=
_include_distribution=
@@ -51,6 +52,10 @@ include_changes()
parse_control "${changes}" _include_changes_field \
"${_INCLUDE_CHANGES_FIELDS}" ''
+ if [ "x${_include_format}" != 'x1.0' ]; then
+ error 2 "$(get_msg 'include_unknown_changes_format')" \
+ "${changes}" "${_include_format}"
+ fi
chan="${conf_incoming_channel}"
dist="${_include_distribution}"
source="${_include_source}"
@@ -130,6 +135,9 @@ _include_changes_field()
local value="${2}"
case "${name}" in
+ 'Format')
+ _include_format="${value}"
+ ;;
'Source')
_include_source="${value}"
;;
diff --git a/locale/en_US/pro_archman.sh b/locale/en_US/pro_archman.sh
index f27cb84..3fd28e3 100644
--- a/locale/en_US/pro_archman.sh
+++ b/locale/en_US/pro_archman.sh
@@ -35,6 +35,7 @@ msg_pro_archman_cmd_include_summary='include packages described in changes files
msg_pro_archman_cmd_include_usage='<changes> ...'
# lib/include.sh
+msg_pro_archman_include_unknown_changes_format='%s: Unknown format "%s"'
msg_pro_archman_include_including='Including %s (%s) into %s/%s...'
msg_pro_archman_include_bvap_exists='Packages already exist for binary version %s, architecture %s, and platform %s'