summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-06-08Fix graph free valgrind warningsDan McGee1-11/+0
Due to the way we set up the graph structure, we don't always have good parent information. The changes made in dd8cf0c12dd5e assumed this, so back them out and just live with the dead pointers being there in the memory while we are cleaning up after ourselves. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-08pactest: only create install file if necessaryDan McGee1-2/+2
We were testing whether there were any values in the array, rather than looking if the values contained anything. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-08Plug a memory leakDan McGee1-0/+1
Introduced by me in commit cc25576f8b54b3. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07Merge branch 'maint'Dan McGee4-81/+85
Conflicts: lib/libalpm/add.c
2011-06-07pacman-key: update copyrightAllan McRae1-1/+1
Signed-off-by: Allan McRae <allan@archlinux.org>
2011-06-07Revamp pacman setup code to handle new alpm initialize routineDan McGee3-133/+140
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07Update utilities for new initialize/release methodsDan McGee4-34/+29
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07New signatures for alpm initialize and releaseDan McGee7-91/+72
These new method signatures return and take handle objects to operate on so we can move away from the idea of one global handle in the API. There is also another important change and that deals with the setting of root and dbpaths. These are now done at initialization time instead of using setter methods. This allows the library to operate more safely knowing that paths won't change underneath it. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07Add cachedirs one-by-one in set_cachedirs()Dan McGee1-2/+10
This addresses the issue where calling set_cachedirs() didn't canonicalize the passed-in paths. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07Be consistent with memory treatment for plural option settersDan McGee1-5/+5
In all cases we should duplicate the passed-in list so the caller is free to do with it as it pleases. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07Add helper methods for setting directory optionsDan McGee5-63/+64
This keeps duplicate code to a minimum. This will come in more handy as we refactor some of these option setters away. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07Transifex updatesv3.5.3Dan McGee2-79/+83
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07Remove incorrect output when downloading onlyAllan McRae1-1/+1
When only downloading a package, pacman can produce some incorrect output. > pacman -Sddw nvidia-utils warning: nvidia-utils-270.41.19-1 is up to date -- reinstalling This line is now now silenced when using -Sw. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-07makepkg: fix creation of source package with -pAllan McRae1-1/+1
When creating a source package using an non-local buildscript via the -p option, the inclusion of changelog and install files would fail. Fixes FS#24567. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Use standard errno codes in return from _alpm_archive_fgetsDan McGee5-18/+34
This allows us to not require the context (e.g. handle) when calling this function. Also beef up the checks in the two callers of this function to bail if the last return code is not ARCHIVE_EOF, which is the expected value. This requires a change to one of the pactest return codes and the overall result of the test, but results in a much safer operating condition whereby invalid database entries will stop the operation. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Remove global handle dependencies from sync/upgrade pathsDan McGee7-66/+55
This kills a lot more global handle business off. sync.c still requires the handle declaration for one reference that can't be changed yet; it will be removed in a future patch which isolates all of the necesary API changes. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Remove global handle from remove.cDan McGee5-36/+30
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Remove global handle from some package and db codeDan McGee6-41/+17
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Remove global handle from diskspace.cDan McGee3-14/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Remove global handle from util.cDan McGee6-38/+36
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Push down extern handle variable to files that need itDan McGee18-3/+48
This will make the patching process less invasive as we start to remove this variable from all source files. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Add handle attribute to pmpkg_t structDan McGee5-4/+10
Similar to what we just did for the database; this will make it easy to always know what handle a given package originated from. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Add handle attribute to pmdb_t structDan McGee5-2/+6
This is the first step in a long process to remove our dependence on the global handle variable we currently share in libalpm, with the goal to make things a bit more thread-safe and re-entrant. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Remove unnecessary handle != NULL assertsDan McGee2-15/+0
These are simple accessor functions for a struct; the handle never even comes into play when calling these functions. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Remove ALPM_LOG_FUNC macroDan McGee22-252/+0
The usefulness of this is rather limited due to it not being compiled into production builds. When you do choose to see the output, it is often overwhelming and not helpful. The best bet is to use a debugger and/or well-placed fprintf() statements. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Merge branch 'maint'Dan McGee6-23/+32
Conflicts: src/pacman/callback.c
2011-06-03Show net upgrade size on -U/-S operationsDan McGee2-2/+13
If it is different than the raw installed size metric we already show, compute the net upgrade size. For some sync operations, this can even be negative if newer packages are smaller than the ones they replace locally. Implements FS#12566. Example: Targets (1): telepathy-glib-0.14.7-1 Total Download Size: 1.07 MiB Total Installed Size: 15.72 MiB Net Upgrade Size: -0.29 MiB Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-03Add two currently failing test cases from bug reportsDan McGee2-0/+52
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-023.5.3 release preparationDan McGee2-2/+9
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-02repo-add: anchor exclusion pattern when generating filelistDan McGee1-1/+1
Fixes FS#24534. Dotfiles, such as /etc/skel/.bash_profile, were not being included in generated files entries. bsdtar --exclude option supports anchors on the pattern, so using "^.*" instead of ".*" solves our problem and still excludes all root-level dotfiles (e.g. .PKGINFO). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01lib/dload.c: remove assumption in continuation logicDave Reisner1-5/+3
Callers to curl_download_internal now tell us if its okay to continue a transfer, so obey this instead of using a heuristic. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01dload: abort transfer on CURLOPT_LOW_SPEED_LIMITDave Reisner1-0/+2
If a connection drops below 1kb/s for 10s, curl will kill the transfer and we'll report failure. This is the average transfer speed over the delta defined by CURLOPT_LOW_SPEED_TIME, so setting a low value here shouldn't bother folks using 14.4k dial-up. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01Ensure list_display works on outputs of unknown widthDan McGee3-19/+21
If getcols() returns 0, we were getting stuck before in a loop of no return. Teach getcols() to take a default value to return if the width is unknown, and use this everywhere as appropriate. Also make a few other cleanups while diagnosing this issue, such as const-ifying some variables. Noticed-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01doc: monospace attribute escape fixesDan McGee2-3/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01pacman-key: print default gpgdir in usagePang Yan Han1-1/+1
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01Merge branch 'maint'Dan McGee8-15/+18
2011-06-01Update pacman manpage and pacman.conf for gpgdirPang Yan Han2-5/+7
pacman.8.txt --gpgdir section is updated based on the pacman.conf manpage pacman.conf is updated to include the default GPGDir Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01doc: fix attribute substitution in monospaced textDan McGee3-8/+8
When I switched all paths to use `` formatting, I didn't realize substitution didn't work in these quote marks. Use ++ instead to ensure attributes are substituted where appropriate. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01doc: update Makefile for new asciidoc resource locationDan McGee1-2/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01doc: add a few more escapes and fix usage of {}Dan McGee2-1/+5
These addditional attributes come from the git asciidoc.conf file. Also, fix a place where we used {treename} without escaping the braces, causing the generated manpage to be missing text. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01Let pacman -v print GPG DirPang Yan Han1-0/+1
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-24alpm_list: fix typo in doxygen commentPang Yan Han1-1/+1
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-20Bail early if we don't have a valid lockfile pathDan McGee2-3/+2
This addresses FS#24292. If one does the bad thing of not checking pm_errno after calling set_dbpath(), you may not realize the initialization process went wrong and calling trans_init() resulted in a segfault. If we don't have a lockfile path, bail out and have trans_init() fail. Also remove a ALPM_LOG_FUNC call that was causing pm_errno to return "no handle"; this was due to a log call in the handle setup (whereby the log attempts to use a callback attached to the handle). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-20Merge branch 'maint'Dan McGee9-24/+80
Conflicts: lib/libalpm/trans.c src/pacman/query.c
2011-05-19Coding style cleanups; add a null checkDan McGee2-5/+10
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-16Ensure --print doesn't enable --noconfirm when not expectedDan McGee1-1/+1
This is at best a hack around the way we currently do our --print magic, but at least prevents someone from shooting themselves in the foot as indicated in FS#24287. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-16Fix segfault when uninstalling broken backed-up symlinkDan McGee2-3/+1
Issue FS#24230. If a symlink is broken and included in the removal process of a package, we blew up and segfaulted due to alpm_compute_md5sum() returning NULL and then performing a strcmp() operation. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-16Add test for FS#24230, dead backup symlink removalDan McGee1-0/+45
This currently causes a segfault, which is bad news. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-16pactest: treat symlinks with more respectDan McGee3-5/+11
Don't call os.stat() when we should be using os.lstat(); this allows us to actually test dead symlinks that don't have a corresponding file. Add a new LINK_EXIST rule that complements FILE_EXIST for a similar purpose. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-16Transifex updatesDan McGee1-7/+8
Signed-off-by: Dan McGee <dan@archlinux.org>