summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* diskspace: ensure we match only full path componentsDan McGee2012-02-19
| | | | | | | | | If one had a mountpoint at '/e' (don't ask), a file being installed to '/etc' would map to it incorrectly. Ensure we do more than just prefix matching on paths by doing some more sanity checks once the simple strncmp() call succeeds. Signed-off-by: Dan McGee <dan@archlinux.org>
* parseopts: normalize options into an arrayDave Reisner2012-02-16
| | | | | | | | | | Modify parse_options logic to fill an array instead of printing parsed options. Avoid eval like the plague. Because it is the plague. Fixes bugs such as FS#28445. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pacsysclean: Fix script description and accept -o option without hyphenEric Bélanger2012-02-16
| | | | | | | | Close FS#28434 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>
* Revert "Add -S --recursive operation"Dan McGee2012-02-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f3fa77bcf1d792971c314f8c0de255866e89f3f3 along with making other necessary changes to fully back this (mis)feature out until we can do it correctly. The quick summary here is this was not implemented correctly; provides are not fully taken into account in this logic, and making that happen exposes a lot of other flaws in this code that are covered up later on in the dependency resolving process by several other pieces of convoluted and conditional logic. Tests have been adjusted accordingly. Some test EXISTS conditions have been removed as we already know the package is installed locally, and we also are checking the VERSION condition anyway. With these two related revert commits, we do have some changes in test pass/fail results: * upgrade078.py: does not pass, this is due to --recursive getting removed for -U/-S operations after this commit. * sync302.py: the version checks have been disabled, so this test continues to pass but has been scaled back in scope. * sync303.py: now passes, was failing before. * sync304.py: still failing, was failing before. * sync305.py: now passes, was failing before. * sync306.py: still passes, was passing before. Signed-off-by: Dan McGee <dan@archlinux.org>
* Revert "Enable recursive/needed sync on SyncFirst"Dan McGee2012-02-15
| | | | | | | | | | This reverts commit 09034520325efcc2e684f05fa7a99c02bad1f5be. Tests affected by this revert have been adjusted; additionally a few EXIST tests have been removed where there is already a VERSION test doing the job for us. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: fix syntax error in remove_depsChristoph Vigano2012-02-15
| | | | | | | | | | | | This fixes a problem that occurs if you tell makepkg to remove installed dependencies (just to be sure) but there are none. As the $ was missing in front of deplist, the check never happened and 'pacman -Rn' was called which obviously failed. Dan: later reported as FS#28448. Signed-off-by: Christoph Vigano <mail@cvigano.de> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update SIGPIPE signal handler commentDan McGee2012-02-14
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts: unset CDPATH if cd is usedDan McGee2012-02-14
| | | | | | | | | This wonderful/awful little bash shell variable wrecks havoc on `cd` calls in shell scripts. Unset CDPATH in makepkg where we use `cd` quite heavily. In pacman-optimize, we can move the change directory logic into the bsdtar call so we are left with no usages of `cd` in the script. Signed-off-by: Dan McGee <dan@archlinux.org>
* lib/sync: use full delta size as max download sizeDave Reisner2012-02-13
| | | | | | | | | | The max filesize for a delta download must be the full size of the delta file, not just what's remaining. Fixes FS#28345 Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* 4.0.2 release updatesDan McGee2012-02-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Final pre-release Transifex updatesDan McGee2012-02-11
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* pactree: allow comments after repo section headerAllan McRae2012-02-11
| | | | | | | Duplicate the fix in config file parsing from d95c0494. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: disable extglob when sourcing BUILDSCRIPTAllan McRae2012-02-11
| | | | | | | | | | | | | | PKGBUILDs are advertised as being pure bash so it would be expected that the default bash options are in effect when sourcing it. This inadvertantly "fixes" FS#27780 where enabling extglob causes the bash parser to error on non-valid bash function names like package_libxml++(). Note that these function names are unsupported in bash and could break again even with this "fix" in future bash releases. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: deal with mercurial exit codesAllan McRae2012-02-11
| | | | | | | | | From mercurial-2.1, "hg pull" returns 1 when there are no updates. Catch the return code and either pull the update or return an error as appropriate. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix a handful of comment typos or misspellingsDan McGee2012-02-06
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Translation updates from Transifex, mostly scriptsDan McGee2012-02-06
| | | | | | | This is after some manual massaging to fix issues with newlines in some translations of the script catalogs. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg.sh.in - if both -r and -i are provided, only remove makedepsAndrew Gregory2012-02-06
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update translations from TransifexDan McGee2012-02-06
| | | | | | | The pacman-scripts catalog is omitted here due to various newline errors I don't have the time to fix right now. Signed-off-by: Dan McGee <dan@archlinux.org>
* remove.c: make "target not found" error consistent with sync.cAndrew Gregory2012-02-06
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg.sh.in - fix remove_deps test for deps to be removedAndrew Gregory2012-02-06
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: add forgotten newline in help outputMantas Mikulėnas2012-02-06
| | | | | Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: check return code in some upgrade testsDan McGee2012-02-03
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Add simple integer-only pow() implementationDan McGee2012-02-03
| | | | | | | | We hardly need the complexity (or slowness) provided by the libm power function; add a super-cheap one that suits our needs and is specialized for the values we plan on passing in. Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix FS#27924: don't display negative zeroesThomas Dziedzic2012-02-03
| | | | | | | Dan: don't compute lower bound unless needed, flip argument order so out values are last, add param Doxygen documentation. Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Fix non-writable SRCPKGDEST error messageAllan McRae2012-01-31
| | | | | | | | | | Provide a helpful error message for when creating a source tarball and SRCPKGDEST is not writable. Fixes FS#28197. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix rare segfault on package removalAllan McRae2012-01-31
| | | | | | | | | | Very rarely a segfault would occur when removing a number of packages due to a corrupted list for the local database (FS#27805, FS#28195). This was caused by the alpm_list_msort function not correctly dealing with the two new head node's prev values. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Update translationsDan McGee2012-01-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Update pot translation catalogsDan McGee2012-01-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Make a few more copyright date tweaksDan McGee2012-01-30
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* scripts: always use printf with embedded gettextDave Reisner2012-01-30
| | | | | | | | | | | | | | | | | | | | | | This addresses two problems: 1) echo's behavior is inconsistent when dealing with flags, and can potentially be problematic. $ echo -n $ echo -- -n -- -n 2) Always using the end of options markers prevents translated strings from throwing errors, as shown in FS#28069. The remaining "inconsistencies" are because printf is being used in a guaranteed safe manner, e.g. printf '%s\n' "$(gettext "--this can never break")" Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: workaround for zipman issuesAllan McRae2012-01-30
| | | | | | | | | | | | | | This "fixes" two issues: 1) MAN_DIRS contains a glob by default so should not be quoted. It is not quoted anywhere else so this should not cause breakage... 2) the find statement returns 1 when some of MAN_DIRS are missing. This appears to only be exposed when running makepkg as root (which it appears some wrappers do...). Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* lib/dload: give uniform naming to curl CB functionsDave Reisner2012-01-23
| | | | | Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix sys/mnttab.h header includeDan McGee2012-01-23
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* lib/dload: enforce usage of TCP keepalivesDave Reisner2012-01-23
| | | | | | | | | This is particularly important in the case of FTP control connections, which may be closed by rogue NAT/firewall devices detecting idle connections on larger transfers which may take 5-10+ minutes. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: restrict usage of flags passed to pacmanAllan McRae2012-01-23
| | | | | | | | | With pacman-4.0, using --noconfirm or --noprogressbar with -Q or -T results in pacman reporting an "invalid option" error. Restrict the passing of these options to pacman. Fixes FS#28012. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: fix error on unnecessary -rAllan McRae2012-01-23
| | | | | | | | | | The grep statement used to check for a difference between the installed package list before and after resolving dependencies returns 1 if there is no difference. This sets of the error trap when "-r" is used "unnecessarily". Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/bash_completion: don't print stderr messagesDan McGee2012-01-19
| | | | | | | | | | | If you are a crazy developer like me and have bogus options in your pacman.conf file, the tab completion gets messed up by the output on stderr. Suppress it. Fix the same basic issue in zsh_completion, thanks to the work by Florian Pritz <bluewind@xinu.at>. Signed-off-by: Dan McGee <dan@archlinux.org>
* Add diskspace checking support for Solaris/IllumosDan McGee2012-01-19
| | | | | | | | | Was able to get my hands on one of these boxes today, so add yet another new way of doing this. I'm glad these calls are so standardized. This was compile tested on Linux and Illumos and seems to still be working in both places. Signed-off-by: Dan McGee <dan@archlinux.org>
* Update copyright on changed files since beginning of yearDan McGee2012-01-18
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* util.c, rmrf(): only create string when neededOlivier Brunel2012-01-18
| | | | | | | | The entry's name is only used when not "." or ".." so only print the string then. Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix missing [removal] outputAllan McRae2012-01-18
| | | | | | | | | | | | Currently, a transaction is considered to be purely package removal until the first package install is found. This resulted in the removed packages at the start of a combined upgrade/removal transaction not getting the "[removal]" output. Fixes FS#27981. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Improve exit statuses and error messages in pacman-keycanyonknight2012-01-18
| | | | | | | | | | | | | | | | Return codes from gpg commands are currently lost. This adds the functionality of taking non-zero exit statuses from gpg. This includes error reporting for all gpg commands that are run individually, run in a loop, and run through a pipe. Includes the check_keyids_exist function which verifies a key exists locally prior to attempted local manipulation of the key. If a gpg command has a non-zero status, pacman-key will now exit with a non-zero status. It will print a gettext error message of gpg's failure. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Turn gpg commands into functions in pacman-keycanyonknight2012-01-18
| | | | | | | | | | | | | | | | | | Adds functions for every gpg command. By pulling out the gpg commands from the "program start" section, additional commands can be run before or after a specific gpg command without adding additional clutter to the function call section. Adds an explicit exit status of 0 to prevent arithmetic expansions from returning non-zero, thereby falsely causing pacman-key to have a non-zero exit status. This change creates the framework for additional error messages and better exit statuses being added to every pacman-key gpg call. Signed-off-by: canyonknight <canyonknight@gmail.com> Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: clean up help messagesDan McGee2012-01-18
| | | | | | | | Use consistent blank lines across all commands, get rid of the translated double newlines which only serve to confuse translators, and fix -h/--help for that extra special third command this script offers. Signed-off-by: Dan McGee <dan@archlinux.org>
* Fix broken output when asking question and stdin is pipedOlivier Brunel2012-01-18
| | | | | | | | | When asking question and stdin is piped, the response does not get printed out, resulting in a missing \n and broken output (FS#27909); printing the response fixes it. Signed-off-by: Olivier Brunel <i.am.jack.mail@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* fetch_url: look for files in cache before downloadingDave Reisner2012-01-18
| | | | | | | | | | We lost this logic somewhere between the libfetch and libcurl transition, as it existed in the internal downloader, but was pulled back only into the sync workflow. Add a helper function that will let us check for existance in the filecache prior to calling the downloader. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* Use isdigit() rather than character range comparisonsDan McGee2012-01-18
| | | | | | This is safer and guaranteed to work with even exotic character sets. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove unused strtoupper() functionDan McGee2012-01-18
| | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* Don't remove unknown files in cache cleaning codeDan McGee2012-01-18
| | | | | | | | | | This removes the hack I added to skip '*.sig' files earlier since there are other files that also fall into the same bucket- source packages from `makepkg --source`, delta files, etc. Rather than prompting for each and every one, simply skip them. Doing '-Scc' rather than '-Sc' will delete these files if that is really what you want to do. Signed-off-by: Dan McGee <dan@archlinux.org>
* doc/vercmp: add note about pkgrel handlingDan McGee2012-01-12
| | | | | | | This comes from the Doxygen function documentation. Also, fix two rather silly misspellings. Signed-off-by: Dan McGee <dan@archlinux.org>