summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-21remove support for .pacorig filesAndrew Gregory
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>
2015-01-21extract_single_file: use full path in messagesAndrew Gregory
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>
2015-01-21extract_single_file: factor out db file extractionAndrew Gregory
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>
2015-01-21extract_single_file: reduce indentationAndrew Gregory
Puts all of the conflict cases at the same level. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21extract_single_file: consolidate needbackup checksAndrew Gregory
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>
2015-01-21ini.c: move error output into conf.cAndrew Gregory
Move the remaining output into conf.c by notifying the callback of read errors. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21ini.c: remove useless key checkAndrew Gregory
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>
2015-01-21ini.c: remove empty section name restrictionAndrew Gregory
alpm will reject empty database names already. Reduces error handling in the ini parser. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21ini.c: remove unnecessary helper functionAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21ini.c: move Include parsing to conf.cAndrew Gregory
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>
2015-01-21ini.c: remove final callback callAndrew Gregory
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>
2015-01-21conf.c: parse config in a single passAndrew Gregory
Fixes FS#28255 Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21conf.c: use masks for siglevel inheritanceAndrew Gregory
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>
2015-01-21conf.c: store repo settings in dedicated structAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com>
2015-01-21Merge branch 'maint'Allan McRae
2015-01-21fix geometric growth in _alpm_greedy_growDaniel Micay
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>
2015-01-21be_local: fix _alpm_greedy_grow usageDaniel Micay
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>
2015-01-12Merge branch 'maint'Allan McRae
2015-01-12makepkg: clear destination array in array_buildAllan McRae
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>
2015-01-11test makepkg-template: Add update-version-with-newest-optionFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add template-without-versionFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add name-charset-validFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add name-charset-invalidFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add missing-template-symlinkFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add missing-template-fileFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add keep-old-versionFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add invalid-template-line-unknown-markerFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add invalid-template-line-missing-nameFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11test makepkg-template: Add invalid-keyFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11Add testrunner for makepkg-templateFlorian Pritz
Signed-off-by: Florian Pritz <bluewind@xinu.at>
2015-01-11makepkg-template: Remove linenumber/file from errorsFlorian Pritz
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>
2015-01-11Merge branch 'maint'Allan McRae
2015-01-11paccache: exit in case of pacman error when -u flag is usedDario Giovannetti
Fixes https://bugs.archlinux.org/task/43286 Signed-off-by: Dario Giovannetti <dariogiova@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-11makepkg: restore attr merging for write_pkginfoDave Reisner
acc639adf20d removed this, but shouldn't have. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-11makepkg: avoid nested quoting in string replacementDave Reisner
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>
2015-01-11makepkg: fix removing static libraries when shared use absolute symlinksAllan McRae
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>
2015-01-02pkgdelta: Use high compression options offered by xdelta3Mohammad Alsaleh
* 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>
2015-01-02initialize pointers passed to _alpm_pkg_dupAndrew Gregory
_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>
2015-01-02be_package.c: fix style violationAndrew Gregory
Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02add alpm_pkg_get_base() to READMEAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02Remove testdbAllan McRae
Replaced by pacman -Dk / -Dkk Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02Document database checking optionsAllan McRae
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>
2015-01-02Integrate testdb into pacmanAllan McRae
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>
2015-01-02Split install reason changing into its own functionAllan McRae
Prepare for other functions to be added to the --database option. Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02Merge branch 'maint'Allan McRae
2015-01-02Fix typo in a comment in makepkg.confJason St. John
Signed-off-by: Jason St. John <jstjohn@purdue.edu> Signed-off-by: Allan McRae <allan@archlinux.org>
2015-01-02makepkg: avoid expansion of var in arithmetic contextDave Reisner
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>
2015-01-02updpkgsums: retain permissions on rewritten PKGBUILDDave Reisner
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>
2015-01-02Remove outdated fakeroot information from PKGBUILD man pageAllan McRae
Signed-off-by: Allan McRae <allan@archlinux.org>
2014-12-28add tap_ prefix to test helper functionsAndrew Gregory
Allows tap.sh to show the line number where the helper function was called on failures. Signed-off-by: Andrew Gregory <andrew.gregory.8@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>