summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* syntax: if/while statements should have no trailing spaceDan McGee2011-04-20
| | | | | | | | | | | This is the standard, and we have had a few of these introduced lately that should not be here. Done with: find -name '*.c' | xargs sed -i -e 's#if (#if(#g' find -name '*.c' | xargs sed -i -e 's#while (#while(#g' Signed-off-by: Dan McGee <dan@archlinux.org>
* Allow VerifySig to act as a default verification in [options]Dave Reisner2011-04-20
| | | | | | | | | | * add _alpm_db_get_sigverify_level * add alpm_option_{get,set}_default_sigverify And set the default verification level to OPTIONAL if not set otherwise. Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* alpm.h: forward-declare shared enumerationsDan McGee2011-04-20
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* style cleanup: cast as (type *) not (type*)Dave Reisner2011-04-20
| | | | | Signed-off-by: Dave Reisner <d@falconindy.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* lib: remove dead code in be_local and be_packageDave Reisner2011-04-20
| | | | Signed-off-by: Dave Reisner <d@falconindy.com>
* Put comments on their own lineDan McGee2011-04-20
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Add configure option to specify package signing keyAllan McRae2011-04-20
| | | | | | | | | Add the "GPGKEY" option to makepkg.conf for specifying signing packages with the non-default key from the keyring. Is overridded by makepkg's --key option. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Document makepkg package signing optionsAllan McRae2011-04-20
| | | | | | | Dan: fix some grammar issues. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* New VerbosePkgLists optionJakob Gruber2011-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If enabled, displays package lists for upgrade, sync and remove operations formatted as a table. Falls back to default list display if insufficient terminal columns are available. Example output: :: Starting full system upgrade... :: Replace libjpeg with testing/libjpeg-turbo? [Y/n] resolving dependencies... looking for inter-conflicts... Remove (1): Name Old Version Size libjpeg 8.3.0-1 0.83 MB Total Removed Size: 0.83 MB Targets (5): Name Old Version New Version Size libjpeg-turbo 1.1.0-1 0.20 MB linux-firmware 20110201-1 20110227-1 8.23 MB ncurses 5.7-4 5.8-1 0.92 MB ppl 0.11.1-1 0.11.2-1 2.74 MB v4l-utils 0.8.1-1 0.8.3-1 0.23 MB Total Download Size: 12.32 MB Total Installed Size: 58.82 MB Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Table formatted output functionsJakob Gruber2011-04-20
| | | | | | | | | table_display takes a list of lists of strings (representing the table cells) and displays them formatted as a table. The exact format depends on the longest string in each column. Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2011-04-20
|\
| * Final updates for 3.5.2 releaseDan McGee2011-04-18
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * 3.5.2 translation updates from TransifexDan McGee2011-04-18
| | | | | | | | | | | | And also a POT version and package version update. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Refactor display_targets for readabilityJakob Gruber2011-04-20
| | | | | | | | | | | | | | | | Row handling is moved to its own function in preparation for verbose package lists. Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove outdated commentsDan McGee2011-04-20
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | Use IEC unit prefixesJakob Gruber2011-04-20
| | | | | | | | | | | | | | | | Display {KiB, MiB, ...} instead of {KB, MB, ...} since that's what's actually being displayed. Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Add a utility function to humanize sizesJakob Gruber2011-04-20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Converts the given size in bytes in two possible ways: 1) target_unit is specified (!= 0): size is converted to target unit. 2) target_unit is not specified (== '\0'): size is converted to the first unit which will bring size to below 2048. If specified, label will point to the long label ('MB') if long_labels is set or the short label ('M') if it is not. Dan: use '\0' rather than 0 for the special value as a matter of coding style for char variables. Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove ShowSize optionJakob Gruber2011-04-20
| | | | | | | | | | | | | | | | | | | | Dan: The commit message originally referenced "VerbosePkgLists", but I'm going to change the name of the option. In addition, this patch serves a purpose being standalone- we should really do things like this with -S --print and hopefully -Q --print in the future. Signed-off-by: Jakob Gruber <jakob.gruber@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-04-15
|\| | | | | | | | | | | | | | | Conflicts: lib/libalpm/alpm.h lib/libalpm/trans.c Signed-off-by: Dan McGee <dan@archlinux.org>
| * pacman/query: correctly handle root files with -QoXavier Chantry2011-04-15
| | | | | | | | | | | | | | | | spotted by clang-analyzer (strcmp with NULL rpath is bad) Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg.sh.in: fix a GNU-ism in su invocationRémy Oudompheng2011-04-13
| | | | | | | | | | | | | | | | | | | | | | | | GNU su supports the -c option to specify a command to execute. However, other flavours of su may have a different interpretation of the '-c' flag (e.g. FreeBSD and OpenBSD). The behaviour is correct when '-c' follows an explicit username. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * alpm.h: fix typos in documentationRémy Oudompheng2011-04-13
| | | | | | | | Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
| * Remove Korean language translation filesDan McGee2011-04-12
| | | | | | | | | | | | | | There is no actual translation done here yet, just a dormant Transifex language with nothing checked in. Signed-off-by: Dan McGee <dan@archlinux.org>
| * bacman: fix the fact that the depends file no longer existsDan McGee2011-04-09
| | | | | | | | | | | | Addresses FS#23641. Signed-off-by: Dan McGee <dan@archlinux.org>
| * alpm.h: document transaction flagsRémy Oudompheng2011-04-09
| | | | | | | | Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
| * More documentation for option getters/setters.Rémy Oudompheng2011-04-09
| |
| * alpm.h: more documentation for pkgreason, depend and errno.Rémy Oudompheng2011-04-09
| |
| * Move documentation for public package function to alpm.hRémy Oudompheng2011-04-09
| |
| * alpm.h: organize doxygen documentation in groupsRémy Oudompheng2011-04-09
| |
| * Move documentation of public database functions to alpm.hRémy Oudompheng2011-04-09
| |
| * alpm.h: add documentation for package property accessorsRémy Oudompheng2011-04-09
| |
| * Move documentation of public transaction functions to alpm.hRémy Oudompheng2011-04-09
| |
| * Fix broken documentation for alpm_trans_prepare()Rémy Oudompheng2011-04-09
| | | | | | | | | | | | | | The current state of the code does not allow to see immediately that it returns a list of pmdepmissing_t structures. Signed-off-by: Dan McGee <dan@archlinux.org>
| * libalpm: set pm_errno correctly in alpm_trans_get_flags()Rémy Oudompheng2011-04-09
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * diskspace: add the actually used statfs type in ifdefsRémy Oudompheng2011-04-06
| | | | | | | | | | | | | | | | | | | | Some systems, like FreeBSD might define both statfs and statvfs: however if statvfs exists whereas getmntinfo() uses a statfs struct, the current ifdefs would select the wrong line of code. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Include "config.h" in header files using off_tDan McGee2011-04-15
| | | | | | | | | | | | | | | | This makes it absolutely dead easy to ensure off_t has the same length in all compilation units. I just spent 2.5 hours bashing my head on an issue related to this so damn it I'm fixing it for good. Signed-off-by: Dan McGee <dan@archlinux.org>
* | libalpm: consistently use int as return type for option settersRémy Oudompheng2011-04-15
| | | | | | | | | | | | | | | | Currently the only error case then when handle == NULL. However several handle functions return -1 on this error, and a uniform API makes things simpler. Signed-off-by: Rémy Oudompheng <remy@archlinux.org>
* | Remove indirection on get_name and get_version operationsDan McGee2011-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For a package to be loaded from any of our backends, these two fields are always required upfront. Due to this fact, we don't need them to be backend-specific operations and can just refer to the field directly. Additionally, our static (and thus private) cache package accessors had a NULL check on pkg before returning the relevant field. Eliminate this since they only way they are ever called is via the packages attached callback struct, which would have caused the NULL pointer dereference in the first place. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Move graph.h functions into graph.cDan McGee2011-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | So we only need one copy in the final library, not one copy per time used. Ensure all necessary includes are in place (especially to get the right size of off_t each time it is compiled) by including "config.h" in the new graph.c. One small adjustment here makes the graph_free code more robust- ensure we don't have invalid pointers after each iteration by looking at the parents and children and adjusting accordingly. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Don't create two pmpkg_t objects in be_packageDan McGee2011-04-11
| | | | | | | | | | | | | | | | | | Ensure we only have one- this looks like the result of a bad merge from old 2008 signing code with the current stuff which has changed quite a bit. Originally-seen-by: Rémy Oudompheng <remyoudompheng@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2011-04-05
|\| | | | | | | | | | | | | Conflicts: lib/libalpm/be_sync.c lib/libalpm/db.c src/pacman/util.c
| * libalpm/be_local.c: unused variable entXavier Chantry2011-04-04
| | | | | | | | | | | | spotted by clang analyzer Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
| * libalpm/pkghash.c: unused variable ptrXavier Chantry2011-04-04
| | | | | | | | | | | | spotted by clang analyzer Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
| * makepkg: fix a GNU-ism in awk usageRémy Oudompheng2011-04-04
| | | | | | | | | | | | | | | | | | | | A non-GNU version of awk may not support the (|...) syntax for an optional group and require '()' to match an empty string. The (...)? syntax is more appropriate for this usage. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * makepkg: improve parsing for sanity checksAllan McRae2011-04-04
| | | | | | | | | | | | | | | | | | Trailing backslahses can lead to additional spaces at the front of extracted entries. See FS#23524. Strip these while parsing the PKGBUILD entries. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * db.c: set pm_errno appropriately in alpm_db_set_pkgreason()Rémy Oudompheng2011-04-04
| | | | | | | | | | Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Coding style cleanupsDan McGee2011-04-04
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * test: fix invalid usage of 'type -p'Dan McGee2011-04-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The vercmptest script needs to be invoked as a bash script for this to be valid; the -p operator is interpreted as an argument to look up by sh. This goes way back to commit 3bf9448943dc0b, done to solve http://mailman.archlinux.org/pipermail/pacman-dev/2008-July/007180.html. Saw this problem running in a virtual machine where sh is not bash, but in fact dash: user@debian-powerpc:~/projects/pacman$ ./test/util/vercmptest.sh src/util/vercmp-p: not found src/util/vercmp is src/util/vercmp vercmp binary (src/util/vercmp) could not be located Signed-off-by: Dan McGee <dan@archlinux.org>
| * util.c: include limits.h for PATH_MAX macroRémy Oudompheng2011-04-02
| | | | | | | | | | Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Fix compatibility with older versions of libarchive.Rémy Oudompheng2011-04-02
| | | | | | | | | | | | | | | | | | There is no reason to not support versions of libarchive that lack ARCHIVE_COMPRESSION_UU. Distributions should work properly without this. Signed-off-by: Rémy Oudompheng <remy@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>