summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* | pactest: use valgrind.supp fileXavier Chantry2010-10-18
| | | | | | | | | | Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Tests: '-S repo/group' syntaxJakob Gruber2010-10-18
| | | | | | | | | | | | | | when calling '-S repo/group', only group members in <repo> should should be installed (group members in other repos are ignored) Signed-off-by: Dan McGee <dan@archlinux.org>
* | Tests: Sync group which includes ignored pkgsJakob Gruber2010-10-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * FS#19854 (--ignore is ignored with groups) * http://www.archlinux.org/pipermail/pacman-dev/2009-June/008847.html (operation aborts when a package from a group is ignored/and user chooses not to install it) If a group member is ignored, we expect a) a question whether to install b) after saying 'no' to a), the ignored member not to be installed c) all other group members to be installed d) pacman to execute successfully Signed-off-by: Dan McGee <dan@archlinux.org>
* | be_package: read force entry and convert to epochXavier Chantry2010-10-14
| | | | | | | | | | | | | | | | We still need to read force entry in epoch-aware pacman, so that when we install an old force package, EPOCH gets written to the local db. Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | bash_completion: remove upstream deprecated functionsCarlos Diaz2010-10-14
| | | | | | | | | | | | | | | | | | Populate $cur and $prev with the new bash-completion 1.2 function, _get_comp_words_by_ref. _get_cword and _get_pword have been deprecated. Signed-off-by: Carlos Diaz <839273@gmail.com>
* | Merge branch 'maint'Dan McGee2010-10-13
|\|
| * Read 'force' entry from packagesDan McGee2010-10-11
| | | | | | | | | | | | | | | | We weren't reading this in from our packages, thus causing us not to write it out to our local database. Adding this now will help ease the upgrade path for epoch later and not require reinstallation of all force packages. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add several pactests for epoch codeDan McGee2010-10-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add epoch verification to makepkgDan McGee2010-10-13
| | | | | | | | | | | | If defined, it must be an integer. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Update contrib/ for epochDan McGee2010-10-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add epoch support to pactestDan McGee2010-10-13
| | | | | | | | | | | | | | | | This adds epoch support to pactest, while still producing packages and database entries the same way makepkg and repo-add currently do in a backward compatible fashion (still including the 'force' option). Signed-off-by: Dan McGee <dan@archlinux.org>
* | Make repo-add and makepkg epoch-awareDan McGee2010-10-13
| | | | | | | | | | | | | | | | | | | | Allow it to be a variable in the PKGBUILD as well as propagating it through to the built package and the package database. We leave some backward compatibility in place by placing the '%FORCE%' option in the database if the package contains an epoch; this will be used by older versions of pacman and more or less ignored by versions that use epoch. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Update documentation to reflect new epoch package variableDan McGee2010-10-13
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add epoch support to pacman/libalpmDan McGee2010-10-13
| | | | | | | | | | | | | | This will allow for better control of what was previously the 'force' option in a PKGBUILD and transferred into the built package. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Small tweaks after backend mergeDan McGee2010-10-13
| | | | | | | | | | | | Just a few small things I noticed looking through the code. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge remote branch 'allan/backend'Dan McGee2010-10-13
|\ \
| * | Only write to local reposAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | We do not write to sync repos so kill the code for that. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Clean-up parsing sync databaseAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | Remove unnecessary parsing of fields not found in sync desc file. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Clean-up parsing local databaseAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | Remove unnecessary parsing of fields not found in local desc files. Leave %FORCE% parsing as this likely will make an appearance in desc files in the future. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Remove lazy loading of deltasAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | Local packages do not have deltas so remove lazy loading of delta information. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Move and rename splitnameAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | The splitname function is a general utility function and so is better suited to util.h. Rename it to _alpm_splitname to indicate it is an internal libalpm function as was the case prior to splitting local and sync db handling. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Restrict visibility of checkdbdir and get_pkgpathAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | These functions are only needed by be_local and were only promoted to db.{h,c} as part of the splitting of handling the local and sync dbs. Move them into be_local.c and make them static again. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Clean up all old database files and directoriesAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | Clean-up the previous download location of the sync database and any old extracted sync database directories which are unneeded with the tar-db backend. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Only download sync databasesAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | As the sync databases are read directly from the tarball, we no longer need to extract them. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Parse sync databaseAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | Read in package information for a tar based sync database. Do not use lazy loading for sync db. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Populate sync db from archiveAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | Read in list of packages for sync db from tar archive. Breaks reading in _alpm_sync_db_read and a lot of pactests (which is expected as they do not handle sync db in archives...). Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Completely separate local and sync db handlingAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | Put the db_operations struct to use and completely split the handling of the sync and local databases. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Separate be_files into be_sync and be_localAllan McRae2010-10-14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The file be_files.c is "split" to be_local.c and be_sync.c in order to achieve separate handling of sync and local databases. Some basic clean-up of functions that are only of use for local or sync databases has been performed and some rough function renaming in duplicated code has been performed to prevent compilation errors. However, most of the clean-up and final separation of sync and local db handling occurs in following patches. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Move db cache handling functionsAllan McRae2010-10-13
| | | | | | | | | | | | | | | | | | | | | These will be needed for the handling of both local and sync database caches, so put them in a common location. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Move database handling utility functionsAllan McRae2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | Move splitname, checkdbdir, get_pkgpath into db.{h,c} as these will be needed to parse both the local and sync databases during the initial splitting. They will be moved out of db.{h,c} at to more appropriate locations at a later stage. Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Fix documentation syntax and typoAllan McRae2010-10-13
| | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Initial hack at a DB operations structDan McGee2010-10-13
| | | | | | | | | | | | | | | | | | | | | It doesn't do a whole lot yet, but these type of operations will potentially be different for the DBs we load. Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Move the cache stuff where it should beDan McGee2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | Cache bullshit only has relevance to be_files, so move it there. Signed-off-by: Dan McGee <dan@archlinux.org> [Allan: BIG rebase] Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Move changelog functions to callback structDan McGee2010-10-13
| | | | | | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Complete rework of package accessor logicDan McGee2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hopefully we've finally arrived at package handling nirvana, or at least this commit will get us a heck of a lot closer. The former method of getting the depends list for a package was the following: 1. call alpm_pkg_get_depends() 2. this method would check if the package came from the cache 3. if so, ensure our cache level is correct, otherwise call db_load 4. finally return the depends list Why did this suck? Because getting the depends list from the package shouldn't care about whether the package was loaded from a file, from the 'package cache', or some other system which we can't even use because the damn thing is so complicated. It should just return the depends list. So what does this commit change? It adds a pointer to a struct of function pointers to every package for all of these 'package operations' as I've decided to call them (I know, sounds completely straightforward, right?). So now when we call an alpm_pkg_get-* function, we don't do any of the cache logic or anything else there- we let the actual backend handle it by delegating all work to the method at pkg->ops->get_depends. Now that be_package has achieved equal status with be_files, we can treat packages from these completely different load points differently. We know a package loaded from a zip file will have all of its fields populated, so we can set up all its accessor functions to be direct accessors. On the other hand, the packages loaded from the local and sync DBs are not always fully-loaded, so their accessor functions are routed through the same logic as before. Net result? More code. However, this code now make it roughly 52 times easier to open the door to something like a read-only tar.gz database backend. Are you still reading? I'm impressed. Looking at the patch will probably be clearer than this long-winded explanation. Signed-off-by: Dan McGee <dan@archlinux.org> [Allan: rebase and adjust] Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Allow local and sync db to be treated separatelyDan McGee2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement this seemingly simple change in package.h: typedef enum _pmpkgfrom_t { - PKG_FROM_CACHE = 1, - PKG_FROM_FILE + PKG_FROM_FILE = 1, + PKG_FROM_LOCALDB, + PKG_FROM_SYNCDB } pmpkgfrom_t; which requires flushing out several assumptions from around the codebase with regards to usage of the PKG_FROM_CACHE value. Make some changes where required to allow the switch, and now the correct value should be set (via a crude hack) depending on whether a package was loaded as an entry in a local db or a sync db. This patch underwent some big rebasing from Allan and Dan. Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org>
| * | Unify caching concerns in package accessorsDan McGee2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move almost all of the caching related stuff into a single #define (which should maybe even just be a static function) so we don't duplicate logic all over the place. This also makes the code a heck of a lot shorter and means further changes to this stuff don't have to touch each and every getter function. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Fix bash shell location checkDan McGee2010-10-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BASH is defined when you are actually using bash during configure, which sucks because it ends up being '/bin/sh', messing up all of our scripts. Change the name of the variable we use in configure, and also ensure we get a full path to the executable by using AC_PATH_PROGS rather than AC_CHECK_PROGS. Finally, change the variable name everywhere we use it. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | contrib/ follow-up workDan McGee2010-10-12
|/ / | | | | | | | | | | | | | | | | | | * Add a .gitignore file * Use the same 'GEN' output we have in the scripts/ Makefile when doing our edits on the .in files * Remove PKGBUILD.vim and vimprojects from our edit list, they have no need to be in the list Signed-off-by: Dan McGee <dan@archlinux.org>
* | CLI args: stricter/better parsingJakob Gruber2010-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the following, the letters SRUDQ refer to the corresponding pacman operations. Most of the work in this commit is about removing as many options as possible from the global section and moving them to where they actually belong. Additionally, --ignore{,group} are added to U and --dbonly is added to S. --dbonly added to S --asdeps moved to S/U/D --asexplicit moved to S/U/D --print-format moved to S/U/R --noprogressbar moved to S/U/R --noscriptlet moved to S/U/R --ignorepkg added to U --ignoregrp added to U -d moved to S/U/R (--nodeps) and Q (--deps) -p moved to S/U/R (--print) and Q (--file) -f moved to S/U Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | CLI args: reorganize parsingJakob Gruber2010-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split parsing of CLI arguments into separate functions: parsearg_op (operations) parsearg_global (global options) parsearg_{database,query,remove,sync,deptest,upgrade} Organization strictly follows the manpage (even where the manpage is incorrect) - these cases will be fixed in the following commits. Switch cases are copy/pasted and statements unrelated to chosen operation are deleted. Parsing logic adjusted as follows: 1) Parse operation 2) If we can bail out early (duplicate op, help/version requested) do so 3) Parse arguments again: foreach arg: if arg is operation: continue tryparse_args_specific_to_op if unsuccessful tryparse_args_global if unsuccessful print error message and exit Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | util: fall cleaning on single file programsDan McGee2010-10-11
| | | | | | | | | | | | | | | | | | | | | | * Add a bunch of static declarations where possible * Fix void functions to be proper syntax, e.g. void func(void) * Consistency fixes (such as argv references) * Remove dead str_cmp() function from testdb * Remove unneeded config.h header includes * vercmp: remove completely unnecessary string copying Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use sysconfdir, localstatedir, BASH instead of hardcoded valuesNezmer2010-10-11
| | | | | | | | | | | | | | | | | | This applies to contrib/ files, our scripts, and the documentation. Dan: fix 'make clean' in contrib/ directory. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add .in extension to files in contribNezmer2010-10-11
| | | | | | | | | | | | | | This is needed If we want to use sysconfdir,localstatedir and other variables. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: more informative delta messagesXavier Chantry2010-10-11
| | | | | | | | | | | | | | | | | | - Print an error if database entry was not found and delta entry cannot be added - More informative line when delta entry is added (oldfile -> newfile) Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | repo-add: add delta generationXavier Chantry2010-10-11
| | | | | | | | | | | | | | | | | | This allows deltas to be generated at repo-add invocation time as opposed to just added to the database. It will generate the delta from the package version currently in the database. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | pactest: fix typo in ignore001Xavier Chantry2010-10-11
| | | | | | | | | | Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: Use mkfifo instead of GNU-only 'mknod <file> p'Nezmer2010-10-11
| | | | | | | | | | | | | | | | | | | | 'mknod <file> p' is apparently GNU-only. Looking at coreutils' source code, It just calls mkfifo. This one line patch should fix makepkg logging in non-GNU systems. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
* | CLI args: add pactest with an invalid combinationJakob Gruber2010-10-11
| | | | | | | | | | | | | | | | | | Pacman should catch cases in which the passed arguments don't apply to the current operation (sync/query/...). Also see FS#20950. Signed-off-by: Dan McGee <dan@archlinux.org>
* | pactest: fix gensyncXavier Chantry2010-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | gensync generated a sync.db file with PKGINFO syntax, this is not quite what pacman expects. Also the file was only added to the Server path: root/var/pub/sync/sync.db but it was not available in the normal sync db path: root/var/lib/pacman/sync/sync.db Change gensync() to generate var/lib/pacman/sync/sync.db and then copy it to var/pub/sync/sync.db (this is used by sync200 -Sy test). Signed-off-by: Dan McGee <dan@archlinux.org>