aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2003-10-16 03:06:34 +0000
committerJason Woodward2003-10-16 03:06:34 +0000
commit5f78d03a49f9480370928f6e3bdc5fe2d28e4032 (patch)
tree5d8dc2c34c90f405cc76e500527cc14f9d64e272
parent785a98d5242d9d0f8acc75aaf23bff1e71db6bf5 (diff)
downloadslapt-get-5f78d03a49f9480370928f6e3bdc5fe2d28e4032.tar.gz
retrieve extra/ data
-rw-r--r--ChangeLog1
-rw-r--r--src/action.c20
-rw-r--r--src/main.h1
3 files changed, 22 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 5c8006c..dbab624 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@
* patch data is now fetched from patches/PACKAGES.TXT instead of
parsing patches/FILE_LIST
* set curl user-agent as 'slapt-get'
+ * retrieve extra/ package data
0.9.6b Oct 14, 2003
* fixed bug when removing pkg by base pkg name and removepkg wouldn't find
diff --git a/src/action.c b/src/action.c
index 79584f3..0e48599 100644
--- a/src/action.c
+++ b/src/action.c
@@ -251,6 +251,26 @@ void pkg_action_update(const rc_config *global_config){
printf("Done\n");
#endif
+ /* download EXTRAS_LIST */
+ #if USE_CURL_PROGRESS == 0
+ printf("Retrieving extras list...");
+ #else
+ printf("Retrieving extras list...\n");
+ #endif
+ for(i = 0; i < global_config->sources.count; i++){
+ tmp_file = tmpfile();
+ if( get_mirror_data_from_source(tmp_file,global_config->sources.url[i],EXTRAS_LIST) == 0 ){
+ rewind(tmp_file); /* make sure we are back at the front of the file */
+ available_pkgs = parse_packages_txt(tmp_file);
+ write_pkg_data(global_config->sources.url[i],pkg_list_fh,available_pkgs);
+ free_pkg_list(available_pkgs);
+ }
+ fclose(tmp_file);
+ }
+ #if USE_CURL_PROGRESS == 0
+ printf("Done\n");
+ #endif
+
/* download PATCHES_LIST */
#if USE_CURL_PROGRESS == 0
printf("Retrieving patch list...");
diff --git a/src/main.h b/src/main.h
index cd3dd1d..e1be5d2 100644
--- a/src/main.h
+++ b/src/main.h
@@ -68,6 +68,7 @@ enum action {
#define PKG_LIST "PACKAGES.TXT"
#define PKG_LIST_L "package_data"
#define PATCHES_LIST "patches/PACKAGES.TXT"
+#define EXTRAS_LIST "extra/PACKAGES.TXT"
#define PATCHDIR "patches/"
#define REMOVE_CMD "/sbin/removepkg "
#define INSTALL_CMD "/sbin/installpkg "