mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-12 04:15:06 -05:00
Merge branch 'maint'
Conflicts due to change in return calling style. Conflicts: src/pacman/pacman.c src/pacman/sync.c
This commit is contained in:
commit
0ff52b6845
@ -214,6 +214,7 @@ _pacman_completions_all_groups() {
|
||||
local -a cmd groups
|
||||
_pacman_get_command
|
||||
groups=( $(_call_program groups $cmd[@] -Sg) )
|
||||
typeset -U groups
|
||||
compadd "$@" -a groups
|
||||
}
|
||||
|
||||
@ -221,23 +222,20 @@ _pacman_completions_all_groups() {
|
||||
# these can be specified as either 'package' or 'repository/package'
|
||||
_pacman_completions_all_packages() {
|
||||
local -a cmd packages repositories packages_long
|
||||
_pacman_get_command
|
||||
|
||||
if compset -P1 '*/*'; then
|
||||
packages=( $(_call_program packages $cmd[@] -Sql ${words[CURRENT]%/*}) )
|
||||
typeset -U packages
|
||||
_wanted repo_packages expl "repository/package" compadd ${(@)packages}
|
||||
else
|
||||
packages=( $(_call_program packages $cmd[@] -Sql) )
|
||||
typeset -U packages
|
||||
_wanted packages expl "packages" compadd - "${(@)packages}"
|
||||
|
||||
repositories=(${(o)${${${(M)${(f)"$(<@sysconfdir@/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||
typeset -U repositories
|
||||
packages_long=(@localstatedir@/lib/pacman/sync/${^repositories}/*(/))
|
||||
packages=(${(o)${${packages_long#@localstatedir@/lib/pacman/sync/}#*/}%-*-*} )
|
||||
typeset -U packages
|
||||
_wanted packages expl "packages" compadd - "${(@)packages}"
|
||||
if [[ $PREFIX != */* ]] ; then
|
||||
repositories=(${(o)${${${(M)${(f)"$(<@sysconfdir@/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
|
||||
typeset -U repositories
|
||||
_wanted repo_packages expl "repository/package" compadd -S "/" $repositories
|
||||
else
|
||||
compset -P '*/'
|
||||
packages_long=(@localstatedir@/lib/pacman/sync/$IPREFIX*(/))
|
||||
packages=(${(o)${${packages_long#@localstatedir@/lib/pacman/sync/}#*/}%-*-*} )
|
||||
typeset -U packages
|
||||
_wanted repo_packages expl "repository/package" compadd ${(@)packages}
|
||||
fi
|
||||
}
|
||||
|
||||
@ -245,7 +243,7 @@ _pacman_completions_all_packages() {
|
||||
_pacman_completions_installed_groups() {
|
||||
local -a cmd groups
|
||||
_pacman_get_command
|
||||
groups=(${(o)${(f)"$(pacman -Qg)"}% *})
|
||||
groups=(${(o)${(f)"$(_call_program groups $cmd[@] -Qg)"}% *})
|
||||
typeset -U groups
|
||||
compadd "$@" -a groups
|
||||
}
|
||||
|
@ -35,6 +35,21 @@ kbabel. Using a translation tool tends to make the job easier.
|
||||
Please read up on Transifex usage using the
|
||||
http://help.transifex.net/[Transifex Help] if you are not familiar.
|
||||
|
||||
Here is an example set of commands if you have a source code checkout and are
|
||||
not worried about any local translations being overwritten. The .tx/ directory
|
||||
is checked into the git repository so is preconfigured with the two project
|
||||
resources (See `tx status` output for a quick overview).
|
||||
|
||||
tx pull -f
|
||||
poedit po/<mylang>.po
|
||||
poedit lib/libalpm/po/<mylang>.po
|
||||
tx push -t -l <mylang>
|
||||
|
||||
Or to just push one of the two available resources:
|
||||
|
||||
tx push -r archlinux-pacman.pacman-pot -t -l fi
|
||||
tx push -r archlinux-pacman.libalpm-pot -t -l fi
|
||||
|
||||
See the <<Notes,Notes>> section for additional hints on translating.
|
||||
|
||||
Pre-release Updates
|
||||
|
@ -995,10 +995,10 @@ pmdb_t *_alpm_db_register_local(void)
|
||||
_alpm_log(PM_LOG_DEBUG, "registering local database\n");
|
||||
|
||||
db = _alpm_db_new("local", 1);
|
||||
db->ops = &local_db_ops;
|
||||
if(db == NULL) {
|
||||
RET_ERR(PM_ERR_DB_CREATE, NULL);
|
||||
}
|
||||
db->ops = &local_db_ops;
|
||||
|
||||
handle->db_local = db;
|
||||
return db;
|
||||
|
@ -345,7 +345,7 @@ static void find_requiredby(pmpkg_t *pkg, pmdb_t *db, alpm_list_t **reqs)
|
||||
pmpkg_t *cachepkg = i->data;
|
||||
if(_alpm_dep_edge(cachepkg, pkg)) {
|
||||
const char *cachepkgname = cachepkg->name;
|
||||
if(alpm_list_find_str(*reqs, cachepkgname) == 0) {
|
||||
if(alpm_list_find_str(*reqs, cachepkgname) == NULL) {
|
||||
*reqs = alpm_list_add(*reqs, strdup(cachepkgname));
|
||||
}
|
||||
}
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: pacman 3.5.0\n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||
"POT-Creation-Date: 2011-03-16 19:34-0500\n"
|
||||
"POT-Creation-Date: 2011-03-20 12:35-0500\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"
|
||||
@ -188,7 +188,11 @@ msgid "could not determine mount point for file %s\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "could not determine filesystem mount points"
|
||||
msgid "could not determine filesystem mount points\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "could not determine root mount point %s\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
|
@ -8,7 +8,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: pacman 3.5.0\n"
|
||||
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\n"
|
||||
"POT-Creation-Date: 2011-03-14 13:57-0500\n"
|
||||
"POT-Creation-Date: 2011-03-20 23:07-0500\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"
|
||||
@ -614,11 +614,8 @@ msgid "could not change directory to %s (%s)\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "directive '%s' without value not recognized\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "directive '%s' with a value not recognized\n"
|
||||
msgid ""
|
||||
"config file %s, line %d: directive '%s' in section '%s' not recognized.\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
@ -652,17 +649,7 @@ msgid "config file %s, line %d: All directives must belong to a section.\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "config file %s, line %d: directive %s needs a value\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid "config file %s, line %d: problem in options section\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
msgid ""
|
||||
"config file %s, line %d: directive '%s' in repository section '%s' not "
|
||||
"recognized.\n"
|
||||
msgid "config file %s, line %d: directive '%s' needs a value\n"
|
||||
msgstr ""
|
||||
|
||||
#, c-format
|
||||
|
@ -740,7 +740,8 @@ static int parseargs(int argc, char *argv[])
|
||||
} else if(opt == '?') {
|
||||
/* this should have failed during first pass already */
|
||||
return 1;
|
||||
} else if(parsearg_op(opt, 1) == 0) { /* opt is an operation */
|
||||
} else if(parsearg_op(opt, 1) == 0) {
|
||||
/* opt is an operation */
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -757,18 +758,17 @@ static int parseargs(int argc, char *argv[])
|
||||
case PM_OP_SYNC:
|
||||
result = parsearg_sync(opt);
|
||||
break;
|
||||
case PM_OP_DEPTEST:
|
||||
result = 1;
|
||||
break;
|
||||
case PM_OP_UPGRADE:
|
||||
result = parsearg_upgrade(opt);
|
||||
break;
|
||||
case PM_OP_DEPTEST:
|
||||
default:
|
||||
pm_printf(PM_LOG_ERROR, _("no operation specified (use -h for help)\n"));
|
||||
return 1;
|
||||
result = 1;
|
||||
break;
|
||||
}
|
||||
if (result == 0)
|
||||
if (result == 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
/* fall back to global options */
|
||||
result = parsearg_global(opt);
|
||||
@ -1230,9 +1230,7 @@ static int _parseconfig(const char *file, const char *givensection,
|
||||
}
|
||||
|
||||
cleanup:
|
||||
if(fp) {
|
||||
fclose(fp);
|
||||
}
|
||||
if(section){
|
||||
free(section);
|
||||
}
|
||||
|
@ -637,6 +637,8 @@ static int process_group(alpm_list_t *dbs, char *group)
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
if(config->print == 0) {
|
||||
printf(_(":: There are %d members in group %s:\n"), count,
|
||||
group);
|
||||
select_display(pkgs);
|
||||
@ -650,12 +652,22 @@ static int process_group(alpm_list_t *dbs, char *group)
|
||||
|
||||
if(process_pkg(pkg) == 1) {
|
||||
ret = 1;
|
||||
free(array);
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for(i = pkgs; i; i = alpm_list_next(i)) {
|
||||
pmpkg_t *pkg = alpm_list_getdata(i);
|
||||
|
||||
if(process_pkg(pkg) == 1) {
|
||||
ret = 1;
|
||||
goto cleanup;
|
||||
}
|
||||
}
|
||||
}
|
||||
cleanup:
|
||||
alpm_list_free(pkgs);
|
||||
free(array);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user