summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* pactest: clean up database section writingDan McGee2011-06-24
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: add isize attribute, fix url attributeDan McGee2011-06-24
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove three unnecessary usages of alpm_list_count()Dan McGee2011-06-24
| | | | | | | | For the files count when loading from a package, we can keep a counter. The two in the frontend were completely useless due to the fact that if sync_dbs is non-NULL, alpm_list_count() will always be greater than 0. Signed-off-by: Dan McGee <dan@archlinux.org>
* Prevent segfault when parsing unexpected sync database fileDan McGee2011-06-24
| | | | | | | | | This doesn't fix the real (bigger) problem of failing to parse sync databases without directory entries, but it does prevent the parser from segfaulting when the first desc file encountered did not have a directory entry, among other conditions. Signed-off-by: Dan McGee <dan@archlinux.org>
* parse-options: simplify unused-arg & parameter printingDave Reisner2011-06-24
| | | | Signed-off-by: Dave Reisner <d@falconindy.com>
* Merge branch 'po-split'Dan McGee2011-06-23
|\
| * scripts/po/: add pacman-keyDan McGee2011-06-23
| | | | | | | | | | | | | | This has gettext strings, but wasn't added to the list of files in POTFILES.in just yet. Add it and update the catalogs. Signed-off-by: Dan McGee <dan@archlinux.org>
| * src/pacman/po/: prune message catalog and translationsDan McGee2011-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have performed the split, prune the catalogs of all scripts-only messages. All old messages were pruned from the files using the following command: sed -i -e '/^#\~/,$d' *.po Note: the diff on this commit looks much less insane if the --patience option is used. Signed-off-by: Dan McGee <dan@archlinux.org>
| * scripts/po/: prune message catalog and translationsDan McGee2011-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | Now that we have performed the split, prune the catalogs of all pacman-only messages. All old messages were pruned from the files using the following command: sed -i -e '/^#\~/,' *.po Note: the diff on this commit looks much less insane if the --patience option is used. Signed-off-by: Dan McGee <dan@archlinux.org>
| * po/: split into scripts/po/ and src/pacman/po/Dan McGee2011-06-23
| | | | | | | | | | | | | | | | | | | | | | | | | | This is the first step at separating the pacman message catalog and the scripts message catalog. Makefiles, configure.ac, and other such files are adjusted accordingly, as well as renaming files. The TEXTDOMAIN of scripts is also adjusted. Note that no actual pot or po files get changed here; these will get pruned in a future commit so each catalog contains only the necessary messages. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update all translation filesDan McGee2011-06-23
| | | | | | | | | | | | | | | | This is for the eventual 4.0.0 release, but more importantly to logically separate new translations and strings from the PO split about to happen between pacman and scripts. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Let configure gettext setup know we use ngettext()Dan McGee2011-06-23
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: fix path designation regressionDave Reisner2011-06-23
| | | | | | | | | | | | | | | | | | | | b899099 made path checking a bit more strict than I had intended, and would actually forbid creation of a repo in $PWD if only the filename was specified. readlink would be the fun and easy solution here, but it's avoided due to portability issues, making the validation process a bit more verbose. Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Added checks in check_software for distcc, ccache, strip and gzipEric Bélanger2011-06-23
| | | | | | | | | | | | | | Dan: slightly shorten some of the messages. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: remove distcc/makeflags option interactionDan McGee2011-06-23
| | | | | | | | | | | | | | | | | | | | | | Way back in c94bfbaba when refactoring makepkg options handling, I added these lines to unset MAKEFLAGS if '!distcc' was set in a PKGBUILD (not taking into account makepkg.conf settings). This was an attempt to say "if it is broken in distcc, it is probably broken even more". However, this is silly as one should be using '!makeflags' as well. Remove the linkage. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Convert backup list to new pmbackup_t typeDan McGee2011-06-22
|/ | | | | | | | This allows us to separate the name and hash elements in one place and not scatter different parsing code all over the place, including both the frontend and backend. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: fix 'check_sofware' typoDan McGee2011-06-22
| | | | | | Allan broke it! Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: style cleanupDave Reisner2011-06-22
| | | | | | | Unify function braces to be top right opening, bottom left closing. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fixed outdated documentation in test/pacman/READMEKerrick Staley2011-06-22
| | | | | | | test/pacman/README mentioned the -A flag, which no longer exists. Signed-off-by: Kerrick Staley <mail@kerrickstaley.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: add software check functionAllan McRae2011-06-22
| | | | | | | | | | | Add a function that checks for the software needed by makepkg to process a PKGBUILD with the requested options. This allows makepkg to bail early in the packaging process. Many other checks can be added to this function... Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove old TODO listsAllan McRae2011-06-22
| | | | | | | | | These had not been touched since 2007 and had lost most of their relevance. The bug tracker is a better place for the filing of ideas. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: move comment into correct placeAllan McRae2011-06-22
| | | | | | | Oops... Introduced by commit d21f6ca4. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: adjust libprovides/depends messagesAllan McRae2011-06-22
| | | | | | | | | Contractions are less clear for non-native speakers so should be avoided (and cause syntax highlighting issues). Also, the 'provides' and 'depends' strings are not to be translated. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: allow specifying alternative build directoryAllan McRae2011-06-22
| | | | | | | | | | Add a BUILDDIR variable (which can be overridden in the environment) to specify an alternative location for building the package. This is useful for people who want to build on a different filesystem for improved performance (e.g. tmpfs). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Add UPX compression supportAllan McRae2011-06-22
| | | | | | | | | | | This patch enables the automatic compression of executable binaries using UPX when the 'upx' options is specified in makepkg.conf or the PKGBUILD. Additional arguments can be passed to UPX by specifying the UPXFLAGS variable. Original-patch-by: Bryce Gibson <bryce@gibson-consulting.com.au> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: show better error when path to repo does not existDave Reisner2011-06-20
| | | | | | | | | | | | | | | | Previously, the error message when trying to add to a repo where a parent directory didn't exist was: ==> ERROR: Failed to acquire lockfile: /path/to/noexist/repo.tar.gz.lck This sucks. Make an explicit check to ensure that the path to the repo really does exist, and throw a meaningful error message when it can't be found. Dan: reuse an existing (translated) error message. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: allow creating a database with no compressionDan McGee2011-06-20
| | | | | | | | A plain '.tar' ending should be allowed. This corresponds to how we handle this extension in makepkg. Also fix up the other extension checks, which were missing a leading '.' character. Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: use bash equivalents of basename/dirnameDave Reisner2011-06-20
| | | | Signed-off-by: Dave Reisner <d@falconindy.com>
* lib/util: call _alpm_log before setting handle->pm_errnoDave Reisner2011-06-20
| | | | | | | | | This is an unfortunate chain of events. RET_ERR and RET_ERR_VOID will eventually call CHECK_HANDLE, which resets the handle's pm_errno member. Dan probably had a reason for doing this, so we merely switch the order of operations in the RET_ERR macros to avoid stomping on our pm_errno. Signed-off-by: Dave Reisner <d@falconindy.com>
* pactest: add retcode=0 to several testsDan McGee2011-06-20
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* 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>