From d44d31a8f786d39b59827048de6cbb9143e49550 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 05 Jan 2019 11:01:42 -0500 Subject: ob_parse_control(): Add a user_data operand --- (limited to 'lib/package') diff --git a/lib/package/2.sh b/lib/package/2.sh index 4ca7346..c1d61be 100644 --- a/lib/package/2.sh +++ b/lib/package/2.sh @@ -22,20 +22,18 @@ _OB_SOURCE_FIELDS_OPTIONAL_2='Build-Depends Homepage' _OB_BINARY_FIELDS_REQUIRED_2='Architecture Platform Description' _OB_BINARY_FIELDS_OPTIONAL_2='Essential Depends Recommends Suggests '\ 'Pre-Depends Conflicts Provides Replaces' -_OB_CURRENT_PACKAGE_2= _ob_parse_package_metadata_2() { local pkg= - ob_parse_control "${_OB_PACKAGE_DIR}/control" _ob_srcfield_2 \ + ob_parse_control "${_OB_PACKAGE_DIR}/control" _ob_srcfield_2 '' \ "${_OB_SOURCE_FIELDS_REQUIRED_2}" "${_OB_SOURCE_FIELDS_OPTIONAL_2}" ob_parse_changelog "${_OB_PACKAGE_DIR}/changelog" _ob_change_2 for pkg in $(ob_get_binary_packages); do - _OB_CURRENT_PACKAGE_2="${pkg}" ob_parse_control "${_OB_PACKAGE_DIR}/${pkg}.pkg/control" \ - _ob_binfield_2 \ + _ob_binfield_2 "${pkg}" \ "${_OB_BINARY_FIELDS_REQUIRED_2}" "${_OB_BINARY_FIELDS_OPTIONAL_2}" done @@ -71,7 +69,8 @@ _ob_srcfield_2() { local name="${1}" local value="${2}" - shift 2 + local user_data="${3}" + shift 3 _ob_set_source_parameter "${name}" "${value}" @@ -95,9 +94,10 @@ _ob_binfield_2() { local name="${1}" local value="${2}" - shift 2 + local pkg="${3}" + shift 3 - _ob_set_binary_parameter "${_OB_CURRENT_PACKAGE_2}" "${name}" "${value}" + _ob_set_binary_parameter "${pkg}" "${name}" "${value}" return 0 } @@ -157,7 +157,8 @@ _ob_set_package_substvars_2() fi if [ -f "${_OB_PACKAGE_DIR}/substvars" ]; then - ob_parse_control "${_OB_PACKAGE_DIR}/substvars" _ob_substvar_2 + ob_parse_control "${_OB_PACKAGE_DIR}/substvars" \ + _ob_substvar_2 '' fi ob_set_substvar 'Source-Version' "$(ob_get_source_parameter 'Version')" @@ -172,7 +173,8 @@ _ob_substvar_2() { local name="${1}" local value="${2}" - shift 2 + local user_data="${3}" + shift 3 ob_set_substvar "${name}" "${value}" -- cgit v0.9.1