new: add ignore depends option
This commit is contained in:
parent
14cc5b1565
commit
02a55887d6
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-08-06 04:45+0300\n"
|
||||
"POT-Creation-Date: 2024-08-08 16:37+0300\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
@ -135,9 +135,9 @@ msgid "Here is a list of available global options:"
|
||||
msgstr "Here is a list of available global options:"
|
||||
|
||||
#: src/main.c:174 src/main.c:175 src/cmd/info.c:43 src/cmd/info.c:44
|
||||
#: src/cmd/info.c:45 src/cmd/install.c:31 src/cmd/install.c:32
|
||||
#: src/cmd/list.c:14 src/cmd/list.c:15 src/cmd/remove.c:21 src/cmd/remove.c:22
|
||||
#: src/cmd/update.c:30
|
||||
#: src/cmd/info.c:45 src/cmd/install.c:32 src/cmd/install.c:33
|
||||
#: src/cmd/install.c:34 src/cmd/list.c:14 src/cmd/list.c:15 src/cmd/remove.c:21
|
||||
#: src/cmd/remove.c:22 src/cmd/update.c:30
|
||||
#, c-format
|
||||
msgid " "
|
||||
msgstr " "
|
||||
@ -162,7 +162,7 @@ msgstr "Failed to run the editor: %s"
|
||||
msgid "Failed to open the editor: %s"
|
||||
msgstr "Failed to open the editor: %s"
|
||||
|
||||
#: src/cmd/info.c:19 src/cmd/info.c:29 src/cmd/install.c:84 src/cmd/remove.c:43
|
||||
#: src/cmd/info.c:19 src/cmd/info.c:29 src/cmd/install.c:87 src/cmd/remove.c:43
|
||||
msgid "Package "
|
||||
msgstr "Package "
|
||||
|
||||
@ -230,76 +230,76 @@ msgstr "Installed "
|
||||
msgid "Up-to-date "
|
||||
msgstr "Up-to-date "
|
||||
|
||||
#: src/cmd/install.c:30
|
||||
#: src/cmd/install.c:31
|
||||
msgid "Listing options for the install command:"
|
||||
msgstr "Listing options for the install command:"
|
||||
|
||||
#: src/cmd/install.c:37 src/cmd/update.c:35
|
||||
#: src/cmd/install.c:39 src/cmd/update.c:35
|
||||
msgid "There are no avaliable pools, have you synced yet?"
|
||||
msgstr "There are no avaliable pools, have you synced yet?"
|
||||
|
||||
#: src/cmd/install.c:55
|
||||
#: src/cmd/install.c:58
|
||||
msgid "Specified "
|
||||
msgstr ""
|
||||
|
||||
#: src/cmd/install.c:65
|
||||
#: src/cmd/install.c:68
|
||||
#, fuzzy
|
||||
msgid "Failed to load "
|
||||
msgstr "Failed to download "
|
||||
|
||||
#: src/cmd/install.c:75 src/cmd/remove.c:45
|
||||
#: src/cmd/install.c:78 src/cmd/remove.c:45
|
||||
msgid "Failed to find "
|
||||
msgstr "Failed to find "
|
||||
|
||||
#: src/cmd/install.c:90
|
||||
#: src/cmd/install.c:93
|
||||
msgid "Failed to resolve "
|
||||
msgstr "Failed to resolve "
|
||||
|
||||
#: src/cmd/install.c:96
|
||||
#: src/cmd/install.c:99
|
||||
msgid "Nothing to do (no packages to install)"
|
||||
msgstr "Nothing to do (no packages to install)"
|
||||
|
||||
#: src/cmd/install.c:105 src/cmd/install.c:107 src/cmd/remove.c:65
|
||||
#: src/cmd/install.c:108 src/cmd/install.c:110 src/cmd/remove.c:65
|
||||
#: src/cmd/remove.c:67 src/cmd/update.c:56 src/cmd/update.c:58
|
||||
msgid "Following "
|
||||
msgstr "Following "
|
||||
|
||||
#: src/cmd/install.c:113 src/cmd/remove.c:74
|
||||
#: src/cmd/install.c:116 src/cmd/remove.c:74
|
||||
msgid "Total of "
|
||||
msgstr "Total of "
|
||||
|
||||
#: src/cmd/install.c:116 src/cmd/update.c:65
|
||||
#: src/cmd/install.c:119 src/cmd/update.c:65
|
||||
#, c-format
|
||||
msgid "Root directory is modified, install scripts will be saved in %s"
|
||||
msgstr "Root directory is modified, install scripts will be saved in %s"
|
||||
|
||||
#: src/cmd/install.c:118 src/cmd/remove.c:75 src/cmd/update.c:67
|
||||
#: src/cmd/install.c:121 src/cmd/remove.c:75 src/cmd/update.c:67
|
||||
msgid "Continue?"
|
||||
msgstr "Continue?"
|
||||
|
||||
#: src/cmd/install.c:119 src/cmd/remove.c:76 src/cmd/update.c:68
|
||||
#: src/cmd/install.c:122 src/cmd/remove.c:76 src/cmd/update.c:68
|
||||
msgid "Operation cancelled"
|
||||
msgstr "Operation cancelled"
|
||||
|
||||
#: src/cmd/install.c:135 src/cmd/install.c:139 src/cmd/install.c:154
|
||||
#: src/cmd/install.c:138 src/cmd/install.c:142 src/cmd/install.c:157
|
||||
#: src/cmd/remove.c:83 src/cmd/update.c:78 src/cmd/update.c:87
|
||||
#: src/cmd/update.c:96
|
||||
msgid "("
|
||||
msgstr "("
|
||||
|
||||
#: src/cmd/install.c:145 src/cmd/update.c:83
|
||||
#: src/cmd/install.c:148 src/cmd/update.c:83
|
||||
msgid "Failed to download "
|
||||
msgstr "Failed to download "
|
||||
|
||||
#: src/cmd/install.c:160 src/cmd/update.c:101
|
||||
#: src/cmd/install.c:163 src/cmd/update.c:101
|
||||
msgid "Failed to install "
|
||||
msgstr "Failed to install "
|
||||
|
||||
#: src/cmd/install.c:166
|
||||
#: src/cmd/install.c:169
|
||||
msgid "Installed "
|
||||
msgstr "Installed "
|
||||
|
||||
#: src/cmd/install.c:166
|
||||
#: src/cmd/install.c:169
|
||||
msgid "Installed all of the "
|
||||
msgstr "Installed all of the "
|
||||
|
||||
@ -335,7 +335,7 @@ msgstr "Removed "
|
||||
msgid "Removed all of the "
|
||||
msgstr "Removed all of the "
|
||||
|
||||
#: src/cmd/sync.c:20
|
||||
#: src/cmd/sync.c:20 src/cmd/sync.c:35
|
||||
msgid "Failed to sync "
|
||||
msgstr "Failed to sync "
|
||||
|
||||
@ -343,11 +343,6 @@ msgstr "Failed to sync "
|
||||
msgid "Synced "
|
||||
msgstr "Synced "
|
||||
|
||||
#: src/cmd/sync.c:35
|
||||
#, c-format
|
||||
msgid "Failed to sync %s: %s"
|
||||
msgstr "Failed to sync %s: %s"
|
||||
|
||||
#: src/cmd/sync.c:47
|
||||
msgid "There are no pools specified in the configuration"
|
||||
msgstr "There are no pools specified in the configuration"
|
||||
@ -374,6 +369,10 @@ msgstr "All packages are up-to-date"
|
||||
msgid "Failed to update "
|
||||
msgstr "Failed to update "
|
||||
|
||||
#, c-format
|
||||
#~ msgid "Failed to sync %s: %s"
|
||||
#~ msgstr "Failed to sync %s: %s"
|
||||
|
||||
#, c-format
|
||||
#~ msgid "Bad root directory (%s): %s"
|
||||
#~ msgstr "Bad root directory (%s): %s"
|
||||
|
@ -23,13 +23,15 @@ bool cmd_download_callback(lm_ctx_t *ctx, lm_pkg_t *pkg, bool is_archive, size_t
|
||||
}
|
||||
|
||||
bool cmd_install(lm_ctx_t *ctx, config_t *config, args_t *args){
|
||||
args_split(args, "ignore-depends");
|
||||
args_split(args, "continue");
|
||||
args_split(args, "yes");
|
||||
|
||||
if(args_get_bool(args, "help")){
|
||||
info(_("Listing options for the install command:"));
|
||||
printf(_(" "FG_BOLD"--continue"FG_RESET":\tcontinue even if package is not found\n"));
|
||||
printf(_(" "FG_BOLD"--yes"FG_RESET":\tdon't ask for confirmation\n"));
|
||||
printf(_(" "FG_BOLD"--ignore-depends"FG_RESET":\tignore package dependencies\n"));
|
||||
printf(_(" "FG_BOLD"--continue"FG_RESET":\t\tcontinue even if package is not found\n"));
|
||||
printf(_(" "FG_BOLD"--yes"FG_RESET":\t\tdon't ask for confirmation\n"));
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -40,6 +42,7 @@ bool cmd_install(lm_ctx_t *ctx, config_t *config, args_t *args){
|
||||
|
||||
ssize_t current = 0, size = 0, save = 0, li = 0;
|
||||
bool ret = false, r = false, is_local = false;
|
||||
bool resolve_depends = !args_get_bool(args, "ignore-depends");
|
||||
lm_pkg_t *pkg = NULL, *locals = NULL;
|
||||
lm_ctx_resolve_list_t *list = NULL;
|
||||
char ssize[LONGSTR_MAX+3];
|
||||
@ -86,7 +89,7 @@ bool cmd_install(lm_ctx_t *ctx, config_t *config, args_t *args){
|
||||
}
|
||||
|
||||
// resolve the package and depends
|
||||
if((list = lm_ctx_resolve(ctx, pkg, list)) == NULL){
|
||||
if((list = lm_ctx_resolve(ctx, pkg, resolve_depends, list)) == NULL){
|
||||
error(_("Failed to resolve "FG_BOLD"%s"FG_RESET": %s"), name, lm_strerror());
|
||||
goto end;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user