diff options
author | P. J. McDermott <pjm@nac.net> | 2012-10-08 10:47:16 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-10-08 10:47:16 (EDT) |
commit | cb6a9c2b3dc2195596616bae0a28f188cf68b074 (patch) | |
tree | 903742d8aed6c5d4adaae5049d93308f1358df85 /lib/metadata | |
parent | 2e61a9251ca5880ea17775e5b904ec2f4c54cf2f (diff) |
Update metadata plugin to comply with SPF 2.0.
Diffstat (limited to 'lib/metadata')
-rw-r--r-- | lib/metadata/proteanos.sh | 40 |
1 files changed, 30 insertions, 10 deletions
diff --git a/lib/metadata/proteanos.sh b/lib/metadata/proteanos.sh index 17198e7..52719da 100644 --- a/lib/metadata/proteanos.sh +++ b/lib/metadata/proteanos.sh @@ -22,10 +22,10 @@ _OB_METADATA_PROTEANOS_SM='true' _OB_NAME_RE_PROTEANOS='^[a-z0-9][a-z0-9+.-]+$' _OB_VERSION_RE_PROTEANOS='^' -_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'[0-9a-z.~]+' +_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'[0-9a-z.~-]+' _OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'(\+sip[1-9][0-9]*)?' _OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'(-[1-9][0-9]*)?' -_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'(\+[a-z0-9]+-[1-9][0-9]*)?' +_OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'(\+[a-z0-9]+~[1-9][0-9]*)?' _OB_VERSION_RE_PROTEANOS=${_OB_VERSION_RE_PROTEANOS}'$' _ob_validate_source_name_proteanos() @@ -34,10 +34,20 @@ _ob_validate_source_name_proteanos() _obvsnpro_name="${1}" - echo "${_obvsnpro_name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ - >/dev/null 2>&1 + if echo "${_obvsnpro_name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ + >/dev/null 2>&1; then + case "${_obvsnpro_name}" in + src-*) + _ob_return 1 + return ${?} + ;; + esac + else + _ob_return 1 + return ${?} + fi - _ob_return ${?} + _ob_return 0 return ${?} } @@ -47,10 +57,20 @@ _ob_validate_binary_name_proteanos() _obvbnpro_name="${1}" - echo "${_obvbnpro_name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ - >/dev/null 2>&1 + if echo "${_obvbnpro_name}" | grep -E "${_OB_NAME_RE_PROTEANOS}" \ + >/dev/null 2>&1; then + case "${_obvbnpro_name}" in + src-*) + _ob_return 1 + return ${?} + ;; + esac + else + _ob_return 1 + return ${?} + fi - _ob_return ${?} + _ob_return 0 return ${?} } @@ -73,7 +93,7 @@ _ob_get_upstreamver_proteanos() _obguvpro_version="${1}" - echo "${_obguvpro_version%%-*}" + echo "${_obguvpro_version%-*}" _ob_return 0 return ${?} @@ -85,7 +105,7 @@ _ob_get_distrev_proteanos() _obgdrpro_version="${1}" - echo "${_obgdrpro_version#*-}" + echo "${_obgdrpro_version##*-}" _ob_return 0 return ${?} |