Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2011-06-03Push down extern handle variable to files that need itDan McGee
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 McGee
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 McGee
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 McGee
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 McGee
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-02Merge branch 'maint'Dan McGee
Conflicts: src/pacman/callback.c
2011-06-02Show net upgrade size on -U/-S operationsDan McGee
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-02Add two currently failing test cases from bug reportsDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-023.5.3 release preparationDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-02repo-add: anchor exclusion pattern when generating filelistDan McGee
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 Reisner
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 Reisner
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 McGee
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 McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01pacman-key: print default gpgdir in usagePang Yan Han
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01Merge branch 'maint'Dan McGee
2011-06-01Update pacman manpage and pacman.conf for gpgdirPang Yan Han
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 McGee
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 McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-01doc: add a few more escapes and fix usage of {}Dan McGee
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 Han
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 Han
Signed-off-by: Pang Yan Han <pangyanhan@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-19Bail early if we don't have a valid lockfile pathDan McGee
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-19Merge branch 'maint'Dan McGee
Conflicts: lib/libalpm/trans.c src/pacman/query.c
2011-05-19Coding style cleanups; add a null checkDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-16Ensure --print doesn't enable --noconfirm when not expectedDan McGee
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 McGee
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 McGee
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 McGee
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 McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-16trans.c: create transaction prior to checking DB versionDave Reisner
The addition of the DB version check introduces a lag time between the lockfile creation and the transaction initialization. In cases where the local DB is large enough and/or the user's disk is slow enough, this time is significant enough that its possible for a user to send a SIGINT and leave behind a db.lck file. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-10Don't balk on .sig files being invalid in package cacheDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Remove sync DB reregister checkDan McGee
It's your own damn fault if you do this, and this code is remnants from an old time when we weren't very good at coding. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Rework config parsing to reduce variable duplicationDan McGee
This removes the need to strdup() the section name at every decent into an Include statement, as well as having duplicate DB pointers around that are never used independently. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Refactor VerifySig option value parsing into standalone methodDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Merge branch 'maint'Dan McGee
2011-05-05Don't null-check handle lists before settingDan McGee
This needlessly prevents the easiest way available of clearing any of these values. We can also do the same for the 'arch' value. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Improve database server APIDan McGee
Currently we have one call that has all sorts of crazy behavior and doesn't make a whole lot of sense. Go from one method to the normal four methods we have for all of our other lists we use in the library to make it a lot easier for a frontend to manipulate server lists. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Ensure populate error return codes are consistentDan McGee
It must be -1 to differentiate it from a number of packages loaded count. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Logging changes during DB loadDan McGee
The switch from FUNCTION to DEBUG was ill-advised inside the local database load. Instead, add a DEBUG level logger to both local and sync database loads that shows the number of packages processed. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Make config parsing a two-part affairDan McGee
This ensures we call any alpm_option type functions before registering databases, making sure all paths and other defaults (e.g. sig verification levels) have been set first. This will ensure we can continue to allow crazy config files where [options] doesn't come first. The diffstat on this commit is misleading; view with -w/--ignore-all-space to get a better idea of what needed to be touched. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Move parseconfig to conf.cDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05pactest: run with root in /tmp and clean up automaticallyDan McGee
This moves the generated root/ directory into /tmp, or at least a path returned by tempfile.mkdtemp(), by default. This can make test runs significantly faster if done when /tmp is a tmpfs. If you are debugging a failed test, use the new --keep-root option to not clean up and pactest will print the location of the generated root/ test directory. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05dload: ensure we return success if we found files on any mirrorDan McGee
We were erroring out in the case where a first (possibly bogus) mirror would cause the download process to return a failure code, even though subsequent servers had the file. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Dan broke my patchAllan McRae
Add a missing space. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-05-04Fix incorrect memory allocation assignmentDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-04dload: make sure we never print a bogus error bufferDan McGee
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-04Merge branch 'maint'Dan McGee
2011-05-04Deal with unused function parameters correctlyAllan McRae
This started off removing the "(void)foo" hacks to work around unused function parameters and ended up fixing every warning generated by -Wunused-parameter. Dan: rename to UNUSED. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-04pactree: make -Wwrite-strings friendlyDan McGee
Use a few structs to hold configuration values we change given certain options so we can be const-correct with string assignment across the board. Behavior should be completely unchanged. Signed-off-by: Dan McGee <dan@archlinux.org>