summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* makepkg: fix broken syntax (double $)Florian Pritz2011-06-20
| | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* Improve cachedir removal and error handlingDan McGee2011-06-20
| | | | | | | | * Check the return value of canonicalize_path() for non-NULL * Use ASSERT and RET_ERR as appropriate * Make remove_cachedir() use same path munge logic as add_cachedir() Signed-off-by: Dan McGee <dan@archlinux.org>
* Documented _alpm_download()Kerrick Staley2011-06-20
| | | | | | | Documented the _alpm_download() function in dload.c Signed-off-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Documented purpose of be_*.cKerrick Staley2011-06-20
| | | | | | | | 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>
* pacman/util.c: support terminals with unknown widthDave Reisner2011-06-20
| | | | | | | | | | 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>
* Correctly duplicate delta objectsDan McGee2011-06-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>
* Clean up util md5sum methodDan McGee2011-06-20
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'public-structs'Dan McGee2011-06-20
|\
| * Make pmgrp_t publicDan McGee2011-06-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Make pmdelta_t publicDan McGee2011-06-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Make pmdepend_t and pmdepmissing_t publicDan McGee2011-06-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Make struct pmconflict_t publicDan McGee2011-06-16
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Make pmfileconflict_t type publicDan McGee2011-06-16
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* | lib/handle: use CALLOC macro instead of bare callocDave Reisner2011-06-20
| | | | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Don't call public API in _alpm_log()Dan McGee2011-06-20
|/ | | | | | | | | 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>
* API: change 'signaturedir' to 'gpgdir'Dan McGee2011-06-15
| | | | | | | | 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>
* makepkg: create source package inside fakerootAllan McRae2011-06-15
| | | | | | | | | | 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>
* Clean up makefile for script generationAllan McRae2011-06-15
| | | | | | | | 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>
* parse_options: adjust error messagesAllan McRae2011-06-15
| | | | | | | | 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>
* scripts/library: add README fileAllan McRae2011-06-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>
* scripts: refactor output formatting functionsAllan McRae2011-06-15
| | | | | | | | | 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>
* makepkg: move option parsing code to separate fileAllan McRae2011-06-15
| | | | | | | | | | | | 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>
* Merge branch 'maint'Dan McGee2011-06-15
|\
| * list_display: fix incorrect assignmentDan McGee2011-06-15
| | | | | | | | | | | | | | Commit 895a88886525d erroneously left this around. Noticed-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix man page generation for out of tree buildAllan McRae2011-06-15
| | | | | | | | | | | | | | | | 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>
* | Ensure humanize_size works for negative valuesJakob Gruber2011-06-15
| | | | | | | | | | Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use pm_fprintpf in table_create_formatJakob Gruber2011-06-15
| | | | | | | | | | Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: reword purge messageAllan McRae2011-06-15
| | | | | | | | | | | | | | | | 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>
* | valgrind.supp: add known leak exposed by cURLDan McGee2011-06-14
| | | | | | | | | | | | This one comes courtesy of OpenSSL and some static initialization. Signed-off-by: Dan McGee <dan@archlinux.org>
* | doc/PKGBUILD: misc changesFlorian Pritz2011-06-14
| | | | | | | | | | Acked-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | Rename and rework signing helper methodsDan McGee2011-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Alpm pkg accessors: ensure pkg argument is non-NULLDan McGee2011-06-14
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Ensure handle is valid and pm_errno is reset when calling into APIDan McGee2011-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Avoid setting sigverify option twiceDan McGee2011-06-14
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Conflict check and skip_remove code cleanupsDan McGee2011-06-14
| | | | | | | | | | | | | | | | | | | | * 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>
* | Small handle related cleanupsDan McGee2011-06-14
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add handle argument to _alpm_pkg_should_ignore()Dan McGee2011-06-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>
* | Merge remote-tracking branch 'florian/sodeps'Dan McGee2011-06-14
|\ \
| * | doc/PKGBUILD: document libdepsFlorian Pritz2011-06-09
| | | | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
| * | makepkg: add libdepends supportFlorian Pritz2011-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user adds libaries to the depends array without a version. These must end with .so. Example: depends=(glibc libc.so) find_libdepends() looks for ELF files (not symlinks because these could point outside of pkgdir) in $pkgdir, extracts the library sonames the binary links to and outputs depends seperated by spaces. This list contains all libraries needed by the package. Example: libfoo.so=3-64 write_pkginfo() only keeps .so depends with version information and warns the user about unneded ones. Support-by: Thomas Bächler <thomas@archlinux.org> Support-by: Christoph Schied <Christoph.Schied@uni-ulm.de> Signed-off-by: Florian Pritz <bluewind@server-speed.net>
| * | makepkg: add libprovides supportFlorian Pritz2011-05-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The user adds libaries to the provides array without a version. These must end with .so. Example: provides=(readline libreadline.so) find_libprovides() looks for .so files (not symlinks because these could point outside of pkgdir) in $pkgdir, extracts the library soname (ld links the binary to this name) and outputs provides seperated by spaces. This list contains all libraries provided by the package. Example: libfoo.so=3-64 write_pkginfo() only keeps .so provides with version information and warns the user about unneded ones. Support-by: Thomas Bächler <thomas@archlinux.org> Support-by: Christoph Schied <Christoph.Schied@uni-ulm.de> Signed-off-by: Florian Pritz <bluewind@server-speed.net>
* | | doc/PKGBUILD: misc changesFlorian Pritz2011-06-14
| | | | | | | | | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Merge branch 'maint'Dan McGee2011-06-14
|\ \ \ | | |/ | |/| | | | | | | Conflicts: doc/makepkg.conf.5.txt
| * | Added check option to BUILDENV array in makepkg.conf man pageEric Bélanger2011-06-13
| | | | | | | | | | | | | | | Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Fix list_display on non-ttys and other output fixesDan McGee2011-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit c1f742d7750a14 broke what was one of the tenants of out output- if piping pacman output somewhere else, we shouldn't ever try to line-wrap and indent print our output. This makes it easier for tools to use output from pacman -Ss, -Qs, -Qi, etc. list_display() unfortunately was given a default value of 80 rather than 0, so fix this. Next, make some additional changes that ensure we don't insert an unnecessary blank line if for some crazy reason the indent level (such as on -Qi output) is greater than the number of columns. Accomplish this by printing the first item unconditionally as we do in list_display_linebreak(). Finally, teach indentprint to not wrap if the number of columns is less than the indent level, this prevents some forms of ridiculous output such as the following: Install Date : Wed 08 Jun 2011 04:39:19 AM CDT Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Add late-breaking 3.5.3 NEWSDan McGee2011-06-07
| | | | | | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Remove alpm_db_get_url()Dan McGee2011-06-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Add a helper method for retrieving the DB signature pathDan McGee2011-06-13
| | | | | | | | | | | | | | | | | | | | | 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>
* | | alpm_db_update(): refactor out sync dir create/checkDan McGee2011-06-13
| | | | | | | | | | | | | | | | | | This was a lot of stuff that can stand by itself for the most part. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | conf: do batch processing of repo sectionsDan McGee2011-06-13
| | | | | | | | | | | | | | | | | | | | | | | | 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>