diff options
-rw-r--r-- | contrib/zsh_completion.in | 26 | ||||
-rw-r--r-- | doc/translation-help.txt | 15 | ||||
-rw-r--r-- | lib/libalpm/be_local.c | 2 | ||||
-rw-r--r-- | lib/libalpm/package.c | 2 | ||||
-rw-r--r-- | lib/libalpm/po/libalpm.pot | 8 | ||||
-rw-r--r-- | po/pacman.pot | 21 | ||||
-rw-r--r-- | src/pacman/pacman.c | 18 | ||||
-rw-r--r-- | src/pacman/sync.c | 40 |
8 files changed, 73 insertions, 59 deletions
diff --git a/contrib/zsh_completion.in b/contrib/zsh_completion.in index 16919134..2131412c 100644 --- a/contrib/zsh_completion.in +++ b/contrib/zsh_completion.in @@ -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 } diff --git a/doc/translation-help.txt b/doc/translation-help.txt index 5be15dff..d95b5135 100644 --- a/doc/translation-help.txt +++ b/doc/translation-help.txt @@ -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 diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index d023fcd7..82c1d591 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -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; diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 2acaa17f..445653ec 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -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)); } } diff --git a/lib/libalpm/po/libalpm.pot b/lib/libalpm/po/libalpm.pot index ba88318b..b4a5da66 100644 --- a/lib/libalpm/po/libalpm.pot +++ b/lib/libalpm/po/libalpm.pot @@ -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 diff --git a/po/pacman.pot b/po/pacman.pot index 9ab5d701..4fce2719 100644 --- a/po/pacman.pot +++ b/po/pacman.pot @@ -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 diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index 6d377d2e..e4555c03 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -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); - } + fclose(fp); if(section){ free(section); } diff --git a/src/pacman/sync.c b/src/pacman/sync.c index 9f6c3e09..b12206c4 100644 --- a/src/pacman/sync.c +++ b/src/pacman/sync.c @@ -637,25 +637,37 @@ static int process_group(alpm_list_t *dbs, char *group) return 1; } - printf(_(":: There are %d members in group %s:\n"), count, - group); - select_display(pkgs); - char *array = malloc(count); - multiselect_question(array, count); - int n = 0; - for(i = pkgs; i; i = alpm_list_next(i)) { - if(array[n++] == 0) - continue; - pmpkg_t *pkg = alpm_list_getdata(i); - if(process_pkg(pkg) == 1) { - ret = 1; - goto cleanup; + if(config->print == 0) { + printf(_(":: There are %d members in group %s:\n"), count, + group); + select_display(pkgs); + char *array = malloc(count); + multiselect_question(array, count); + int n = 0; + for(i = pkgs; i; i = alpm_list_next(i)) { + if(array[n++] == 0) + continue; + pmpkg_t *pkg = alpm_list_getdata(i); + + 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; } |