aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Woodward2003-10-11 17:42:11 +0000
committerJason Woodward2003-10-11 17:42:11 +0000
commitb52f047d943d51073100b80192c05758f8eee8dd (patch)
tree2fe029dfd963466cb17b0e6b99bb3cd5683068a0
parent4ae58a43b6c06201b82ec5b2ee8f3e2580cb2f79 (diff)
downloadslapt-get-b52f047d943d51073100b80192c05758f8eee8dd.tar.gz
Prompt to upgrade before downloading (thanks kyotou), updated FAQ with dropline question, and upgrade single package question
-rw-r--r--ChangeLog4
-rw-r--r--FAQ14
-rw-r--r--src/package.c17
3 files changed, 26 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 9fcab75..44df6ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,9 @@
-0.9.5f Oct 10, 2003
+0.9.5f Oct 11, 2003
* removed needless check in get_md5sum looking for common slack mirror
directories.
+ * Prompt to upgrade before downloading (thanks kyotou)
+ * updated FAQ with dropline question, and upgrade single package question
0.9.5e Oct 10, 2003
* added a doinst.sh script (generated from the Makefile) to help
diff --git a/FAQ b/FAQ
index 93510b8..eff5a79 100644
--- a/FAQ
+++ b/FAQ
@@ -14,6 +14,8 @@ Frequenty Asked Questions:
11. What about multiple package sources, ala linuxpackages.net?
12. I don't like the download spinner, how can I get more statistics?
13. How can I install every available package?
+14. What if I only want to upgrade one package?
+15. What about Dropline support?
@@ -202,3 +204,15 @@ Frequenty Asked Questions:
+14. What if I only want to upgrade one package?
+
+ Then you follow the debian apt-get method if using --install.
+ If the package is already installed, it will check and install any newer
+ versions.
+
+15. What about Dropline support?
+
+ There is no exception for dropline packages. If you do not want them
+ upgraded, either put the package names into the exception list or answer
+ "NO" in interactive mode (do not use --no-prompt).
+
diff --git a/src/package.c b/src/package.c
index 4a8f498..a8b4377 100644
--- a/src/package.c
+++ b/src/package.c
@@ -557,6 +557,15 @@ int upgrade_pkg(const rc_config *global_config,pkg_info_t *installed_pkg,pkg_inf
return 0;
}
+ if( global_config->no_prompt == 0 ){
+ printf("Replace %s-%s with %s-%s? [y|n] ",pkg->name,installed_pkg->version,pkg->name,pkg->version);
+ fgets(prompt_answer,10,stdin);
+ if( tolower(prompt_answer[0]) != 'y' ){
+ chdir(global_config->working_dir);
+ return cmd_return;
+ }
+ }
+
create_dir_structure(pkg->location);
chdir(pkg->location);
@@ -574,14 +583,6 @@ int upgrade_pkg(const rc_config *global_config,pkg_info_t *installed_pkg,pkg_inf
command = strcat(command,pkg_file_name);
if( global_config->download_only == 0 ){
- if( global_config->no_prompt == 0 ){
- printf("Replace %s-%s with %s-%s? [y|n] ",pkg->name,installed_pkg->version,pkg->name,pkg->version);
- fgets(prompt_answer,10,stdin);
- if( tolower(prompt_answer[0]) != 'y' ){
- chdir(global_config->working_dir);
- return cmd_return;
- }
- }
printf("Preparing to replace %s-%s with %s-%s\n",pkg->name,installed_pkg->version,pkg->name,pkg->version);
if( (cmd_return = system(command)) == -1 ){
printf("Failed to execute command: [%s]\n",command);