And then change 'dget' so that if the file already exists in that directory, it skips the download.
Alternatively, we could always download the .dsc file (its pretty small and likely different each time), and just check the hash of the file on disk versus the requested file. That is likely to be pretty easy, given that the .dsc already includes the hash.
It means re-reading the file on disk (unless we cache that), but that is better than downloading and *writing* that file again.
It wouldn't require changing anything on disk that way, just reading an already present file.
So if we can trust it by distribution, I could just do:
=== modified file 'import_package.py'
extract_ upstream_ branch( update_ db, upstream_dir) get_url( ), temp_dir, get_url( ), temp_dir + distro,
possible_ transports= possible_ transports)
update_ db.import_ package( local_dsc_ path,
use_time_ from_changelog= True)
--- import_package.py 2010-02-18 20:26:19 +0000
+++ import_package.py 2010-02-19 02:54:41 +0000
@@ -558,7 +558,7 @@
dl_dir = tempfile.mkdtemp()
try:
- local_dsc_path = dget(importp.
+ local_dsc_path = dget(importp.
And then change 'dget' so that if the file already exists in that directory, it skips the download.
Alternatively, we could always download the .dsc file (its pretty small and likely different each time), and just check the hash of the file on disk versus the requested file. That is likely to be pretty easy, given that the .dsc already includes the hash.
It means re-reading the file on disk (unless we cache that), but that is better than downloading and *writing* that file again.
It wouldn't require changing anything on disk that way, just reading an already present file.