summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* makepkg: check pkgver validity after updatingAllan McRae2012-08-04
| | | | | | | If a PKGBUILD has a pkgver() function, skip checking the pkgver validity until it has been updated. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: only update pkgver when all sources are availableAllan McRae2012-08-04
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add --holdver to control VCS source updatingAllan McRae2012-08-04
| | | | | | | Do not update VCS sources if --holdver is used. If the VCS checkout is not present, it will still be downloaded. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: do not download VCS sources unless neededAllan McRae2012-08-04
| | | | | | | | VCS sources are not needed for --geninteg or --source operations. This also prevents VCS downloads outputting to stdout, which prevented piping -g output to the PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: rename myverAllan McRae2012-08-04
| | | | | | myver is a bit generic for an internal variable name. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add support for SVN urlsAllan McRae2012-08-04
| | | | | | | | | | | Allow SVN repo sources in the form: source=("<folder>::<repo>#<fragment>") where <repo> must start with svn (e.g svn+http://) and a <fragment> can specify a revision (e.g. revision=22). Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: provide mechanism for auto-updating pkgverAllan McRae2012-08-04
| | | | | | | | | | | | | | | Now that VCS repos are provided in the source array, it becomes too complicated to have automatic updating pkgver as was the case with the old VCS PKGBUILDs (there can be multiple repos of different types in the source array, the VCS repo may not be the package primary source, etc). Instead provide an optional way for a PKGBUILD to update the pkgver value through the specifing of a pkgver() function that returns the new version string. This is run after all source files are downloaded so can access the VCS repo if needed. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: modify get_filepath to handle VCS sourcesAllan McRae2012-08-04
| | | | | | | | With VCS sources, get_filepath should return the directory of the checkout. This allows backing up of the VCS checkout when using --allsource. Fixes FS#21098. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: modify get_filename to handle VCS sourcesAllan McRae2012-08-04
| | | | | | | Modify get_filename to return the name of the folder with VCS sources. This fixes output issues in checksum checking. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: fix checksum generation with VCS sourcesAllan McRae2012-08-04
| | | | | | VCS sources should have "SKIP" for their checksum value Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: allow using GIT source URLsAllan McRae2012-08-04
| | | | | | | | | | | | | | | | | Allow specifing GIT sources using the following syntax source=('<folder>::<repo>#<fragment>') This will download the git repo <repo> into <folder> (into $SRCDIR if set, otherwise $startdir). <repo> must start with "git", but non-git protocols are handled using (e.g.) "git+http://...". The <fragment> can be used to specify a branch, tag, or commit to build from. e.g. branch=maint. Checksum entries for git sources should be "SKIP". Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: skip integrity checking earlyAllan McRae2012-08-04
| | | | | | | | | If "SKIP" is provided for an integrity check, abort checking as soon as possible. Also swap fork to tr for bash4 conversion. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: generalize download_sourcesAllan McRae2012-08-04
| | | | | | | | | | | In order to treat all VCS sources as URLs, we need to be able to deal with more protocols. Rewrite download_sources to use a case statement so additional protocols are easily added. Also fix the use of scp to not pass the protocol in the URL (noticed by William J. Bowman <wjb@williamjbowman.com>) Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: add function to return download protocolAllan McRae2012-08-04
| | | | | | | Extract the download protocol from a source entry. Returns "local" for local source files. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: reorder source handling functionsAllan McRae2012-08-04
| | | | | | | There is no actual code change here, but these related functions were all over the place which makes this code difficult to adjust. Signed-off-by: Allan McRae <allan@archlinux.org>
* makepkg: remove VCS package supportAllan McRae2012-08-04
| | | | | | | The current VCS packaging support is really, really, really bad. It is best to strip it out completely before rewriting it. Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman-key: Use lsign_keys function in --populatePierre Schmitz2012-08-02
| | | | | | This reduces code duplication and also makes --populate a non-interactive function. Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
* Split _alpm_filelist_operation functionAllan McRae2012-08-02
| | | | | | | | | To improve conflict checking, we will need to make these functions diverge to an extent where having two separate functions will be preferable. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Move filelist functions into separate source fileDan McGee2012-08-02
| | | | | | | | | We have a few of these and might as well gather them together. This also cleans up the code a bit by using an enum instead of integer values, as well as makes a "search for file in filelist" function public so frontends can do better than straight linear search of the filelists. Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: avoid upgrade conflict with unchanged effective pathDave Reisner2012-08-02
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: Do not remove symlink to directory if a to be installed package uses itAllan McRae2012-08-02
| | | | | | | | | | | | | | If a pacakge has a directory symlink (e.g. /lib -> usr/lib), do not allow it to be removed if any other package is trying to install a file into that path (e.g. /lib/foo). This is because the local database can become invalidated if the symlink is removed after the package with file /lib/foo is installed (sync702.py). If the symlink is removed before the file is installed (sync701.py), the upgrade is actually a success, but we can not guarantee the ordering so both cases should fail. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: Do not remove symlink to directory if local package uses that pathAllan McRae2012-08-02
| | | | | | | | | | If we have a symlink to a directory (e.g. /lib -> usr/lib), then we can not remove it if a local package thinks it has files in the symlink directory (e.g. /lib/foo), because this will invalidate the local file database. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: conflict between files having same effective pathAllan McRae2012-08-02
| | | | | | | | Note failure to detect a conflict between files having the same effective path across packages due to a directory symlink. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: conflict between directory and a fileAllan McRae2012-08-02
| | | | | | | | | Note failure to detect a conflict between a directory in one package and a file in the other when the directory is not currently on the filesystem. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Add pactest for empty subdirectory conflictAllan McRae2012-08-02
| | | | | | | | The wrong test file was inadvertantly committed in 44e9fdd0. Add the correct test and tidy up the test which was committed. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow cleaning only some cachedirsJan Alexander Steffens (heftig)2012-08-02
| | | | | | | | | | When cleaning the cache, ask for each cachedir separately. Allan: add some white space in output Signed-off-by: Jan Alexander Steffens (heftig) <jan.steffens@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2012-08-01
|\
| * makepkg: remove unnecessary formattingAllan McRae2012-08-01
| | | | | | | | | | | | | | | | This extra newline leaves a gap that looks strange in of itself, but is highlighted when piping -g output to a PKGBUILD. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * contrib/bacman: fix package architecture in filenameAllan McRae2012-08-01
| | | | | | | | | | | | | | | | | | | | Give the generated package the correct architecture in its filename rather than assuming the system architecture. Also add updated copyright notice. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add more debug logging to dir_belongsto_pkg() functionDan McGee2012-08-01
| | | | | | | | | | | | Now that we pass in the handle, we might as well add logging. Signed-off-by: Dan McGee <dan@archlinux.org>
* | contrib/updpkgsums: Fix error messageAllan McRae2012-08-01
| | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add documentation for the prepare() functionEnjolras2012-08-01
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add a function prepare() to PKGBUILDEnjolras2012-08-01
| | | | | | | | | | | | | | prepare is run after the source extraction, and is not run with --noextract option. Signed-off-by: Dan McGee <dan@archlinux.org>
* | asdeps flag passed from makepkg to pacmanDaniel Wallace2012-08-01
| | | | | | | | | | | | | | | | | | add the asdeps flag for makepkg so that it does pacman -U --asdeps [Allan: clean-up whitespace] Signed-off-by: Daniel Wallace <daniel.wallace12@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Do not enable _FORTIFY_SOURCE without optimizationAllan McRae2012-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | With glibc-2.16, using -D_FORTIFY_SOURCE requires that optimization (-O) be used or it will prodice a warning message. Enable -Werror in our test for _FORTIFY_SOURCE support to catch when a users specifies CFLAGS without optimization. The line to set CFLAGS="" when no CFLAGS are specified (either due to being unset or geniunely empty) is required as autoconf will use "-O2 -g" for its tests by defult when CFLAGS is unset, but will not add them to the CFLAGS used... Signed-off-by: Allan McRae <allan@archlinux.org>
* | Fix wrong parameter name in alpm_db_update's signatureBarbu Paul - Gheorghe2012-08-01
| | | | | | | | Signed-off-by: Barbu Paul - Gheorghe <barbu.paul.gheorghe@gmail.com>
* | Clean up exclusion list in sync cache cleanupDan McGee2012-08-01
| | | | | | | | | | | | | | | | Make an array out of our various glob skip patterns and loop through them looking for items to skip. Additionally, when doing a full clean, delete all objects rather than respect this skip list. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Skip deltas and partial downloads in package cleanupDan McGee2012-08-01
| | | | | | | | | | | | This affects -Sc only, not -Scc. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pactree: show tree vertical "limbs"Andrew Gregory2012-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Showing vertical limbs makes the tree easier to follow. Old: New: |--pkg |--pkg |--dep1 |--dep1 |--dep2 | |--dep2 |--dep3 |--dep3 |--dep4 |--dep4 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> [Allan: fix shadow warning] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pactree: consolidate both walk_deps functionsAndrew Gregory2012-08-01
| | | | | | | | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> [Allan: fix shadow warning] Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | util: fix line length calc in _alpm_archive_fgetsDave Reisner2012-08-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 74274b5dc347ba70 which added the real_line_size to the buffer struct didn't properly account for what happens when archive_fgets has to loop more than once to find the end of a line. In most cases, this isn't a problem, but could potentially cause a longer line such as PGP signature to be improperly read. This patch fixes the oversight and focuses on only calculating the line length when we hit the end of line marker. The effective length is then calculated via pointer arithmetic as: (start_of_last_read + read_length) - start_of_line Signed-off-by: Dave Reisner <dreisner@archlinux.org>
* | lib/conflict: use a binary search within filelistsDave Reisner2012-08-01
| | | | | | | | | | | | | | | | | | | | Take advantage of the fact that our filelists are arrays sorted by filename with a known length and use a binary search. This should speed up file conflict checking, particularly when larger packages are involved. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | lib/be_local: ensure local filelists are sortedDave Reisner2012-08-01
| | | | | | | | | | | | | | This may very well be a no-op, but better safe than sorry. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | lib/be_package: use qsort instead of our own msortDave Reisner2012-08-01
| | | | | | | | | | | | | | | | | | | | On the assumption that these arrays are already mostly sorted, use the standard quicksort method to sort the files arrays. The files_msort function name is tweaked to give it a more general name to reflect this change. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2012-07-10
|\| | | | | | | | | Conflicts: etc/makepkg.conf.in
| * makepkg.conf: add -q option for curlDave Reisner2012-07-10
| | | | | | | | | | | | | | | | | | | | Avoid involving the user's ~/.curlrc file as this may alter the expected behavior of downloads. ref: https://bbs.archlinux.org/viewtopic.php?pid=1124441 Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg.conf: enable curl's cookie engine for httpDave Reisner2012-07-10
| | | | | | | | | | | | | | Implements FS#28098. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Check empty subdirectory ownershipAllan McRae2012-07-10
| | | | | | | | | | | | | | | | | | | | | | When checking if a package owns a directory, it is important to check not only that all the files in the directory are part of the package, but also if the directory is part of a package. This catches empty subdirectories during conflict checking for directory to file/symlink replacements. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add conflict for replacing owned empty directoryAllan McRae2012-07-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two packages own an empty directory, pacman finds no conflict when one of those packages wants to replace the directory with a file or a symlink. When it comes to actually extracting the new file/symlink, pacman sees the directory is still there (we do not remove empty directories if they are owned by a package) and refuses to extract. Detect this potential conflict early and bail. Note that it is a _potential_ conflict and not a guaranteed one as the other package owning the directory could be updated or removed first which would remove the conflict. However, pacman currently can not sort package installation order to ensure this, so this conflict requires manual upgrade ordering. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Add man page for pactreeRam Bhamidipaty2012-07-10
| | | | | | | | | | | | | | | | | | Add a man page for the pactree utility. Feedback-from: Allan McRae <allan@archlinux.org> Feedback-from: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Ram Bhamidipaty <rambham@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>