aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Woodward2005-01-06 21:39:51 +0000
committerJason Woodward2005-01-06 21:39:51 +0000
commitaaac72cfa21551bf5f3fdbf798e0c2d512c5f90b (patch)
tree332f6db98d6c355df7c038272715f28ef05f0c36 /src
parent2a2626202252281e967ed560eba3d2d7968407b4 (diff)
downloadslapt-get-aaac72cfa21551bf5f3fdbf798e0c2d512c5f90b.tar.gz
honor the PACKAGE MIRROR entry in PACKAGES.TXT if it exists while being downloaded
Diffstat (limited to 'src')
-rw-r--r--src/package.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/package.c b/src/package.c
index 21c7cae..21de938 100644
--- a/src/package.c
+++ b/src/package.c
@@ -968,7 +968,11 @@ void write_pkg_data(const char *source_url,FILE *d_file,struct pkg_list *pkgs){
for(i=0;i < pkgs->pkg_count;i++){
fprintf(d_file,"PACKAGE NAME: %s-%s.tgz\n",pkgs->pkgs[i]->name,pkgs->pkgs[i]->version);
- fprintf(d_file,"PACKAGE MIRROR: %s\n",source_url);
+ if( strlen(pkgs->pkgs[i]->mirror) > 0 ){
+ fprintf(d_file,"PACKAGE MIRROR: %s\n",pkgs->pkgs[i]->mirror);
+ }else{
+ fprintf(d_file,"PACKAGE MIRROR: %s\n",source_url);
+ }
fprintf(d_file,"PACKAGE LOCATION: %s\n",pkgs->pkgs[i]->location);
fprintf(d_file,"PACKAGE SIZE (compressed): %d K\n",pkgs->pkgs[i]->size_c);
fprintf(d_file,"PACKAGE SIZE (uncompressed): %d K\n",pkgs->pkgs[i]->size_u);