summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2008-04-07Remove a bit more download.h pollutionDan McGee2-7/+5
Kill it where it isn't absolutely necessary. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-07Remove unnecessary header file, move one macro to util.cDan McGee21-47/+5
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-07libalpm error cleanup, step 1Dan McGee6-29/+22
Remove unused error codes, begin refactoring some of the others. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-07Remove libdownload reference from pacman frontendDan McGee1-17/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-07Add quiet printout to --owns functionalityDan McGee1-3/+8
If we specify -q/--quiet on an --owns operation, only print a matching package name rather than the verbose human-readable message. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-06Quote filenames in find expression in pacdiffAllan McRae1-1/+1
From 41cc28f560bf9843d81ce5fb62b884b6325d06a0 Mon Sep 17 00:00:00 2001 From: Allan McRae <mcrae_allan@hotmail.com> Date: Sun, 6 Apr 2008 22:18:06 +1000 Subject: [PATCH] Quote filenames in find expression in pacdiff Small patch to allow pacdiff to run in /etc. See FS#10090. Signed-off-by: Allan McRae <mcrae_allan@hotmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-02Merge branch 'maint'Dan McGee5-10/+11
Conflicts: configure.ac contrib/Makefile.am
2008-04-02Update NEWS and configure.ac for 3.1.4 releasev3.1.4Dan McGee4-11/+11
Also fix a broken contrib/ Makefile, found with make distcheck. I also let the little translation linebreak update slip in here as it was small enough not to be a big deal, and this should just prevent it from happening again later anyway. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-04-02Set handle->logstream to null after fclose()Dan McGee1-0/+1
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-30Update -Ss and -Qs pactests to include groupsDan McGee2-0/+2
This update causes query003 to fail before commit 4b8ada818e21aae43b4f54f146ffa215fdb9213e. Hopefully the issue doesn't crop up again but we might as well test for it. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-30Enable display of multiple groups in -Ss and -Qs outputDan McGee2-6/+22
Not too complicated of a fix, but just adds some code to loop over the entire group list and space it out. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-30Fix segfault on -Qs usageDan McGee2-5/+3
This segfault creeped in as a result of commit bf867003. We were incorrectly assuming the group member of our package was a pmgrp_t list when in fact it is just a string list, which caused a segfault on any -Qs operation. Also slightly cleanup the -Ss code (which was originally correct unlike the -Qs code). Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-30Merge branch 'maint'Dan McGee3-7/+7
2008-03-30doc/pacman.8: fix manpage typoDan McGee1-2/+3
Fix a misspelling and make a clarification while we are at it. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-30Fix manpage typoDan McGee1-1/+1
Noticed in FS#10025. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-29Duplicate the result of archive_entry_pathname.Chantry Xavier1-2/+2
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 Gabor1-4/+4
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-27Read .PKGINFO directly from package fileDan McGee1-50/+11
With the addition of the archive_fgets() function, we can now skip the temp file usage in pkg_load/parse_descfile that was not needed. This has a nice benefit of probably being both faster, reducing code, and getting rid of "expensive" file operations. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-27Add an archive_fgets() functionDan McGee2-0/+31
This crude function allows reading from an archive on a line-by-line basis similar to the familiar fgets() call on a FILE stream. This is the first step in being able to read DB entries straight from an archive. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-27Make db->treename a pointerDan McGee2-3/+3
I really don't think we need statically allocated strings here. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-23Merge branch 'maint'Dan McGee3-1/+5
2008-03-23Avoid duplicated target names.Nagy Gabor4-39/+37
This patch should avoid duplicated target names in the backend. 1. sync_loadtarget will return with PM_ERR_TRANS_DUP_TARGET when trying to add a duplicated target 2. sysupgrade never pulls duplicated targets 3. resolvedeps won't pull duplicated targets anymore A pulled list was introduced in sync_prepare to improve the pmsyncpkg_t<->pmpkg_t list conversion by making it more direct. Also replace sync1005 and sync1006 by the sync1008 pactest, which is similar but more interesting (the provisions are dependencies instead of explicit targets). sync1005 didn't work as expected anyway. It was expecting that pacman failed, and pacman indeed failed, but not for the good reason. It didn't fail during the preparation step because of conflicting targets, but during the commit step, because of a md5 error... And sync1006 didn't pass and was not really worth fixing. We have already enough failing pactests more important than these two. sync1008 pass with this patch. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-23memleak fix: ensure we free result of get_destfile()Dan McGee1-6/+5
In the file:// download case, we didn't free the return from get_destfile() after we were done with it. Fix it. (Found with xfercommand001.py) Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-23memleak fix: ensure backup fname isn't lost if unusedDan McGee2-0/+4
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 McGee1-1/+1
We dup-ed the string but then duped it again. Fix it. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-23Switch pmgrp_t to dynamic allocation, general group cleanupDan McGee6-63/+74
Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-23Add -q (quiet) option to valgrind call in pactestDan McGee1-1/+1
This gets rid of a lot of the unnecessary verbosity in the --valgrind output when running all the tests. It should also make diff-ing output between test runs a lot easier. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-23Update database mtime after it has been extractedDan McGee1-8/+12
This will reduce the need for running an -Syy if the DB was only half-extracted, as the mtime won't get updated until the new database is completely in place. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-23Add new CleanMethod option.Chantry Xavier5-21/+83
As it was already mentioned several times, the new -Sc behavior in 3.1 is great, but only when the package cache is not shared. This option has two possible values : KeepInstalled and KeepCurrent With KeepCurrent, -Sc will clean packages that are no longer available in any sync db, rather than packages that are no longer in the local db. The resulting behavior should be better for shared cache. Ref : http://www.archlinux.org/pipermail/pacman-dev/2008-February/011140.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-22Kill the dependsonly option.Chantry Xavier9-57/+4
From the man page : "This is pretty useless and we're not sure why it even exists." Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-22Merge branch 'maint'Dan McGee4-92/+111
2008-03-22PKGBUILD.vim: add keepend keyword for sha1/md5 fieldsChantry Xavier1-2/+2
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)1-40/+40
A little fine tuning, delete some unnecessary space before or after English word. Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-18Kill PM_TRANS_TYPE_ADD.Chantry Xavier8-28/+12
This was totally useless. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-18Kill some obsolete references to -A option.Chantry Xavier3-16/+5
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-18Drop case insensitive comparisons in the config parsing.Chantry Xavier11-40/+32
These case insensitive comparisons didn't work in some locales, like tr_TR where upper(i) != I. So a second case sensitive comparison had to be made for each directive. Only keeping case sensitive comparisons make the code cleaner and treat all locales equally. Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011445.html Also fix pactests to use the correct case. Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-16Add zipman makepkg option.Chantry Xavier5-35/+46
All other steps in tidy_install function were already controlled by an option in makepkg.conf, so this patch adds an option for the man page compression step too. This will allow to keep man pages uncompressed, which is required for some special meta man page, like the zshall one (see FS#4580). Ref: http://www.archlinux.org/pipermail/pacman-dev/2008-March/011472.html Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-11Show options in pacman.conf (commented out)Nagy Gabor1-0/+14
Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2008-03-11Add -Rss optionNagy Gabor6-5/+51
* -Rss removes all dependencies (including explicitly installed ones). * updated documentation * two pactest files added to test the difference between -Rs and -Rss Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2008-03-11po/zh_CN.po: Chinese Simplified translation update甘露(Lu.Gan)1-50/+52
Signed-off-by: Chantry Xavier <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-11PKGBUILD.vim: improve invalid arch/license detection.Chantry Xavier1-3/+3
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-11Clarify the NoUpgrade and NoExtract behavior.Chantry Xavier1-2/+5
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-11Remove trans->targetsNagy Gabor6-31/+7
Its implementation was quite broken: * add_loadtarget() might have silently filtered out some targets when replacing an older version. * This was used in sync.c to determine whether a target is implicit or not, which is incorrect behavior. Before this patch we silently removed user confirmed replacements; now we always warn on a replacement. * remove001.py behavior was quite odd in adding same target 5 times to the target list, we can change this behavior to be a failure. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> [Xav: changed remove001 pactest accordingly] Signed-off-by: Chantry Xavier <shiningxc@gmail.com> [Dan: rewrote commit message] Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-11makepkg: Support for resuming source downloadsRoman Kyrylych3-7/+27
Download to *.part and remove the suffix if successful, thus md5sums will be checked only for complete files, and next time makepkg will resume downloading of partial file instead of complaining about invalid md5sums. Old DLAGENTS format is still supported. Late fix: Do not try to download %u first The output of grep was not suppressed, thus the output of get_downloadcmd was wrong because of extra line at the beginning that contained an unsubstituted (with %o and %u) entry from DLAGENTS. Signed-off-by: Roman Kyrylych <roman@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2008-03-09Merge branch 'maint'Dan McGee37-7990/+2292
Conflicts: configure.ac
2008-03-09Refactoring of the download code.Chantry Xavier1-279/+307
This should be the main step in the download refactoring initiated by commit 81a2a06818d367f8528c74311171417beb9e1592. The stub functions introduced by that commit were implemented. The big download code was mostly composed of two steps, and so it has been naturally splitted in two functions : download_external and download_internal file:/// urls are now handled manually, instead of forcing the use of the internal downloader. Thanks to Dan for fixing the remaining issues and cleaning up the patch :) Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2008-03-09Use sigaction instead of signal.Chantry Xavier1-4/+19
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 Xavier1-18/+25
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 Gabor1-1/+0
We do the opposite. Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu>
2008-03-09rename vimproject to vimprojects and update it.Chantry Xavier3-98/+26
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>