summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-04-01Set handle->logstream to null after fclose()Dan McGee
We correctly closed the logfile stream when recalling set_logfile, but did not NULL out the dead pointer once we did this. Fix the problem which was the cause of FS#10056. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-30Fix manpage typoDan McGee
Noticed in FS#10025. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-28Duplicate the result of archive_entry_pathname.Chantry Xavier
After the libarchive upgrade from 2.4.12 to 2.4.14, our usage of archive_entry_pathname became dangerous. We were using the result of that function even after calls to archive_entry_set_pathname. With 2.4.14, the entryname becomes wrong after these calls, and so all the future use of entryname are bogus. entryname is used quite a lot for logging, so that's not so bad. But it's also used for the backup handling, so that's not very cool. For example, reinstalling a package with backup entries will erase all the md5 entries from the DB, because they won't be found back. entryname is now a static string so that we can easily keep the result of archive_entry_pathname. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: fixed version numbers in commit message] Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-28Use pkgcache instead of db_scan in remove.cNagy Gabor
This should be a notable speed-up (apart from kernel cache). Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-23memleak fix: ensure backup fname isn't lost if unusedDan McGee
The _alpm_backup_split function always alloced memory for the fname, and we let it disappear in a specific case (upgrade026.py). Fix the issue. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-23strsplit(): memleak fixDan McGee
We dup-ed the string but then duped it again. Fix it. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-22PKGBUILD.vim: add keepend keyword for sha1/md5 fieldsChantry Xavier
in PKGBUILD.proto, we have the following line md5sums=() #generate with 'makepkg -g' if we add a md5sum inside quotes, or even just the quotes : md5sums=('') #generate with 'makepkg -g' the highlighting will be totally messed up. Adding the keepend keyword fixes this. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-22Updates to Simplified Chinese translation甘露(Lu.Gan)
A little fine tuning, delete some unnecessary space before or after English word. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-10Show options in pacman.conf (commented out)Nagy Gabor
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2008-03-10po/zh_CN.po: Chinese Simplified translation update甘露(Lu.Gan)
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-10PKGBUILD.vim: improve invalid arch/license detection.Chantry Xavier
If we had : arch=(fake) The fake string would be highlighted because it's invalid. But if we had : arch=('fake') it didn't work. Fix this for both arch and license arrays. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-10Clarify the NoUpgrade and NoExtract behavior.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-09Use sigaction instead of signal.Chantry Xavier
From signal man page : "The behavior of signal() varies across Unix versions, and has also varied historically across different versions of Linux. Avoid its use: use sigaction(2) instead. See Portability below." The code was taken from there : http://www.gnu.org/software/libtool/manual/libc/Sigaction-Function-Example.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-09src/pacman/pacman.c : split cleanup function.Chantry Xavier
This function was used in two different ways : - as a signal handler : the argument was the signal number - called manually for freeing the resources : the argument was the return value So the first part is now handler(int), and the second cleanup(int). Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011388.html Remaining problems : - the return values are messy. for example, 2 can mean both that it was interrupted (SIGINT == 2), or that --help or -V was used (returned by parseargs). - apparently signal is not portable and sigaction should be used instead Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-09Remove a bogus comment from libalpm/remove.cNagy Gabor
We do the opposite. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2008-03-08rename vimproject to vimprojects and update it.Chantry Xavier
There is no need to put the list of files in there, which will get outdated sooner or later. It's possible to generate the filelist in the plugin itself using \r. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: add scripts/ directory] Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-08Updates to Russian translationSergey Tereschenko
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-06Updates before 3.1.3 releasev3.1.3Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-06New alpm_version functionNagy Gabor
Now pacman frontend uses this function instead of the compile-time libalpm version number. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: fix one more spot where LIB_VERSION was used] Signed-off-by: Dan McGee <dan@archlinux.org> (cherry picked from commit 49197b7492d61bf1fc6bef59a708f4f586f32edb)
2008-03-04Update Czech translationVojtěch Gondžala
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-04Update TRANSLATORS file.Chantry Xavier
* Vojtěch has a new email address * New pt_BR translator needed : http://www.archlinux.org/pipermail/pacman-dev/2008-March/011313.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-04Remove a bogus commentNagy Gabor
This comment was created for the old provision version format and needless. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-03Kill all of the line numbers from the translationsDan McGee
Hopefully the last of the huge commits ever. This also adds the c-format tag to all of the translated messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-03Disable the line number in .po files.Chantry Xavier
Add the --no-location xgettext option to disable the line numbers. They are not very useful, and generate a huge number of pointless line changes on every update. Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011332.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-03Update manually the only newline change for 3.1.3.Chantry Xavier
We only had one string change, and just a newline, so we can actually make this update in its own commit rather than updating pacman.pot and making a huge number of line changes, and then letting every translator do this newline fix separately. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-03Convert Hungarian translation translation to UTF-8Dan McGee
The issue was discussed in this thread on the mailing list: http://archlinux.org/pipermail/pacman-dev/2008-March/011324.html In addition, the GNU gettext manual states that translation encoding is completely separate from the encoding used by the users of the translation. It makes sense for our project to use UTF-8 for all translations, regardless of the preferred encoding used by users of a certain language. This allows all contributors to more easily edit a translation file if necessary and not have to worry about codepage issues. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-03Small update to German translationMatthias Gorissen
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-02contrib/PKGBUILD.vim: add optdepends + other fixesChantry Xavier
* Add optdepends keyword * license, backup and arch keywords should be arrays * Remove the little hack to color conflicts/provides/replaces keyword even without =(). These should be arrays too. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-01NEWS updates for 3.1.3Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-01testpkg reworkNagy Gabor
* mainly code cosmetics (indent fixes) * remove debug message "spam" * print also user friendly result Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Dan: a few more whitespace/linebreak cleanups added] Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-01Set a missing pm_errno in _alpm_pkg_load()Nagy Gabor
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-28contrib: add 'groups' keyword to PKGBUILD.vimDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-27Remove small remnant of old force=y optionDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-25Bump pacman version to a devel release and next version numberDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-25Update simplified chinese (zh_CN) translation.甘露(Lu.Gan)
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25fix two broken translated strings.Chantry Xavier
Using c-format on every strings allowed me two found two broken ones. One was harmless, but the other caused a segfault, as reported in FS#9658. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25xgettext : change pass-c-format flag to c-format.Chantry Xavier
Currently xgettext apparently attempts to autodetect c format strings (eg a string with a %s) to decide whether to use c-format flag or not. If we use --flag=_:1:c-format instead of --flag=_:1:pass-c-format, the c-format will be applied everywhere. I couldn't find this documented anywhere though. But the pass prefix is mentioned here : http://www.gnu.org/software/gettext/manual/html_node/xgettext-Invocation.html#xgettext-Invocation "Specifies additional flags for strings occurring as part of the argth argument of the function word. The possible flags are the possible format string indicators, such as ‘c-format’, and their negations, such as ‘no-c-format’, possibly prefixed with ‘pass-’." And c-format is documented there : http://www.gnu.org/software/gettext/manual/html_node/c_002dformat-Flag.html#c_002dformat-Flag "This situation happens quite often. The printf function is often called with strings which do not contain a format specifier. Of course one would normally use fputs but it does happen. In this case xgettext does not recognize this as a format string but what happens if the translation introduces a valid format specifier? The printf function will try to access one of the parameters but none exists because the original code does not pass any parameters." And that's exactly what happened with FS#9658. So using c-format for every string will prevent this issue from happening again. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25Remove done and failed msg when loading targets.Chantry Xavier
This change is similar to the one made in 3017b71cb5cde3aef7e0efb5f49843cccf759956. We had a "loading package data..." message, followed by either "failed" or "done", but it didn't take into account that other warnings / questions could be displayed between. Ref: http://archlinux.org/pipermail/pacman-dev/2008-January/010971.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25libalpm/sync.c : fix poorly worded debug message.Chantry Xavier
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-25Update TRANSLATORS file.Chantry Xavier
The header of that file already stated that only current translators were listed in that file. So there is no need to mark the current translators with a star, I just removed the old ones instead (all history of that file is kept in git anyway). Current translators = all translators who contributed to 3.1.x translations. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-24Add some NULL checks into recently modified output functionsDan McGee
After a merge with master where some strings we print (such as descriptions) could be NULL, a few segfaults popped up due to strlen() calls on null pointers. Fix this by doing some preemptive checks and returning from functions early if the string was null. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-24Update Russian translationSergey Tereschenko
Some corrections from the previous translation. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22A few more wide character output fixesDan McGee
Fix up the indentprint and list printing functions so they work properly. This output can be seen in places such as -Ss, -Si, -Qs, and -Qi. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22Fix wide character output for add/remove/upgrade/conflict progressDan McGee
Due to the addition of the Chinese translation, our column widths were all messed up as mentioned in the download progress commit fixing this same problem there. This is a port of the code and ideas from that fix to the installation progress bars. Once again, a handful of examples were tested to ensure we work in all locales and with varying byte and char widths. English (before & after): (1/1) checking for file conflicts [-----------------] 100% (1/1) upgrading man-pages [-----------------] 100% German (before & after): (1/1) Prüfe auf Dateikonflikte [-----------------] 100% (1/1) Aktualisiere man-pages [-----------------] 100% Chinese (before): (1/1) 正在检查文件冲突 [-----------------] 100% (1/1) 生在升级 man-pages [c o o o o o ] (1/1) 生在升级 man-pages [----------C o o ] (1/1) 生在升级 man-pages [-----------------] 100% Chinese (after): (1/1) 正在检查文件冲突 [-----------------] 100% (1/1) 生在升级 man-pages [-----------------] 100% Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22Fix wide character output for download progressDan McGee
Now that we have a Chinese translation, all of the problems with new character sets crop up. Assumptions were made in the past that all characters occupied one column, which is not true with a Chinese character set. In addition, the download code even failed on such things as 'ö', which is two bytes wide but only 1 column. This code will need to also be ported to the add/remove/upgrade/conflicts progress printouts. Note that the tests below try to incorporate a number of things: 1. download filenames too long to fit 2. download filenames cut off in the middle of a multibyte sequence 3. download filenames incorporating multicolumn chars 4. download filenames incorporating multibyte, single-column chars 5. 'plain' download filenames that have always worked Before: :: 正在同步软件包数据库…… 正在解决倚赖��... 0.0K 199.8K/s 00:00:00 [-----------------] 100% 错误:无法升级正在解决倚赖关系junköëjunköëjunköëäää (未预计的系统错误) 正在解决倚赖��... 0.0K 308.4K/s 00:00:00 [-----------------] 100% 错误:无法升级正在解决倚赖关系 (未预计的系统错误) junköëä 0.0K 390.6K/s 00:00:00 [-----------------] 100% 错误:无法升级junköëä (未预计的系统错误) pacman-git 0.5K 4.3M/s 00:00:00 [-----------------] 100% 本地数据库已是最新的 After: :: 正在同步软件包数据库…… 正在解决倚赖关系jun... 0.0K 89.7K/s 00:00:00 [-----------------] 100% 错误:无法升级正在解决倚赖关系junköëjunköëjunköëäää (未预计的系统错误) 正在解决倚赖关系 0.0K 147.7K/s 00:00:00 [-----------------] 100% 错误:无法升级正在解决倚赖关系 (未预计的系统错误) junköëä 0.0K 156.9K/s 00:00:00 [-----------------] 100% 错误:无法升级junköëä (未预计的系统错误) pacman-git 0.5K 1515.9K/s 00:00:00 [-----------------] 100% 本地数据库已是最新的 Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-22Add new Simplified Chinese translation甘露(Lu.Gan)
Thanks a lot! Now we get to fix the breakage this causes in output messages. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-20Updates before 3.1.2 releasev3.1.2Dan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-02-20Fix two missing BUILDSCRIPT variables in makepkg.Mark Constable
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-19Lock the database on -Sc operation.Chantry Xavier
This partly fixes FS#9609. Weird things could happen when running -Sc while another instance was already running. The cleancache function could delete packages that were just being downloaded. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-02-19Add new sync_trans_init and sync_trans_release.Chantry Xavier
Factorize these two functions to avoid code duplication, especially since they could be used for locking the database during -Sc and -Sy operation too. Signed-off-by: Chantry Xavier <shiningxc@gmail.com>