Commit Graph

1605 Commits

Author SHA1 Message Date
Dan McGee f3e8343c7e Update PKGBUILD.5 with missing devel variable descriptions
The lack of descriptions on some of the variables was causing issues with
documentation generation. Adding text to them fixes this.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-08 09:33:05 -06:00
Dan McGee 9fdb15b4b5 Sync asciidoc.conf with GIT repository changes
We got our file from the GIT repository originally, so keep it up to date.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-08 09:31:58 -06:00
Scott Horowitz dd2d6f980b Correctly handle version comparisons for SVN/CVS/etc PKGBUILDS.
Retrieve SVN/CVS/etc revision number before checking if the
package has already been built. This allows building a newer
version of a developmental package without having to use -f.
Now -f will only be needed if the latest SVN/CVS/etc revision
is the same as the built package.

Signed-off-by: Scott Horowitz <stonecrest@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-08 07:15:37 -06:00
Dan McGee 23745a7bf2 Update the PKGBUILD example in the manpages
The old one was old. Use something a bit more recent and a bit simpler as
well so it actually looks OK in the manpage.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-07 19:03:58 -06:00
Dan McGee 0e83f12f4a Change -fstack-protector flag to -fstack-protector-all
We only use it with --enable-debug, so we might as well go all out and try
to find any attempt of stack smashing.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-07 19:03:58 -06:00
Jeff Bailes 4bbb055cd9 Update en_GB translation
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-07 19:03:58 -06:00
Aaron Griffin d0d58489ff Add STRDUP macro to mirror MALLOC/CALLOC
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-06 23:23:03 -06:00
Aaron Griffin 2ee90ddae2 Maintain list tail pointers in the head node
List head nodes contain null 'prev' pointer, which we can (ab)use to maintain a
back reference to the tail pointer of the list.

While list additions are not _significantly_ improved, they are still sped up.

Original
   $ time pacman -Qo /usr/bin/wtpt
   /usr/bin/wtpt is owned by lcms 1.17-2

   real    0m3.623s
   user    0m1.883s
   sys     0m1.473s

New
   $ time pacman -Qo /usr/bin/wtpt
   /usr/bin/wtpt is owned by lcms 1.17-2

   real    0m2.006s
   user    0m0.263s
   sys     0m1.627s

Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
2007-11-06 22:47:10 -06:00
Dan McGee bdab234d97 Comment out paths by default in pacman.conf
Now that all paths are defined to reasonable defaults at compile time by
pacman, we shouldn't force users to have RootDir, DBPath, etc. in their
default pacman.conf although these options are always available.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-05 22:09:05 -06:00
Dan McGee 52b7fd81f5 libalpm/db.c: change two warnings to errors
These two warnings really indicate failure, so the message they print should
do so as well.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-05 21:10:43 -06:00
Sebastian Nowicki cb04b3a5f3 Fix mercurial complaining about directory already existing
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-05 21:10:35 -06:00
Dan McGee 11f99e0685 Add LOGFILE as a define at compile time for pacman
It has always been a bit odd that logfile had to be specified in the config
file, but no other paths did. Add LOGFILE as a preprocessor definition, and
make a call to alpm_option_set_logfile() to set the default location so no
logfile parameter is necessary in pacman.conf.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-05 21:10:22 -06:00
Chantry Xavier 0686fec839 Remove the newline automatically added by alpm_logaction.
This way, _alpm_logaction behaves like _alpm_log, and gives more control.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-11-04 18:04:43 -06:00
Dan McGee b55abdce7a libalpm: use an lstat wrapper so we never dereference dir symlinks
Linux lstat follows POSIX standards and dereferences a symlink pointing
to a directory if there is a trailing slash. For purposes of libalpm, we
don't want this so make a lstat wrapper that suppresses this behavior.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 18:02:25 -06:00
Dan McGee 99f42d6bd2 libalpm: open the logstream on demand
Don't open a stream to the logfile until necessary. This will allow us
to catch any errors in opening the logfile instead of ignorning them.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 16:38:59 -06:00
Dan McGee 86ca39d15e Clean up usage of extern variables
Instead of declaring the extern variable in every *.c file, include it in
the header file that makes sense. This means handle.h for the handle, and
conf.h for the pacman side config object.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 12:05:22 -06:00
Dan McGee 006387828c Readd scriptlet logging that got lost in an earlier commit
I broke scriptlet logging with ad691001e2.
Readd more or less what was there before, although it still needs a lot of
work including hopefully rewriting it to a new event subsystem and having
it log to a seperate file.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 11:27:41 -06:00
Dan McGee 2e51e28442 vercmp: add some usage instructions
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 11:27:29 -06:00
Dan McGee 8dc8434444 Remove unneeded CXX macros from acinclude.m4
This follows the removal patch previously used for GCC & F77 macros. If we
don't use it, dump it so we can speed up configure time.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 11:13:24 -06:00
Dan McGee 6d42439a3e Add some text at the top of acinclude.m4 so people know what is going on
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 10:45:55 -06:00
Dan McGee c32f00f77c Remove unneeded F77 and GCJ libtool macros from acinclude.m4
We don't use Fortran or Java code in our project, so no need to waste time
looking for this stuff. This gives a noticeable speedup to running the
./configure program as well.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 10:43:01 -06:00
Dan McGee e5be26fb23 Make building of pacman.static optional
Because building of pacman.static fails on some platforms, we should make
it optional. It is enabled by default but can be disabled with the use of
the --disable-pacman-static flag.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 10:42:08 -06:00
Dan McGee c26fe63ee5 Add some more autoconf macros to filter our CFLAGS usage
Hopefully these new autoconf macros, with a little magic, will allow us to
compile with any compiler and still choose the options we have available
to us.

