From f2bba282bd0fee1dd4c0444bf870b4801ae41f40 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Tue, 21 Jul 2009 14:21:47 +0200 Subject: [PATCH 1/1] fix downloading of tarball, which needs debian revision Signed-off-by: martin f. krafft --- sbuild-wrapper.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 2.39.5