diff options
author | P. J. McDermott <pj@pehjota.net> | 2014-05-02 10:41:02 (EDT) |
---|---|---|
committer | P. J. McDermott <pj@pehjota.net> | 2014-05-02 10:57:58 (EDT) |
commit | 0793d7cb7f6553f4eb1ce527638884f728bf52a3 (patch) | |
tree | a396ec1f6dfb8db7d7a98b6ed056ae30aaac1297 | |
parent | 82f6e543c08603aaeabbcaa4854d6fd316fed95b (diff) |
include_changes(): Warn when there are no files.
Previously, if the package was an upload with an existing source
version, the bvaps sanity check would choke.
Before:
pro-archman: Error: Packages already exist for binary version , architecture , and platform
After:
pro-archman: Warning: No files to include
-rw-r--r-- | lib/include.sh | 11 | ||||
-rw-r--r-- | locale/en_US/pro_archman.sh | 1 |
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/include.sh b/lib/include.sh index 6127497..42ccf24 100644 --- a/lib/include.sh +++ b/lib/include.sh @@ -65,15 +65,20 @@ include_changes() source="${_include_source}" srcver="${_include_version}" + info "$(get_msg 'include_including')" "${source}" "${srcver}" \ + "${chan}" "${dist}" + + if [ "x${_include_files}" = 'x' ]; then + warn "$(get_msg 'include_no_files')" + return 0 + fi + # List of (binver, arch, plat) tuples to be checked later. script='s/[0-9][0-9]* [^ ][^ ]* [^_]*_\([^_]*\)' script="${script}"'_\([^_]*\)_\([^_]*\)\.opk/\1 \2 \3/p' bvaps="$(printf '%s\n' "${_include_files}" | \ sed -n "${script}" | LC_COLLATE='C' sort | uniq)" - info "$(get_msg 'include_including')" "${source}" "${srcver}" \ - "${chan}" "${dist}" - # Pre-inclusion database sanity checks and updates: check for an # existing version of the package in the suite. old_ver="$(db_get_srcver "${chan}" "${dist}" "${source}")" diff --git a/locale/en_US/pro_archman.sh b/locale/en_US/pro_archman.sh index 275bac0..76c5e58 100644 --- a/locale/en_US/pro_archman.sh +++ b/locale/en_US/pro_archman.sh @@ -53,6 +53,7 @@ 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_no_files='No package files to include' msg_pro_archman_include_bvap_exists='Packages already exist for binary version %s, architecture %s, and platform %s' # lib/cmd/process-incoming.sh |