Tested locally with gcc 4.2.2 and gcc 3.4.6; the latter doesn't support two
of the items we previously had hardcoded in our CFLAGS.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 10:42:07 -06:00
Dan McGee 8feccaed78 Use an autoconf macro to see if -fstack-protector is available
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 10:42:07 -06:00
Dan McGee 288dd54982 Revise configure.ac
Do a little cleanup of our configure script. Highlights:

* Remove macros deemed unnecessary to call [1]
* Change check for compiler to look for one that is C99 capable-
  this automatically adds the -std=gnu99 flag

[1] Noted in the autoconf NEWS file, notably entries for 2.59d

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 10:42:07 -06:00
Dan McGee 7ee62ca216 Update libtool files and macros to newest versions
It looks like some of the newer libtool m4 files offer improved support
for the Darwin platform and possibly BSD, so bump our files to these new
versions.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 10:41:44 -06:00
Dan McGee 381690f9b3 Update my TODO 2007-11-04 09:51:23 -06:00
Dan McGee ab91cef655 Add a little const correctness fix to alpm_list
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 09:50:59 -06:00
Dan McGee dea9b3bc0f Fix basename usage in pacman and utilities
basename() is a rather untrusty function call on a lot of platforms as it
does some weird and different things. To solve this, I added a mbasename
fuction to pacman to take its place, and simply removed its usage in the
utilities (it isn't worth dealing with there).

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 09:50:43 -06:00
Roman Kyrylych 4a5e7b6bd1 Add support for arch='any'
Signed-off-by: Roman Kyrylych <roman@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 09:50:04 -06:00
Dan McGee 0ea43089e1 Remove final use of the math library from pacman
To round a value, we don't need floorf- we can just cast to an int.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 09:49:30 -06:00
Jeff Mickey bcb5465b21 Added optdepends support to pactest
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-11-04 09:48:24 -06:00
Dan McGee ccdf29ffa8 abs: prefer csup to cvsup
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-30 08:12:09 -05:00
Dan McGee ac79135b94 Pick best python program available for 'make check'
Use an autoconf macro to find us a python executable, preferring python2.5
if we can find it. From there, fall back to python2.4 and then python.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-30 00:20:18 -05:00
Dan McGee 6aeda5fbff When printing size_t, use %zd
%d was used, which worked for Linux and FreeBSD. Not so for Darwin. The
warning was probably spat out when compiling on x68_64 as well, but no
developers use this architecture as their primary one.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 23:32:58 -05:00
Dan McGee be387148c9 libalpm/handle.c: make realpath() call portable
BSD didn't support the NULL second argument GNU extension, so do it the
old fashioned way.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 23:12:37 -05:00
Dan McGee 6af7dbcf72 pacman/query.c: add missing free()
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 23:11:49 -05:00
Scott Horowitz aea45a8b20 Small updates to documentation.
Signed-off-by: Scott Horowitz <stonecrest@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 22:47:48 -05:00
Dan McGee dede5371e7 Copy pmdelta_t objects in _alpm_pkg_dup()
This was forgotten in the original set of patches.

CC: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 21:06:13 -05:00
Dan McGee 74aa54a1f6 Make general list copy function
Package dup needs to copy all members. Nathan had his implementation, but
I generalized it to this new alpm_list function (and will use it in the
next commit).

CC: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 21:05:04 -05:00
Chantry Xavier 014306eb99 simple pactest renaming : split conflict* into depconflict* and fileconflict*.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 07:15:41 -05:00
Dan McGee c50a7c6026 doxygen: preprocess SYMHIDDEN/SYMEXPORT macros so they don't show in docs
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 07:13:58 -05:00
Dan McGee 6cf8a5137e libalpm/delta: add const to most methods
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 01:28:13 -05:00
Dan McGee cc754bc6e3 libalpm: introduce MALLOC and CALLOC macros
These macros take the place of the common 4 or 5 line blocks of code we had
in most places that called malloc or calloc. This should reduce some code
duplication and make memory allocation more standard in libalpm.

Highlights:
* Note that the MALLOC macro actually uses calloc, this is just for safety
  so that memory is initialized to 0. This can be easily changed in one
  place.
* One malloc call was completely eliminated- it made more sense to do it
  on the stack.
* The use of RET_ERR in public functions (mainly the alpm_*_new functions)
  was standardized, this makes sense so pm_errno is set.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 01:00:52 -05:00
Dan McGee fe3a461703 Add some more debugging output to dep checking code
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-29 00:01:17 -05:00
Dan McGee 671224b64c pactest: generate the filelist the correct way
Actually use python commands to generate the filelist instead of os.system
calls that don't necessarily work everywhere. Noticed when running "make
check" on FreeBSD where the tar program is actually bsdtar.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-28 22:24:11 -05:00
Chantry Xavier 0dc34f496d extend type001 pactest with a symlink.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
2007-10-28 21:18:55 -05:00
Dan McGee 3e3e7a97a6 makepkg: add explicit dir to find calls
Some of the find calls did not have a path, which isn't valid in some
versions of the find utility. Add a . for compatibility.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-28 21:18:39 -05:00
Scott Horowitz 8a9c83dd4b Integrate versionpkg into makepkg
If PKGBUILDs use the correct svn/cvs/etc variables, determine the latest
revision number and force this as the pkgver for building.

Signed-off-by: Scott Horowitz <stonecrest@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-26 22:35:23 -05:00
Dan McGee 3e1b72f4f2 Clean up LDADD usage
We had a lot of unnecessary overstatements of libraries to include on
linking, and autoconf/automake takes care of this for us. This also helps
some compilation issues on other platforms.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-26 20:40:20 -05:00