From: martin f. krafft Date: Tue, 21 Jul 2009 12:21:47 +0000 (+0200) Subject: fix downloading of tarball, which needs debian revision X-Git-Url: https://git.madduck.net/code/mbuild.git/commitdiff_plain/f2bba282bd0fee1dd4c0444bf870b4801ae41f40?ds=sidebyside fix downloading of tarball, which needs debian revision Signed-off-by: martin f. krafft --- diff --git a/sbuild-wrapper.sh b/sbuild-wrapper.sh index b2ced37..9fef3dd 100755 --- a/sbuild-wrapper.sh +++ b/sbuild-wrapper.sh @@ -107,6 +107,8 @@ dist="$(sed -ne 's,Distribution: ,,p' "$schangesfile")" schangesfile_basename="${schangesfile##*/}" packagename="${schangesfile_basename%%_*}" packagenameversion="${schangesfile_basename%_*}" +debversion="${packagenameversion#*_}" +upstream_version="${debversion%-*}" dscfile_basename="$packagenameversion".dsc case "$schangesfile" in @@ -122,9 +124,10 @@ dcmd "$dscfile_basename" | while read f; do test -f "$f" && continue case "$f" in - *.tar.gz) - echo "I: fetching missing tarball: $f" >&2 - apt-get --tar-only --only-source source "$packagename" + *.tar.gz) + last_version="$(apt-cache madison mdadm | sed -rne "s,.+(\<${upstream_version}[^[:space:]]+).*,\1,p")" + echo "I: fetching missing tarball for $upstream_version (from $last_version)…" >&2 + apt-get --tar-only --only-source source "${packagename}=${last_version}" ;; *) echo "E: I do not know how to obtain the file: $f" >&2