summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
* Fix bash shell location checkDan McGee2010-10-13
| | | | | | | | | | BASH is defined when you are actually using bash during configure, which sucks because it ends up being '/bin/sh', messing up all of our scripts. Change the name of the variable we use in configure, and also ensure we get a full path to the executable by using AC_PATH_PROGS rather than AC_CHECK_PROGS. Finally, change the variable name everywhere we use it. Signed-off-by: Dan McGee <dan@archlinux.org>
* contrib/ follow-up workDan McGee2010-10-12
| | | | | | | | | | * Add a .gitignore file * Use the same 'GEN' output we have in the scripts/ Makefile when doing our edits on the .in files * Remove PKGBUILD.vim and vimprojects from our edit list, they have no need to be in the list Signed-off-by: Dan McGee <dan@archlinux.org>
* CLI args: stricter/better parsingJakob Gruber2010-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the following, the letters SRUDQ refer to the corresponding pacman operations. Most of the work in this commit is about removing as many options as possible from the global section and moving them to where they actually belong. Additionally, --ignore{,group} are added to U and --dbonly is added to S. --dbonly added to S --asdeps moved to S/U/D --asexplicit moved to S/U/D --print-format moved to S/U/R --noprogressbar moved to S/U/R --noscriptlet moved to S/U/R --ignorepkg added to U --ignoregrp added to U -d moved to S/U/R (--nodeps) and Q (--deps) -p moved to S/U/R (--print) and Q (--file) -f moved to S/U Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* CLI args: reorganize parsingJakob Gruber2010-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Split parsing of CLI arguments into separate functions: parsearg_op (operations) parsearg_global (global options) parsearg_{database,query,remove,sync,deptest,upgrade} Organization strictly follows the manpage (even where the manpage is incorrect) - these cases will be fixed in the following commits. Switch cases are copy/pasted and statements unrelated to chosen operation are deleted. Parsing logic adjusted as follows: 1) Parse operation 2) If we can bail out early (duplicate op, help/version requested) do so 3) Parse arguments again: foreach arg: if arg is operation: continue tryparse_args_specific_to_op if unsuccessful tryparse_args_global if unsuccessful print error message and exit Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* util: fall cleaning on single file programsDan McGee2010-10-11
| | | | | | | | | | | * Add a bunch of static declarations where possible * Fix void functions to be proper syntax, e.g. void func(void) * Consistency fixes (such as argv references) * Remove dead str_cmp() function from testdb * Remove unneeded config.h header includes * vercmp: remove completely unnecessary string copying Signed-off-by: Dan McGee <dan@archlinux.org>
* Use sysconfdir, localstatedir, BASH instead of hardcoded valuesNezmer2010-10-11
| | | | | | | | | This applies to contrib/ files, our scripts, and the documentation. Dan: fix 'make clean' in contrib/ directory. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
* Add .in extension to files in contribNezmer2010-10-11
| | | | | | | This is needed If we want to use sysconfdir,localstatedir and other variables. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: more informative delta messagesXavier Chantry2010-10-11
| | | | | | | | | - Print an error if database entry was not found and delta entry cannot be added - More informative line when delta entry is added (oldfile -> newfile) Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* repo-add: add delta generationXavier Chantry2010-10-11
| | | | | | | | | This allows deltas to be generated at repo-add invocation time as opposed to just added to the database. It will generate the delta from the package version currently in the database. Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: fix typo in ignore001Xavier Chantry2010-10-11
| | | | | Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* makepkg: Use mkfifo instead of GNU-only 'mknod <file> p'Nezmer2010-10-11
| | | | | | | | | | 'mknod <file> p' is apparently GNU-only. Looking at coreutils' source code, It just calls mkfifo. This one line patch should fix makepkg logging in non-GNU systems. Signed-off-by: Nezmer <git@nezmer.info> Signed-off-by: Dan McGee <dan@archlinux.org>
* CLI args: add pactest with an invalid combinationJakob Gruber2010-10-11
| | | | | | | | | Pacman should catch cases in which the passed arguments don't apply to the current operation (sync/query/...). Also see FS#20950. Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: fix gensyncXavier Chantry2010-10-11
| | | | | | | | | | | | | | | gensync generated a sync.db file with PKGINFO syntax, this is not quite what pacman expects. Also the file was only added to the Server path: root/var/pub/sync/sync.db but it was not available in the normal sync db path: root/var/lib/pacman/sync/sync.db Change gensync() to generate var/lib/pacman/sync/sync.db and then copy it to var/pub/sync/sync.db (this is used by sync200 -Sy test). Signed-off-by: Dan McGee <dan@archlinux.org>
* pactest: use simpler method to create tarXavier Chantry2010-10-11
| | | | | | | Just like in 24fc623e1a8bf905cf0367f9bd40bc5bd6034378, apply to pmdb gensync as well. Signed-off-by: Dan McGee <dan@archlinux.org>
* Only check for function if we are using libfetchDan McGee2010-10-11
| | | | | | | | We did this check unconditionally, rather than only doing it if we were actually going to build and run with libfetch. This is safe because we would have already bailed if libfetch was explicitly requested but not found. Signed-off-by: Dan McGee <dan@archlinux.org>
* Remove use of `seq` in pactreeDan McGee2010-10-11
| | | | | | | | | | | | | | This is not a bash builtin, so can potentially cause portability issues. Additionally, the use of it is completely unnecessary as it can all be done within bash (and done faster). $ time pactree xfwm4 >/dev/null (old version) real 0m3.245s $ time ./contrib/pactree xfwm4 >/dev/null (new version) real 0m3.042s Signed-off-by: Dan McGee <dan@archlinux.org>
* Avoid stat call to determine is_directory if possibleDan McGee2010-10-11
| | | | | | | | | | On Linux and OS X, we can determine if an entry obtained through a readdir() call is a directory without also having to stat it. This can save a significant number of syscalls. The performance increase isn't dramatic, but it could be on some platforms (e.g. Cygwin) so it shouldn't hurt to use this unconditionally where supported. Signed-off-by: Dan McGee <dan@archlinux.org>
* Merge branch 'maint'Dan McGee2010-10-05
|\
| * Check for python-2.7Allan McRae2010-10-05
| | | | | | | | | | | | | | | | | | Add python-2.7 to the list of checked versions of python and add a check for a python2 binary before resorting to the unversioned python binary. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
| * Make testsuite python-2.7 compatibleRémy Oudompheng2010-10-05
| | | | | | | | | | | | | | | | | | os.walk(".") adds a prefix of "./" to filenames in python-2.7 which causes libalpm not to like archives generated in the testsuite resulting in widespread failure. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: canonicalize paths from environmental variablesAllan McRae2010-10-05
| | | | | | | | | | | | | | | | | | | | This prevents circular symlinks and weird final package locations when using commands like 'PKGDEST="." makepkg'. Fixes FS#20922. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: compare paths using bash testAllan McRae2010-10-05
| | | | | | | | | | | | | | | | | | Compare paths using bash's "-ef" rather than by string tests as this takes symlinks into account. This will prevent issues similar to those in FS#20922 if (e.g.) $PKGDEST is a symlink to $startdir. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: improve srcdir check and add pkgdirAllan McRae2010-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | The checking of the package for $srcdir references was overly sensitive and gave a lot of what appear to be false positives with binary files (in particular with debugging symbols kept). Restrict the search for $srcdir to non-binary files as this should still catch the majority of configuration issues the check was initially designed to catch. Also, add a similar check for $pkgdir. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | makepkg: remove STRIP_DIRSAllan McRae2010-10-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For binary packages, the majority of the time used in the debugs symbol stripping process is the actual stripping of the binaries/libraries and not the testing of which files to strip. This allows more complete stripping of packages that install to "non-standard" paths that would not be generally included in makepkg.conf. Any performance hit that may be apparent for (_large_) "arch=('any')" packages can readily be avoided by disabling stripping in the PKGBUILD options array. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Set pm_errno on libarchive errors while readingSebastian Nowicki2010-09-27
| | | | | | | | | | Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2010-09-27
|\|
| * bacman: unify package creation with makepkgAllan McRae2010-09-15
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently bacman always compresses with gzip now matter what PKGEXT is set to. Rework the entire package creation process to be similar to that in makepkg. This also make the explicit assumption that PKGEXT is defined in makepkg.conf. Thanks to Nelson Chan <khcha.n.el@gmail.com> for the original patch to fix the incorrect package compression. Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'build-system'Dan McGee2010-09-27
|\ \
| * | Update build system (automake, autoconf, libtool)Dan McGee2010-09-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately this patch is hard to split up into smaller chunks. Our build system and the associated automake/autoconf/libtool macros has been left untouched for a while, and could use a refresher. * Upgrade ltmain.sh to the latest version * Move away from a huge acinclude.m4 directory to using individual files in the m4/ subdirectory, suggested by upstream automake documentation * Update all macros to their latest available version * Adjust Makefile.am and autogen.sh to accommodate m4/ subdirectory Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Update more supplementary build scriptsDan McGee2010-09-23
| | | | | | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Update config.guess and config.subDan McGee2010-09-23
| | | | | | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Clean up root .gitignoreDan McGee2010-09-23
| | | | | | | | | | | | | | | | | | | | | | | | We had a few files listed in here that we have checked in to our repo, which doesn't make a whole lot of sense. Also alphabetize the list while we are at it. Signed-off-by: Dan McGee <dan@archlinux.org>
| * | Update gettext Makefiles to 0.18Dan McGee2010-09-23
| | | | | | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
* | | Add FORTIFY_SOURCE supportAllan McRae2010-09-27
| | | | | | | | | | | | | | | | | | | | | | | | Adds a check for the minimum mainline GCC version for FORTIFY_SOURCE support and enables -D_FORTIFY_SOURCE=2 by default when building with --enable-debug. Signed-off-by: Allan McRae <allan@archlinux.org>
* | | Add wrapper around asprintf callsAllan McRae2010-09-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Not checking the return value of asprintf calls reuslts in a warning when using -D_FORTIRFY_SOURCE=2. This adds a simple wrapper around asprintf calls which checks the return value. Currently the check does nothing more than outputing a message to stderr on failure, but that is at least an improvement over silent failures. Signed-off-by: Allan McRae <allan@archlinux.org>
* | | repo-add: make --quiet output more quietAllan McRae2010-09-27
|/ / | | | | | | | | | | Fixes FS#20403. Signed-off-by: Allan McRae <allan@archlinux.org>
* | Merge branch 'maint'Dan McGee2010-09-15
|\|
| * Update Portuguese translationGaspar Santos2010-09-15
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * PKGBUILD-example.txt: Remove superfluous "|| return 1".Lukas Fleischer2010-09-15
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Update Kazakh translationBaurzhan Muftakhidinov2010-09-15
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Minor translation file updates after `make distcheck`Dan McGee2010-09-03
| | | | | | | | | | | | | | It touched up these a bit after it ran, so might as well check the changes in so we don't have to deal with them again later. Signed-off-by: Dan McGee <dan@archlinux.org>
| * Retroactive additions to 3.4.1 changesDan McGee2010-09-03
| | | | | | | | | | | | Forgot to mention things involving the translation changes we had. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Remove quotes in remaining bash regexesDan McGee2010-09-07
| | | | | | | | | | | | | | | | After a8dcfeccfc, Allan noted that one more regular exprssion inside makepkg also contained quotes; these should not be there for the same reason as that commit. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Restore trimming of db and pkg extensionsDan McGee2010-09-07
| | | | | | | | | | | | | | | | These keep having to change because we are getting really good at changing the downloaded filename. Shorten the match sequences to just .db and .pkg and trim everything after and including these strings. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Fix libfetch configure checkingDan McGee2010-09-06
| | | | | | | | | | | | | | | | | | | | I don't know what I tested in commit 3e7b90ff6950, but it definitely wasn't working as advertised. Fix the checks in the source code itself to match the right define (HAVE_LIBFETCH), as well as make sure the configure check defaults to looking for the library but not bailing if it could not be found. Signed-off-by: Dan McGee <dan@archlinux.org>
* | Merge branch 'maint'Dan McGee2010-09-03
|\|
| * libalpm Swedish translation updateTobias Eriksson2010-09-03
| | | | | | | | | | Signed-off by: Tobias Eriksson <tobier@tobier.se> Signed-off-by: Dan McGee <dan@archlinux.org>
| * German translation updatesMatthias Gorissen2010-09-02
| | | | | | | | Signed-off-by: Dan McGee <dan@archlinux.org>
| * Small fixes to Kazakh translationBaurzhan Muftakhidinov2010-09-01
| |
* | Clean up libfetch checking in configureDan McGee2010-09-02
| | | | | | | | | | | | | | | | | | | | Model it after the new OpenSSL check, and have it be a bit more useful. If you do not explicitly pass a command line option, it will be linked if available but will not error out if it is missing. Also bump the version to that where connection caching was introduced as we use these new features in the codebase. Signed-off-by: Dan McGee <dan@archlinux.org>