aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorJason Woodward2005-08-27 05:53:44 +0000
committerJason Woodward2005-08-27 05:53:44 +0000
commit490650ea9711a2839578f02c4a69b2860be6e73b (patch)
tree28eda54c25397226e473cab0662eeacacc277544 /src/main.c
parentd8497caeb5b2781add2e7e1123ebbd5ec36bd207 (diff)
downloadslapt-get-490650ea9711a2839578f02c4a69b2860be6e73b.tar.gz
added --no-upgrade so that packages (such as the kernel) can be installed side by side with an existing version. This disables the check for --install arguments that automatically selects the package for upgrade.
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 776a6ff..117420f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -62,6 +62,7 @@ int main( int argc, char *argv[] )
{"remove-obsolete", 0, 0, SLAPT_OBSOLETE_OPT},
{"available", 0, 0, SLAPT_AVAILABLE_OPT},
{"retry", 1, 0, SLAPT_RETRY_OPT},
+ {"no-upgrade", 0, 0, SLAPT_NO_UPGRADE_OPT},
{0, 0, 0, 0},
};
@@ -184,6 +185,9 @@ int main( int argc, char *argv[] )
case SLAPT_RETRY_OPT: /* set number of retry attempts */
global_config->retry = (atoi(optarg) > 0) ? atoi(optarg) : 1;
break;
+ case SLAPT_NO_UPGRADE_OPT: /* do not attempt to upgrade */
+ global_config->no_upgrade = SLAPT_TRUE;
+ break;
case SLAPT_AUTOCLEAN_OPT: /* clean old old package versions */
do_action = AUTOCLEAN;
break;
@@ -341,6 +345,7 @@ void usage(void)
printf(" --config [] - %s\n",gettext("specify alternate slapt-getrc location"));
printf(" --remove-obsolete - %s\n",gettext("remove obsolete packages (dist-upgrade only)"));
printf(" --retry [] - %s\n",gettext("specify number of download retry attempts"));
+ printf(" --no-upgrade - %s\n",gettext("install package, do not attempt to upgrade"));
}
void version_info(void)