diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 06d2c9560e..0d84fc3773 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -186,6 +186,7 @@ $(BUILD_DIR)/%/.stamp_downloaded: $(call DOWNLOAD, \ $($(PKG)_MAIN_DOWNLOAD), \ $(patsubst %,-p '%',$($(PKG)_DOWNLOAD_POST_PROCESS)) \ + $(patsubst %,-P '%',$($(PKG)_DOWNLOAD_POST_PROCESS_OPTS)) \ ) \ ) $(foreach p,$($(PKG)_ADDITIONAL_DOWNLOADS),$(call DOWNLOAD,$(p))$(sep)) diff --git a/support/download/dl-wrapper b/support/download/dl-wrapper index 239bdfa359..5445aad5a7 100755 --- a/support/download/dl-wrapper +++ b/support/download/dl-wrapper @@ -25,10 +25,10 @@ export BR_BACKEND_DL_GETOPTS=":hc:d:o:n:N:H:lru:qf:e" main() { local OPT OPTARG local backend output large_file recurse quiet rc - local -a uris hfiles backend_opts + local -a uris hfiles backend_opts post_process_opts # Parse our options; anything after '--' is for the backend - while getopts ":c:d:D:o:n:N:H:lrf:u:qp:" OPT; do + while getopts ":c:d:D:o:n:N:H:lrf:u:qp:P:" OPT; do case "${OPT}" in c) cset="${OPTARG}";; d) dl_dir="${OPTARG}";; @@ -42,6 +42,7 @@ main() { f) filename="${OPTARG}";; u) uris+=( "${OPTARG}" );; p) post_process="${OPTARG}";; + P) post_process_opts+=( "${OPTARG}" );; q) quiet="-q";; :) error "option '%s' expects a mandatory argument\n" "${OPTARG}";; \?) error "unknown option '%s'\n" "${OPTARG}";; @@ -152,7 +153,8 @@ main() { if [ -n "${post_process}" ] ; then if ! "${OLDPWD}/support/download/${post_process}-post-process" \ -o "${tmpf}" \ - -n "${raw_base_name}" + -n "${raw_base_name}" \ + "${post_process_opts[@]}" then # cd back to keep path coherence cd "${OLDPWD}"