summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* pacman: be more descriptive when opening an include failsDave Reisner2012-07-10
| | | | | | | | if fopen returns NULL, append the libc strerror-ized error message to our own error message. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* update comments referring to alpm_option_get_syncdbsDave Reisner2012-07-10
| | | | | | This function was renamed alpm_get_syncdbs as part of b488f229d. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* diskspace: log errors when opening the mount table failsDave Reisner2012-07-10
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow leading "local/" in query operationsAllan McRae2012-06-25
| | | | | | | | | | | I find that when copying the output of "pacman -Qs foo" into a "pacman -Qi" operation to get more information on the packages, I consistently copy the "local/" prefix. It is a minor usability improvement to strip this if present. Dan: Pluck out LOCAL_PREFIX and magic numbers. Signed-off-by: Allan McRae <allan@archlinux.org>
* Scripts testsuite output consistencyAllan McRae2012-06-25
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* paccache: adopt size_to_humanDave Reisner2012-06-25
| | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* scripts/library: add size_to_humanDave Reisner2012-06-25
| | | | | | | | | | | This function is the reverse of human_to_size, and converts integer byte sizes to human readable SI prefixed values. A logical extension of this might be to mimic the formatter that pacman uses and allow a second argument to be passed in which can coerce the size, rather than reducing until the unit count is below 1024. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* pkgdelta: use human_to_size to parse --min-pkg-sizeDave Reisner2012-06-25
| | | | | | | Update the documentation accordingly to mention that users can expect huamn readable sizes to be acceptable. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* scripts/library: add human_to_sizeDave Reisner2012-06-25
| | | | | | | | This is a bash wrapper around an awk function that parses human readable sizes and returns their representative values in bytes, as a string. A small test harness is added to validate the functionality. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* diskspace: only load filesystem info on demandDave Reisner2012-06-25
| | | | | | | | | | | | | | | | Only load filesystem details for the mount points that we're actually going to write to. This reduces our syscall count considerably. In the case of installation, we would actually stat every mountpoint twice (an extra round for download diskspace) which means (on my system) a total of 60 syscalls to write to 3 partitions when installing the kernel package. This change reduces the 60 syscalls down to the expected 3. A slight debug output change is added here to discern between a mountpoint added to our linked list versus when we actually load the fs info. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* diskspace: dedupe code for loading FS usageDave Reisner2012-06-25
| | | | | | | | | | add mount_point_load_fsinfo() for platforms using getmntent(). Dan: move the #ifdef slightly so we don't have unused functions on certain platforms (e.g., OS X). Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* zsh-completion: Allow use of names in pacman-keyDaniel Wallace2012-06-25
| | | | | | | | | With pacman-key now having the ability to use names in --list-keys etc, we can remove the comments that temporarily blocked this in the zsh completion file. Signed-off-by: Daniel Wallace <daniel.wallace@gatech.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
* Added syntax highlighting for the sha256sums, sha384sums, and sha512sums ↵Jason St. John2012-06-25
| | | | | | | | arrays Fixed FS#29213 Signed-off-by: Jason St. John <jstjohn .. purdue . edu> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib: fix typo in PKGBUILD.vimAllan McRae2012-06-25
| | | | | | | FS#30156 Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: add checkdepends informationAllan McRae2012-06-25
| | | | | | | Similar to the case for makedepends, it is useful to be able to access this information without parsing a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: install deps with --repackageAllan McRae2012-06-25
| | | | | | | | | I have noticed that quite a number of packages fail with "makepkg -R" when their (make)dependencies are not installed. Adjust makepkg to check for dependencies when used with -R. This can still be avoided by using --nodeps/-d. Signed-off-by: Allan McRae <allan@archlinux.org>
* Allow wildcards in PURGE_TARGETS to match any type of file except for ↵Jeremy Huntwork2012-06-25
| | | | | | directories. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com>
* makepkg: allow url to be overridden in split packagesAllan McRae2012-06-25
| | | | | | | | This is already being used (despite not working...) in packages in the Arch Linux repos. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Portability fixes for makepkgJeremy Huntwork2012-06-25
| | | | | | | | Allow makepkg to work correctly when used with find from busybox. Fix handling of cross directory symlinks. Signed-off-by: Jeremy Huntwork <jhuntwork@lightcubesolutions.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* query: avoid false ownership matches for files in rootDave Reisner2012-06-25
| | | | | | | | | | | | | | | | Check for an exact match when querying ownership of files in the root. Previously, our test was too simple and would match the the basename of package files against the query parameter, e.g. $ pacman -Qo config /config is owned by cower-git 20120614-1 Adds a new test to verify this behavior, query007.py. Fixes FS#30388. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* updpkgsums: avoid fancy quoting in error messageDave Reisner2012-06-25
| | | | | | | | | | | | | m4 has a field day parsing escapes and actually vandalizes this string, causing the error to look like: ==> ERROR: \PKGBUILD\ not found or is not a file Avoid all quoting and just match up with how makepkg reports errors (no quoting at all). Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib: sed out @SCRIPTNAME@ in edit commandDave Reisner2012-06-25
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* add line length parameter to _alpm_strip_newlineDave Reisner2012-06-25
| | | | | | | | | If known, callers can pass the line size to this function in order to avoid an strlen call. Otherwise, they simply pass 0 and _alpm_strip_newline will do the call instead. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* add real_line_size to alpm_read_bufferDave Reisner2012-06-25
| | | | | | | | | We inevitably call strlen() or similar on the line returned from _alpm_archive_fgets(), so include the line size of the interesting line in the struct. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pkgdelta: add missing --version longoptDave Reisner2012-06-25
| | | | | | | This was missed in the switch to parseopts, and was caught by distcheck. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* check proper variable for NULLDave Reisner2012-06-25
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Create repo-remove symlink in scripts dirAllan McRae2012-06-25
| | | | | | | | Fix the creation of the repo-remove symlink in the scripts/ dir on building. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* diskspace: canonicalize path to download dirDave Reisner2012-06-25
| | | | | | | With lazy loading in place, it's now quite obvious that we aren't necessarily checking the right mountpoint for necessary download space. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* libalpm/remove.c - add doxygenAndrew Gregory2012-05-21
| | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* paccache: allow running as rootDave Reisner2012-05-20
| | | | | | | | | The main motivation for this change is to allow this to be run as a cron job. Satisfies FS#29897 and some other undocumented requests for this. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* makepkg: rework libdependsAllan McRae2012-05-20
| | | | | | | | | | | | | | Rewrite the handling of libdepends. The primary advantage are: - Moves functionality from write_pkginfo() to find_libdepends(). - The order of the depends array in the PKGBUILD is kept in the package. - An unneeded libdepends is only a warning and not an error. This allows putting a libdepend on a library that is dlopened. - It is now modular so can be extended to library types other than ELF *.so. - Finding the list of libraries a package depends only occurs when a libdepend is specified in the depends array. Signed-off-by: Allan McRae <allan@archlinux.org>
* repo-add: add makedepends informationAllan McRae2012-05-20
| | | | | | | | | This is useful for tools that automatically rebuild packages and thus require to generate a build order. These entries are skipped by pacman. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: write makedepends into .PKGINFOAllan McRae2012-05-20
| | | | | | | | | | Currently there is no way to access the makedepends for a package apart from parsing its PKGBUILD. Put these into the .PKGINFO file with the idea of making them available in the repo dbs so that automated build tools can readily determine build order. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Define _FORTIFY_SOURCE in CPPFLAGSAllan McRae2012-05-20
| | | | | | | The -D_FORTIFY_SOURCE=2 define should be in CPPFLAGS and not CFLAGS Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Add CPPFLAGS supportAllan McRae2012-05-20
| | | | | | | | | Add CPPFLAGS support in addition to the current CFLAGS and CXXFLAGS. This keeps compiler flags split up in the same logical way done everywhere else. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* updpkgsums: add new contrib scriptDave Reisner2012-05-20
| | | | | This updates checksums in a PKGBUILD in-place. If no sums are found, they are appended to the end.
* fix -Wshadow warnings as reported by gcc 4.4.3Dave Reisner2012-05-20
| | | | | | | | | Apparently gcc 4.7 has decided that -Wshadow warnings aren't worth reporting anymore even with the flag enabled. These were found on an Ubuntu 10.04 install. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/pacsysclean: use a standard vim modelineDave Reisner2012-05-20
| | | | | | | Fix indenting to something more familiar with the rest of the codebase. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2012-05-20
|\ | | | | | | | | Conflicts: scripts/pacman-key.sh.in
| * pacman-key: test for content in keyring filesDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | | | | | | | Test for file content (-s) rather than just existance (-f). This fixes a bug that manifests itself in the case of an empty -revoked file. A zero element 'keys' array would be passed to gpg, forcing it to list and, subsequently, revoke all known keys. Bug introduced in d1240f67eab6. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * contrib/pacsysclean: avoid setting bogus PACMAN_OPTSDave Reisner2012-05-20
| | | | | | | | | | | | | | | | PACMAN_OPTS would be erroneously set when it was undefined, causing pacsysclean to error out. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix gettext usage in pkgdelta help instructionsDan McGee2012-05-20
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update pacman-scripts message catalogDan McGee2012-05-20
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * docs: remove 'in the wild' sectionDan McGee2012-05-18
| | | | | | | | | | | | We haven't updated this info in years and it is out of date. Signed-off-by: Dan McGee <dan@archlinux.org>
| * pacman-key: clarify messages, s/keychain/keyring/Dan McGee2012-05-04
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * doc: remove --recursive documentation for non-remove operationsDan McGee2012-05-04
| | | | | | | | | | | | | | This documentation was added in commit 857357f9 so was not caught in the removal of this option in commit 85712814. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Ensure pre_upgrade scriptlet gets old package versionDan McGee2012-05-04
| | | | | | | | | | | | | | | | This was accidentally broken in the refactor done in commit 73139ccb. Fixes FS#29371. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pacman-key: use mapfile over readDave Reisner2012-05-20
| | | | | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | makepkg: use mapfile where plausibleDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | With bash4 as a requirement, we can use mapfile when reading command output into an array. mapfile has the advantage of using block buffered I/O rather than line buffered I/O, making it slightly faster for most jobs. Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | pacman: support group selection delimited by commasDave Reisner2012-05-20
| | | | | | | | | | | | | | | | | | We support multiple arguments being comma separated elsewhere, so this seems like a natural extension to support in our multiparse selection code. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>