summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-06-20Documented purpose of be_*.cKerrick Staley3-3/+3
Added a line to the top of each of be_local.c, be_package.c, and be_sync.c indicating their purposes. Signed-off-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20pacman/util.c: support terminals with unknown widthDave Reisner3-11/+19
Add detection for stdout being attached to a tty device. When this check fails, return a default width of 0, which callers interpret to mean "don't wrap". Conversely, when our term ioctl suceeds but returns 0, we interpret this to mean a tty with an unknown width (e.g., a serial console), in which case we default to a sane value of 80. Signed-off-by: Dave Reisner <d@falconindy.com>
2011-06-20Correctly duplicate delta objectsDan McGee3-3/+20
We were using copy_data before; this works for the struct itself but not the strings contained within. Fix it up by duplicating all the data as we do with our other structures. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20Clean up util md5sum methodDan McGee1-2/+1
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20Merge branch 'public-structs'Dan McGee16-324/+137
2011-06-20lib/handle: use CALLOC macro instead of bare callocDave Reisner1-3/+3
Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-20Don't call public API in _alpm_log()Dan McGee1-3/+2
Calling get_logcb() here would reset any previous setting of handle->pm_errno due to the CHECK_HANDLE() macro contained within. This would make error setting a bit funny if one set pm_errno before calling _alpm_log(), such as in the RET_ERR() macro. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-16Make pmgrp_t publicDan McGee7-38/+21
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-16Make pmdelta_t publicDan McGee4-68/+25
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-16Make pmdepend_t and pmdepmissing_t publicDan McGee8-114/+45
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-16Make struct pmconflict_t publicDan McGee6-44/+21
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-16Make pmfileconflict_t type publicDan McGee5-60/+25
This removes the need to write accessor methods for every type we have, and simplifies the API. Any type that doesn't need magic* can be converted in this fashion to make it easier for frontend applications to use, as well as make it less of a pain to introduce new such structs in the future. * "magic" meaning something like pmpkg_t where values can be lazy loaded. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15API: change 'signaturedir' to 'gpgdir'Dan McGee6-17/+17
This is more in line with reality and what we have our makepkg, etc. options named anyway. Original-patch-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15makepkg: create source package inside fakerootAllan McRae1-25/+40
Create source package files inside the fakeroot environment to ensure reasonable ownership of files within the archive. Fixes FS#24330. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15Clean up makefile for script generationAllan McRae1-8/+5
We no longer have any python scripts in our scripts/ directory so we can simplify the makefile a bit. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15parse_options: adjust error messagesAllan McRae1-3/+3
Provide consistent error messages for unknown long and short options. Also get full string translation for the messages. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15scripts/library: add README fileAllan McRae1-0/+15
Add a README file to briefly document the code snippets in the scripts library folder. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15scripts: refactor output formatting functionsAllan McRae6-69/+48
Move the common output formatting functions into a separate library file and import that into each script. makepkg is excluded due to its additional color formatting. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15makepkg: move option parsing code to separate fileAllan McRae3-91/+97
This move the getopt replacement function parse_options out of makepkg.sh.in and into a separate file. The code is inserted into the relevant place in makepkg using m4. This will allow the reuse of the option parsing code in other scripts (i.e. pacman-key) while avoiding code duplication. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15Merge branch 'maint'Dan McGee2-4/+5
2011-06-15Ensure humanize_size works for negative valuesJakob Gruber1-1/+1
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15Use pm_fprintpf in table_create_formatJakob Gruber1-1/+1
Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15makepkg: reword purge messageAllan McRae1-1/+1
Clarfiy that it is unwanted files are being removed rather than "other" files (whatever they are...). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15list_display: fix incorrect assignmentDan McGee1-1/+1
Commit 895a88886525d erroneously left this around. Noticed-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-15Fix man page generation for out of tree buildAllan McRae1-3/+4
Fix failure at man page generation when building outside the source tree. There may still be issues with other documentation types... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14valgrind.supp: add known leak exposed by cURLDan McGee1-0/+10
This one comes courtesy of OpenSSL and some static initialization. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14doc/PKGBUILD: misc changesFlorian Pritz1-13/+13
Acked-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Florian Pritz <bluewind@xinu.at>
2011-06-14Rename and rework signing helper methodsDan McGee1-38/+36
* Don't name static methods with a gpgme_ prefix to avoid confusion with methods provided by the library. These are static and local to our file so just give them sane non-prefixed names. * Rework sigsum_test_bit() to not require assignment. * Don't balk if there is more than one signature available (for now, only check the first). * Fix error codes in publicly visible methods to return -1, not 0, if pkg or db are not provided. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Alpm pkg accessors: ensure pkg argument is non-NULLDan McGee1-0/+28
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Ensure handle is valid and pm_errno is reset when calling into APIDan McGee15-69/+128
We didn't do due diligence before and ensure prior pm_errno values weren't influencing what happened in further ALPM calls. I observed one case of early setup code setting pm_errno to PM_ERR_WRONG_ARGS and that flag persisting the entire time we were calling library code. Add a new CHECK_HANDLE() macro that does two things: 1) ensures the handle variable passed to it is non-NULL and 2) clears any existing pm_errno flag set on the handle. This macro can replace many places we used the ASSERT(handle != NULL, ...) pattern before. Several other other places only need a simple 'set to zero' of the pm_errno field. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Avoid setting sigverify option twiceDan McGee1-1/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Conflict check and skip_remove code cleanupsDan McGee2-39/+55
* Move several variables into better scope * const-ify a few variables * Avoid duplicating filelists if it is unnecessary * Better handling out out of memory condition when adding file conflicts to our list Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Small handle related cleanupsDan McGee3-5/+3
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Add handle argument to _alpm_pkg_should_ignore()Dan McGee4-13/+14
This allows callers to retrieve it from wherever is convenient, which may or may not be on the package object itself. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Merge remote-tracking branch 'florian/sodeps'Dan McGee2-2/+94
2011-06-14doc/PKGBUILD: misc changesFlorian Pritz1-41/+40
Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-14Merge branch 'maint'Dan McGee3-9/+15
Conflicts: doc/makepkg.conf.5.txt
2011-06-14Remove alpm_db_get_url()Dan McGee3-30/+7
This method is old, it doesn't adequately check for a NULL server list, and can easily be done using better API method we provide these days. All former users of this method can get similar results by calling alpm_db_get_servers() and using the data from the returned server list. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Added check option to BUILDENV array in makepkg.conf man pageEric Bélanger1-1/+1
Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Add a helper method for retrieving the DB signature pathDan McGee2-0/+15
Note that is a bit different than the normal _alpm_db_path() method; the caller is expected to free the result. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13alpm_db_update(): refactor out sync dir create/checkDan McGee1-22/+31
This was a lot of stuff that can stand by itself for the most part. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13conf: do batch processing of repo sectionsDan McGee1-49/+100
We now parse an entire repo section and store all information about it. When the next section is encountered or the end of the root config file is reached, we will then process the stored information. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13conf: _parseconfig() cleanups and documentationDan McGee1-19/+38
* Function doxygen documentation * Reuse a single strlen() call * Prevent infinite recursion (limit to 10 levels) * Other small cleanups Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Always pass data to trans_commit()Dan McGee1-2/+4
Even though we currently don't use it here in the backend, we might as well pass it in since we used it earlier. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Remove global handle variableDan McGee3-15/+0
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Switch all logging to use handle directlyDan McGee22-368/+360
This is the last user of our global handle object. Once again the diff is large but the functional changes are not. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Move pm_errno onto the handleDan McGee39-442/+422
This involves some serious changes and a very messy diff, unfortunately. Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Add handle argument to two more alpm methodsDan McGee7-33/+41
This takes care of alpm_checkdeps() and alpm_find_dbs_satisfier(). Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Require handle for alpm_checkconflicts()Dan McGee5-12/+16
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-06-13Require handle for alpm_pkg_load()Dan McGee8-17/+20
Signed-off-by: Dan McGee <dan@archlinux.org>