summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAge
* Prefix alpm_transconv_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_transevt_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_transflag_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_loglevel_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_fileconflicttype_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Prefix alpm_pkgreason_t members with ALPMAllan McRae2011-07-02
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* pacman: return with 128+signum on signaled exitDave Reisner2011-06-30
| | | | | | | | This is a convention that is widely followed in *nix and posix-ish environments. We should follow it, too. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a few warnings pointed out via clang scan-buildDan McGee2011-06-30
| | | | | | | | | Some of these are legit (the backup hash NULL checks), while others are either extemely unlikely or just impossible for the static code analysis to prove, but are worth adding anyway because they have little overhead. Signed-off-by: Dan McGee <dan@archlinux.org>
* Rename public functions with grp in their nameAllan McRae2011-06-29
| | | | | | | | | | | | | | | Using grp instead of group is a small saving at the cost of clarity. Rename the following functions: alpm_option_get_ignoregrps -> alpm_option_get_ignoregroups alpm_option_add_ignoregrp -> alpm_option_add_ignoregroup alpm_option_set_ignoregrps -> alpm_option_set_ignoregroups alpm_option_remove_ignoregrp -> alpm_option_remove_ignoregroup alpm_db_readgrp -> alpm_db_readgroup alpm_db_get_grpcache -> alpm_db_get_groupcache alpm_find_grp_pkgs -> alpm_find_group_pkgs Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmerrno_t to alpm_errno_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmtransprog_t to alpm_transprog_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmtransconv_t to alpm_transconv_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* Rename pmtransevt_t to alpm_transevt_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* 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 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 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 pmpkgreason_t to alpm_pkgreason_tAllan McRae2011-06-28
| | | | Signed-off-by: Allan McRae <allan@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>
* 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>
* 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>
* 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>
* 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>
* Move database 'version' check to registration timeDan McGee2011-06-24
| | | | | | | | This is another step toward doing both local database validation (ensuring we don't have depends files) and sync database validation (via signatures if present) when the database is registered. Signed-off-by: Dan McGee <dan@archlinux.org>
* Do database signature checking at load timeDan McGee2011-06-24
| | | | | | | | | | | | | | | | | | This is the ideal place to do it as all clients should be checking the return value and ensuring there are no errors. This is similar to pkg_load(). We also add an additional step of validation after we download a new database; a subsequent '-y' operation can potentially invalidate the original check at registration time. Note that this implementation is still a bit naive; if a signature is invalid it is currently impossible to refresh and re-download the file without manually deleting it first. Similarly, if one downloads a database and the check fails, the database object is still there and can be used. These shortcomings will be addressed in a future commit. 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>
* Merge branch 'po-split'Dan McGee2011-06-23
|\
| * 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>
| * 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>
* | 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>
* 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>
* Make pmgrp_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>
* 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>
* Merge branch 'maint'Dan McGee2011-06-15
|\
| * list_display: fix incorrect assignmentDan McGee2011-06-15
| | | | | | | | | | | | | | Commit 895a88886525d erroneously left this around. Noticed-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Ensure humanize_size works for negative valuesJakob Gruber2011-06-15
| | | | | | | | | | Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use pm_fprintpf in table_create_formatJakob Gruber2011-06-15
| | | | | | | | | | Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Avoid setting sigverify option twiceDan McGee2011-06-14
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-06-14
|\| | | | | | | | | Conflicts: doc/makepkg.conf.5.txt
| * Fix list_display on non-ttys and other output fixesDan McGee2011-06-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit c1f742d7750a14 broke what was one of the tenants of out output- if piping pacman output somewhere else, we shouldn't ever try to line-wrap and indent print our output. This makes it easier for tools to use output from pacman -Ss, -Qs, -Qi, etc. list_display() unfortunately was given a default value of 80 rather than 0, so fix this. Next, make some additional changes that ensure we don't insert an unnecessary blank line if for some crazy reason the indent level (such as on -Qi output) is greater than the number of columns. Accomplish this by printing the first item unconditionally as we do in list_display_linebreak(). Finally, teach indentprint to not wrap if the number of columns is less than the indent level, this prevents some forms of ridiculous output such as the following: Install Date : Wed 08 Jun 2011 04:39:19 AM CDT Signed-off-by: Dan McGee <dan@archlinux.org>