summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* extract_single_file: consolidate extraction logicAndrew Gregory2015-01-21
| | | | | | Also adds checks that the filename does not exceed PATH_MAX. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* extract_single_file: use .pacnew for check filesAndrew Gregory2015-01-21
| | | | | | | | Prevents the need to rename the file if we end up keeping it and ensures that pacnew files always reflect the most recent version by overwriting stale copies. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* remove support for .pacorig filesAndrew Gregory2015-01-21
| | | | | | | | Leave user files in place and save new config files with a .pacnew extension. This reduces the complexity of file extraction and respects the principle that pacman shouldn't modify files it didn't create. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* extract_single_file: use full path in messagesAndrew Gregory2015-01-21
| | | | | | | | If an error occurs the actual path being extracted is more useful than the original path from the package file list. The original path is still used for checks that use it directly. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* extract_single_file: factor out db file extractionAndrew Gregory2015-01-21
| | | | | | | alpm's database files (.INSTALL, .MTREE, etc.) should be extracted no matter what; skip mtree/needbackup/noextract/noupgrade checks for them. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* extract_single_file: reduce indentationAndrew Gregory2015-01-21
| | | | | | Puts all of the conflict cases at the same level. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* extract_single_file: consolidate needbackup checksAndrew Gregory2015-01-21
| | | | | | We need to know if a file needs to be backed up for all extracted files. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* ini.c: move error output into conf.cAndrew Gregory2015-01-21
| | | | | | | Move the remaining output into conf.c by notifying the callback of read errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* ini.c: remove useless key checkAndrew Gregory2015-01-21
| | | | | | | key points to a statically allocated string so it can't be NULL and empty keys are rejected by the callback. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* ini.c: remove empty section name restrictionAndrew Gregory2015-01-21
| | | | | | | alpm will reject empty database names already. Reduces error handling in the ini parser. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* ini.c: remove unnecessary helper functionAndrew Gregory2015-01-21
| | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* ini.c: move Include parsing to conf.cAndrew Gregory2015-01-21
| | | | | | | Reduces the number of errors the ini parser must handle to make it more suitable for sharing with the backend. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* ini.c: remove final callback callAndrew Gregory2015-01-21
| | | | | | | Storing repo information removes the need for the final callback. This allows the call signature to be re-purposed for indicating read errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* conf.c: parse config in a single passAndrew Gregory2015-01-21
| | | | | | Fixes FS#28255 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* conf.c: use masks for siglevel inheritanceAndrew Gregory2015-01-21
| | | | | | | | This will allow pacman to parse its config file in a single pass and removes the need for the *_SET siglevels in alpm that were only required for pacman's siglevel inheritance. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* conf.c: store repo settings in dedicated structAndrew Gregory2015-01-21
| | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
* Merge branch 'maint'Allan McRae2015-01-21
|\
| * fix geometric growth in _alpm_greedy_growDaniel Micay2015-01-21
| | | | | | | | | | | | | | | | It was allocating the required size rather than the calculated new size, resulting in pathological incremental reallocations. Signed-off-by: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * be_local: fix _alpm_greedy_grow usageDaniel Micay2015-01-21
| | | | | | | | | | | | | | | | | | The files_size variable contains the current capacity (in bytes) and should not be used to calculate the next length increment. It only works because _alpm_greedy_grow currently results in incremental growth. Signed-off-by: Daniel Micay <danielmicay@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2015-01-12
|\|
| * makepkg: clear destination array in array_buildAllan McRae2015-01-12
| | | | | | | | | | | | | | | | | | | | | | If an already used array is passed array_build, some entries from the old array could be carried over if the old array was longer than the new one. Clear the destination array before adding elements to it to prevent this issue. Fixes: https://bugs.archlinux.org/task/43387 Signed-off-by: Allan McRae <allan@archlinux.org>
* | test makepkg-template: Add update-version-with-newest-optionFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add template-without-versionFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add name-charset-validFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add name-charset-invalidFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add missing-template-symlinkFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add missing-template-fileFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add keep-old-versionFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add invalid-template-line-unknown-markerFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add invalid-template-line-missing-nameFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | test makepkg-template: Add invalid-keyFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | Add testrunner for makepkg-templateFlorian Pritz2015-01-11
| | | | | | | | Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | makepkg-template: Remove linenumber/file from errorsFlorian Pritz2015-01-11
| | | | | | | | | | | | | | | | die prints "at $scriptname line $linenumber." if the string does not end with "\n". This information is not of much use for us and it makes testing harder because we'd to remove it there. Signed-off-by: Florian Pritz <bluewind@xinu.at>
* | Merge branch 'maint'Allan McRae2015-01-11
|\|
| * paccache: exit in case of pacman error when -u flag is usedDario Giovannetti2015-01-11
| | | | | | | | | | | | | | Fixes https://bugs.archlinux.org/task/43286 Signed-off-by: Dario Giovannetti <dariogiova@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: restore attr merging for write_pkginfoDave Reisner2015-01-11
| | | | | | | | | | | | acc639adf20d removed this, but shouldn't have. Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: avoid nested quoting in string replacementDave Reisner2015-01-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I suspect this is just wrong -- you never need to quote the replacement side of a PE. In bash 4.3, this is essentially a no-op, but because of a bug in bash 4.2, we get embedded quotes as a result of this replacement. The relevant changelog item in bash is: Fixed a bug that caused single quotes that resulted from $'...' quoting in the replacement portion of a double-quoted ${word/pat/rep} expansion to be treated as quote characters. But this doesn't apply to us. Let's just drop the excessive quoting... Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: fix removing static libraries when shared use absolute symlinksAllan McRae2015-01-11
| | | | | | | | | | | | | | | | When a shared library uses an absolute symlink for its its .so file, the check if the shared version of a static library exists fails. Test for the presence of a broken symlink too. Signed-off-by: Allan McRae <allan@archlinux.org>
* | pkgdelta: Use high compression options offered by xdelta3Mohammad Alsaleh2015-01-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add -9 which is the highest compression level. * Use lzma for secondary compression. Decompression speed is largely unaffected as most cycles are consumed by xz for re-compression. Some numbers: clang x86_64 [3.5.0-2.1 to 3.5.0-3] 17.21MiB default (0.73) 15.67MiB -9 (0.67) 13.59MiB -9 -S djw (0.58) 12.01MiB -9 -S lzma (0.51) inkscape x86_64 [0.48.5-3 to 0.48.5-4] 02.69MiB default (0.21) 01.64MiB -9 (0.13) 01.30MiB -9 -S djw (0.10) 01.01MiB -9 -S lzma (0.08) Signed-off-by: Mohammad Alsaleh <CE.Mohammad.AlSaleh@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | initialize pointers passed to _alpm_pkg_dupAndrew Gregory2015-01-02
| | | | | | | | | | | | | | | | | | | | _alpm_pkg_dup leaves the destination pointer unaltered in case of fatal errors, so when commits 2f0ca00e and be4198b3 freed the pointer, they fixed a memory leak on non-fatal errors by replacing it with a segmentation fault on fatal errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | be_package.c: fix style violationAndrew Gregory2015-01-02
| | | | | | | | | | Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
* | add alpm_pkg_get_base() to READMEAllan McRae2015-01-02
| | | | | | | | Signed-off-by: Allan McRae <allan@archlinux.org>
* | Remove testdbAllan McRae2015-01-02
| | | | | | | | | | | | Replaced by pacman -Dk / -Dkk Signed-off-by: Allan McRae <allan@archlinux.org>
* | Document database checking optionsAllan McRae2015-01-02
| | | | | | | | | | | | | | | | The required adding a Database Option section to the pacman man page and adding more complete documentation for --asdeps and --asexplicit as well. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Integrate testdb into pacmanAllan McRae2015-01-02
| | | | | | | | | | | | | | | | | | | | | | | | The functionality of testdb is now available in pacman. pacman -Dk will check the local database for consistency, and pacman -Dkk will check the sync databases. Note that unlike testdb, you can not specify individual sync databases to check as sync databases act as a whole and not individually. A single database can be checked using an alternative pacman.conf file. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Split install reason changing into its own functionAllan McRae2015-01-02
| | | | | | | | | | | | Prepare for other functions to be added to the --database option. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Allan McRae2015-01-02
|\|
| * Fix typo in a comment in makepkg.confJason St. John2015-01-02
| | | | | | | | | | Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
| * makepkg: avoid expansion of var in arithmetic contextDave Reisner2015-01-02
| | | | | | | | | | | | | | | | | | | | This bombs out when "$trusted" expands to the empty string. We're better off passing the var by name and letting bash default to "0" when the var is empty Fixes: https://bugs.archlinux.org/task/43269 Signed-off-by: Allan McRae <allan@archlinux.org>
| * updpkgsums: retain permissions on rewritten PKGBUILDDave Reisner2015-01-02
| | | | | | | | | | | | | | | | | | | | This could have been easy with something like chown's --reference flag, but this is GNU specific. Instead, just truncate and rewrite the file. Our exit trap cleans up after us. Fixes: https://bugs.archlinux.org/task/43272 Signed-off-by: Allan McRae <allan@archlinux.org>