summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Rename pmtransflag_t to alpm_transflag_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmloglevel_t to alpm_loglevel_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmbackup_t to alpm_backup_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmdelta_t to alpm_delta_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmgrp_t to alpm_group_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmfileconflict_t to alpm_fileconflict_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmconflict_t to alpm_conflict_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmdepmissing_t to alpm_depmissing_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmdepend_t to alpm_depend_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmtrans_t to alpm_trans_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmpkg_t to alpm_pkg_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmdb_t to alpm_db_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmhandle_t to alpm_handle_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmfileconflicttype_t to alpm_fileconflicttype_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmdepmod_t to alpm_depmod_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmpkgreason_t to alpm_pkgreason_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Revert "Merge branch 'master' of git://projects.archlinux.org/pacman"Dan McGee2011-06-27
| | | | | | | This reverts the merge of 2d32a9a3a348d25d6d0f3d12752399bf7fdf6570, which reverts the commit 8581694ceb63f4ed2854206b38574599c3d9df28. Thanks Dave for the dirty branch and non-clean rebase! :) Dave broke it.
* repo-add: remove extra exit callDan McGee2011-06-27
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* pacman-optimize: use output libraryDan McGee2011-06-27
| | | | | | | | We already use msg() and error() in here, might as well just use the standard functions. In addition, fix one translated message that would have printed ERROR twice if anyone ever saw it. Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge remote-tracking branch 'dave/repo-add'Dan McGee2011-06-27
|\
| * repo-add: add new command, repo-elephantDave Reisner2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | _ _ / \__/ \_____ / / \ \ `\ ) \''/ ( |\ `\__)/__/'_\ / ` //_|_|~|_|_| ^""'"' ""'"' Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add: enforce file extensionsDave Reisner2011-06-27
| | | | | | | | | | | | | | | | | | | | Allow one of 4 archive extensions: .tar{,.gz,.xz,.bz2} for each of the 2 valid repo extensions: .db and .files. Check for this via 'verify_repo_extension' directly after option parsing to assert that this extension is present, and again after files have been added to get the proper archive option for bsdtar. Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add: move command invocation out of arg parsing loopDave Reisner2011-06-27
| | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add: refactor repacking of repo fileDave Reisner2011-06-27
| | | | | | | | | | | | | | Dump the whole conditional and filter the contents of the directory to create an empty or non-empty archive. Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add.8.txt: document valid DB file extensionsDave Reisner2011-06-24
| | | | | | | | Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add: use format_entry for all desc/depends fieldsDave Reisner2011-06-24
| | | | | | | | | | | | | | This ranks high on the code readability scale. The same function formats all of our data and writes to the metadata file at once. Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add: store multi-value fields as arraysDave Reisner2011-06-24
| | | | | | | | | | | | | | | | Fields like groups and depends should be stored as arrays. This requires rewriting our write_list_entry function to accomodate our new data type. This new function will not write to a file, but rather only format it. Signed-off-by: Dave Reisner <d@falconindy.com>
| * repo-add: bashify reading of .PKGINFO fileDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | grep and sed aren't needed here, and this removes the truly ugly manipulation of IFS. The process substituion could just as well be a herestring, but it breaks vim's syntax highlighting. Style over substance, mang. Signed-off-by: Dave Reisner <d@falconindy.com>
| * Merge branch 'master' of git://projects.archlinux.org/pacmanDave Reisner2011-06-24
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'master' of git://projects.archlinux.org/pacman: pactree: carry a list of databases for dep resolution makepkg: Remove a lone quotation mark makepkg: remove the cleancache option Don't require a transaction for sync DB updates Move locking functions to handle Add a 'valid' flag to the database object Move database 'version' check to registration time Do database signature checking at load time
| * | makepkg: fix incorrect parenthesis in gettext callDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | allan broke it in 4bdb868a. Signed-off-by: Dave Reisner <d@falconindy.com>
* | | Remove setter for DB signature levelDan McGee2011-06-27
| | | | | | | | | | | | | | | | | | | | | This should have been removed with commit db3b86e7f34f but was erroniously left behind. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Fix several -Wshadow warningsDan McGee2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only one of these looked like a real red flag, in find_requiredby(), but it doesn't hurt to fix several of them up anyway. Unfortunately, we can't turn this on universally due to things like the sync(), remove(), etc. builtins which we often use as variable names. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Merge branch 'maint'Dan McGee2011-06-27
|\ \ \ | | | | | | | | | | | | | | | | Conflicts: lib/libalpm/conflict.c
| * | | Ensure a file can be replaced by a directoryDan McGee2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses FS#24904. In a normal upgrade case, this replacement seems to work just fine. However, when doing a sync "replace" type upgrade, we weren't properly handling this edge case due to path comparison not ignoring trailing slashes. Fix this by pruning any trailing slashes past a certain point of file conflict resolution where we no longer need them, which allows us to safely detect cases such as now tested in the new pactest. Signed-off-by: Dan McGee <dan@archlinux.org>
| * | | File conflict code cleanupsDan McGee2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While researching the root cause of FS#24904, I couldn't help but clean up some of the cruft in here. A few whitespace/line-wrapping issues, but also fix shadowed variables and add some const where applicable. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | Remove -f option from ln for POSIX complianceEric Bélanger2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes FS#24893. Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | makepkg: Add warning if VCS tool is not present when determining latest VCS ↵Eric Bélanger2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | revision Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | makepkg: Move check for sudo into check_software functionEric Bélanger2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Eric Bélanger <snowmaniscool@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | Remove two alpm_list_count usagesAllan McRae2011-06-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have just looped through the list of files, so might as well get the count as we go. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | Add scripts po directory to autoclean.shAllan McRae2011-06-27
| | | | | | | | | | | | | | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | pactree: add -s option to walk sync DBsDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a whole lot of bloat to parse pacman.conf and only a few lines to use the list of sync DBs instead of the local DB. Dan: I fully plan on this being temporary and us finding a better way in the future to parse pacman.conf from multiple binaries. Adding a standalone config parser is probably not the right way of going about things, but for now it is by far the easiest. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | Make sync DB reading a bit more flexibleDan McGee2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can reorganize things a bit to not require reading a directory-only entry first (or at all). This was noticed while working on some pactest improvements, but should be a good step forward anyway. Also make _alpm_splitname() a bit more generic in where it stores the data it parses. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | archive_fgets(): ensure we return any trailing text with no newlineDan McGee2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Discovered this when doing some pactest rewrite work to generate archives in memory only. If a sync database file or PKGINFO file is missing a newline on the final line, the text from that line gets tossed aside and never read into the package struct. This is pretty critical when that last line is a depend or something. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | | valgrind.supp: add known leaks from GPGMEDan McGee2011-06-24
| |_|/ |/| | | | | | | | | | | | | | | | | Thank you too, GPGME, for these. Why don't you provide a way to clean up your static variable mess? Signed-off-by: Dan McGee <dan@archlinux.org>
* | | pactree: carry a list of databases for dep resolutionDave Reisner2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare an alpm_list which, for now, only holds our local database. walk_deps and walk_reverse_deps are refactored to account for this, and a helper function is added to wrap alpm_db_get_pkg for traversing a list. This is groundwork for letting pactree walk the sync DBs. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | makepkg: Remove a lone quotation markWieland Hoffmann2011-06-24
| | | | | | | | | | | | | | | | | | | | | Allan broke it in 4bdb868. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | makepkg: remove the cleancache optionAllan McRae2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a fairly useless feature given all it does is an "rm" on a directory. It is also unlikely that you would want to remove the entire SRCDEST anyway, but rather just the old files. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Don't require a transaction for sync DB updatesDan McGee2011-06-24
| | | | | | | | | | | | | | | | | | | | | Instead, just do the required locking directly in the backend in calls to alpm_db_update(). Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Move locking functions to handleDan McGee2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | These operate on the handle, and the state is stored on the handle, so move them where they belong. Up until now only the transaction stuff calls them, but this will soon change and alpm_db_update() will handle locking all on its own. Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Add a 'valid' flag to the database objectDan McGee2011-06-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start by converting all of our flags to a 'status' bitmask (pkgcache status, grpcache status). Add a new 'valid' flag as well. This will let us keep track if the database itself has been marked valid in whatever fashion. For local databases at the moment we ensure there are no depends files; for sync databases we ensure the PGP signature is valid if required/requested. The loading of the pkgcache is prohibited if the database is invalid. Signed-off-by: Dan McGee <dan@archlinux.org>