[disco/master-next,2/9] UBUNTU: [Packaging] dkms-build: do not redownload files on subsequent passes
diff mbox series

Message ID 20190312155719.3532-3-apw@canonical.com
State New
Headers show
Series
  • Untitled series #96763
Related show

Commit Message

Andy Whitcroft March 12, 2019, 3:57 p.m. UTC
When we already have a download for a specific .deb from a previous pass
detect this and avoid re-downloading it.

BugLink: http://bugs.launchpad.net/bugs/1764792
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
 debian/scripts/dkms-build | 7 +++++++
 1 file changed, 7 insertions(+)

Patch
diff mbox series

diff --git a/debian/scripts/dkms-build b/debian/scripts/dkms-build
index 71351a58a17b..aede826b40b4 100755
--- a/debian/scripts/dkms-build
+++ b/debian/scripts/dkms-build
@@ -45,6 +45,13 @@  do
 			}
 		    ')
 		do
+			for lpackage_path in "$lpackage"_*.deb
+			do
+				break
+			done
+			if [ -f "$lpackage_path" ]; then
+				break
+			fi
 			url="$pool/$package_path"
 			wget "$url" && break || true
 			# No components in PPAs.