summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
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-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-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>
2011-05-16trans.c: create transaction prior to checking DB versionDave Reisner1-9/+10
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-11Don't balk on .sig files being invalid in package cacheDan McGee1-4/+19
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Remove sync DB reregister checkDan McGee1-10/+0
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 McGee1-32/+25
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 McGee1-21/+32
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05Merge branch 'maint'Dan McGee2-6/+8
2011-05-05Don't null-check handle lists before settingDan McGee1-6/+10
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 McGee3-24/+89
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 McGee2-6/+8
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 McGee2-1/+6
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 McGee3-74/+92
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 McGee4-593/+611
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-05pactest: run with root in /tmp and clean up automaticallyDan McGee2-11/+24
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 McGee1-1/+3
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 McRae1-1/+1
Add a missing space. Signed-off-by: Allan McRae <allan@archlinux.org>
2011-05-04Fix incorrect memory allocation assignmentDan McGee1-1/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-04dload: make sure we never print a bogus error bufferDan McGee1-0/+2
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-04Merge branch 'maint'Dan McGee2-3/+7
2011-05-04Deal with unused function parameters correctlyAllan McRae7-18/+28
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 McGee1-50/+62
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>
2011-05-04Fix warnings reported by -Wwrite-stringsDan McGee5-11/+10
These are places where we stuck a string constant in a variable not marked as const. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-04Reduce duplicate signing debug code and fix logic conditionDan McGee1-35/+23
We had a lot of similar looking code that we can collapse down into a function. This also fixes errors seen when turning on some gcc warnings and implicitly casting away the const-ness of the string. Free the list when we are done with it as well. Also, fix a logic error where we should be checking with &&, not ||. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-02makepkg: quote variable that may contain spacesAllan McRae1-1/+1
Prevents failures when $PKGDEST contains spaces (FS#24002) Patch-by: Sebastien Duthil Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-05-02Update PKGBUILD exampleAllan McRae1-2/+6
Add quotes around $srcdir/$pkgdir (FS#23960) and use a package() function. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-29Merge branch 'maint'Dan McGee2-19/+18
2011-04-29Transifex updatesDan McGee1-13/+12
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-29pacman(8): grammar correction for relative clausesMatt Mooney1-5/+5
Change "which" to "that" when used in a restrictive clause. Replace usage of the relative prounoun "those" with a common noun for added clarity. Signed-off-by: Matt Mooney <mfm@muteddisk.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-04-29pacman(8): change "options" to "operation" when referring to -DMatt Mooney1-1/+1
-D is an operation not an option. Signed-off-by: Matt Mooney <mfm@muteddisk.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2011-04-27configure: add output showing what libraries will be usedDan McGee1-3/+7
Signed-off-by: Dan McGee <dan@archlinux.org>