1
0
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:
Dan McGee 2011-03-21 07:53:13 -05:00
commit 0ff52b6845
8 changed files with 73 additions and 59 deletions

View File

@ -214,6 +214,7 @@ _pacman_completions_all_groups() {
local -a cmd groups local -a cmd groups
_pacman_get_command _pacman_get_command
groups=( $(_call_program groups $cmd[@] -Sg) ) groups=( $(_call_program groups $cmd[@] -Sg) )
typeset -U groups
compadd "$@" -a groups compadd "$@" -a groups
} }
@ -221,23 +222,20 @@ _pacman_completions_all_groups() {
# these can be specified as either 'package' or 'repository/package' # these can be specified as either 'package' or 'repository/package'
_pacman_completions_all_packages() { _pacman_completions_all_packages() {
local -a cmd packages repositories packages_long 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}) repositories=(${(o)${${${(M)${(f)"$(<@sysconfdir@/pacman.conf)"}:#\[*}/\[/}/\]/}:#options})
typeset -U repositories typeset -U repositories
_wanted repo_packages expl "repository/package" compadd -S "/" $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 fi
} }
@ -245,7 +243,7 @@ _pacman_completions_all_packages() {
_pacman_completions_installed_groups() { _pacman_completions_installed_groups() {
local -a cmd groups local -a cmd groups
_pacman_get_command _pacman_get_command
groups=(${(o)${(f)"$(pacman -Qg)"}% *}) groups=(${(o)${(f)"$(_call_program groups $cmd[@] -Qg)"}% *})
typeset -U groups typeset -U groups
compadd "$@" -a groups compadd "$@" -a groups
} }

View File

@ -35,6 +35,21 @@ kbabel. Using a translation tool tends to make the job easier.
Please read up on Transifex usage using the Please read up on Transifex usage using the
http://help.transifex.net/[Transifex Help] if you are not familiar. 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. See the <<Notes,Notes>> section for additional hints on translating.
Pre-release Updates Pre-release Updates

View File

@ -995,10 +995,10 @@ pmdb_t *_alpm_db_register_local(void)
_alpm_log(PM_LOG_DEBUG, "registering local database\n"); _alpm_log(PM_LOG_DEBUG, "registering local database\n");
db = _alpm_db_new("local", 1); db = _alpm_db_new("local", 1);
db->ops = &local_db_ops;
if(db == NULL) { if(db == NULL) {
RET_ERR(PM_ERR_DB_CREATE, NULL); RET_ERR(PM_ERR_DB_CREATE, NULL);
} }
db->ops = &local_db_ops;
handle->db_local = db; handle->db_local = db;
return db; return db;

View File

@ -345,7 +345,7 @@ static void find_requiredby(pmpkg_t *pkg, pmdb_t *db, alpm_list_t **reqs)
pmpkg_t *cachepkg = i->data; pmpkg_t *cachepkg = i->data;
if(_alpm_dep_edge(cachepkg, pkg)) { if(_alpm_dep_edge(cachepkg, pkg)) {
const char *cachepkgname = cachepkg->name; 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)); *reqs = alpm_list_add(*reqs, strdup(cachepkgname));
} }
} }

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: pacman 3.5.0\n" "Project-Id-Version: pacman 3.5.0\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -188,7 +188,11 @@ msgid "could not determine mount point for file %s\n"
msgstr "" msgstr ""
#, c-format #, 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 "" msgstr ""
#, c-format #, c-format

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: pacman 3.5.0\n" "Project-Id-Version: pacman 3.5.0\n"
"Report-Msgid-Bugs-To: http://bugs.archlinux.org/index.php?project=3\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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -614,11 +614,8 @@ msgid "could not change directory to %s (%s)\n"
msgstr "" msgstr ""
#, c-format #, c-format
msgid "directive '%s' without value not recognized\n" msgid ""
msgstr "" "config file %s, line %d: directive '%s' in section '%s' not recognized.\n"
#, c-format
msgid "directive '%s' with a value not recognized\n"
msgstr "" msgstr ""
#, c-format #, c-format
@ -652,17 +649,7 @@ msgid "config file %s, line %d: All directives must belong to a section.\n"
msgstr "" msgstr ""
#, c-format #, c-format
msgid "config file %s, line %d: directive %s needs a value\n" 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"
msgstr "" msgstr ""
#, c-format #, c-format

View File

@ -740,7 +740,8 @@ static int parseargs(int argc, char *argv[])
} else if(opt == '?') { } else if(opt == '?') {
/* this should have failed during first pass already */ /* this should have failed during first pass already */
return 1; 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; continue;
} }
@ -757,18 +758,17 @@ static int parseargs(int argc, char *argv[])
case PM_OP_SYNC: case PM_OP_SYNC:
result = parsearg_sync(opt); result = parsearg_sync(opt);
break; break;
case PM_OP_DEPTEST:
result = 1;
break;
case PM_OP_UPGRADE: case PM_OP_UPGRADE:
result = parsearg_upgrade(opt); result = parsearg_upgrade(opt);
break; break;
case PM_OP_DEPTEST:
default: default:
pm_printf(PM_LOG_ERROR, _("no operation specified (use -h for help)\n")); result = 1;
return 1; break;
} }
if (result == 0) if (result == 0) {
continue; continue;
}
/* fall back to global options */ /* fall back to global options */
result = parsearg_global(opt); result = parsearg_global(opt);
@ -1230,9 +1230,7 @@ static int _parseconfig(const char *file, const char *givensection,
} }
cleanup: cleanup:
if(fp) {
fclose(fp); fclose(fp);
}
if(section){ if(section){
free(section); free(section);
} }

View File

@ -637,6 +637,8 @@ static int process_group(alpm_list_t *dbs, char *group)
return 1; return 1;
} }
if(config->print == 0) {
printf(_(":: There are %d members in group %s:\n"), count, printf(_(":: There are %d members in group %s:\n"), count,
group); group);
select_display(pkgs); select_display(pkgs);
@ -650,12 +652,22 @@ static int process_group(alpm_list_t *dbs, char *group)
if(process_pkg(pkg) == 1) { if(process_pkg(pkg) == 1) {
ret = 1; ret = 1;
free(array);
goto cleanup; 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: cleanup:
alpm_list_free(pkgs); alpm_list_free(pkgs);
free(array);
return ret; return ret;
} }