Commit Graph

1581 Commits

Author SHA1 Message Date
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
Dan McGee a8731ff2f7 Fix mcheck detection and usage
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-26 20:31:25 -05:00
Dan McGee b38e046621 Explicitly cast void* to char* during printf call
If we don't have an explicit cast, make fails during -Wall -Werror.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-26 19:09:21 -05:00
Nagy Gabor 17f99a0f00 dependency error message fix in libalpm/remove.c
Normally you must never see that error message.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-26 19:05:42 -05:00
Nagy Gabor d903fc607e Dependency error/log messages fix
The old code used only the depend.name in messages, which might have not
been informative. The new code uses the whole dependency string in
%DEPENDS% format.

(Dan: slight English clarification in one of the messages)
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-26 18:54:21 -05:00
Dan McGee b609cb0a5d makepkg: readd -p option that was lost in getopt conversion
The -p option was accidentally dropped in commit
54b71f0427. Readd it.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-26 18:36:58 -05:00
Nagy Gabor 0cff7c6bdf Add alpm_dep_get_string method
Public alpm_dep_get_string function is introduced, which converts a
pmdepend_t structure to printable string in %DEPENDS% format.  This
function is now used in pacman to print dependency error messages.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-25 07:10:08 -05:00
Nagy Gabor 89ac8aa9c4 _alpm_depmiss_isin fix
The old code used memcmp, which is not good for comparing strings:
"pkgname"'\0''\0' should be equal to "pkgname"'\0''a' for example.
The new code uses strcmp.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-24 16:51:12 -05:00
Dan McGee 581769b72d Add strndup implemention for environments that are missing it
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-24 00:37:50 -05:00
Dan McGee aa545f6798 One more added include to help compilation elsewhere
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-23 23:27:03 -05:00
Dan McGee 616668fb71 Replace UK mirror with a new updated one
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-23 19:24:39 -05:00
Dan McGee bd15c23e16 Print and typecast time_t correctly
The recommended C99 way to print the value of a time_t is to cast it to
uintmax_t or intmax_t. Do this to ensure compatability with all platforms.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-23 00:35:42 -05:00
Dan McGee 8b1fb61df2 Ensure all localization stuff is correctly guarded
Anything dealing with libintl and localization should be correctly guarded
inside an ENABLE_NLS block on both the pacman and libalpm sides.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-22 23:52:55 -05:00
Dan McGee 0c4f7d821c Fix broken or missing includes
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-22 23:37:38 -05:00
Dan McGee 46eaa5c542 Fix invalid static scoping of strverscmp
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-22 23:36:03 -05:00
Nathan Jones f5b77eb989 Add download size to target list.
This displays the download size, taking into account delta files and
cached files.

This closes FS#4182.

Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-19 19:30:06 -05:00
Nathan Jones e472e80c08 Download delta files if UseDelta is set.
Delta files will be used if the size is smaller than a percent
(MAX_DELTA_RATIO) of the package size.

Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-19 19:29:17 -05:00
Nathan Jones 520db578da Refactor md5sum checking.
This will allow deltas and packages to share the md5sum checking code.

Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-19 19:24:24 -05:00
Nathan Jones 0c2cc108d3 Add pmdelta_t structure and functions to libalpm.
Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-19 19:21:44 -05:00
Nathan Jones 1118e00fe9 Add delta information to the repository database.
(Dan: cleaned up one if statement)

Signed-off-by: Nathan Jones <nathanj@insightbb.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-19 19:20:16 -05:00
Dan McGee b8dba7a6fa Add Hungarian mirror
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-18 19:32:30 -05:00
Andrew Fyfe 12e1346252 scripts/makepkg.sh.in: Strip bins/libs in all {bin, sbin, lib} directories.
In one of the original clean up patches[1] I changed the search path
for stripping binaries and libraries. This resulted in only
usr/{bin,sbin,lib} being searched. This patch reverts that change.

[1] 721ceee1e2

Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
2007-10-18 19:28:02 -05:00
Chantry Xavier 0ff02995f1 libalpm/package.c : fix requiredby with multiple providers.
The code didn't match the following comment :
"A depends on B through n depends <=> A listed in B's requiredby n times"

It stopped at n=1 with a break.

I was surprised to see this case happens in real, that's how I noticed the
bug: wine depends on both freeglut and glut, while freeglut provides glut.

So when installing wine, the update_depends function listed wine twice in
freeglut's requiredby.  But the compute_requiredby function (used when
installing freeglut, and used by testdb) listed wine only once in
freeglut's requiredby.  That made testdb unhappy.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-18 12:32:10 -05:00
Dan McGee 619bf56e66 Remove rounding on package size totals
We print the total to two decimal places, so there is no real need for
rounding of the values. Remove the rounding and switch all output to two
decimal places.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-16 08:41:37 -05:00
Dan McGee 128b288ca7 Fix scriptlet pactest cases so they 'succeed' again
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-10-14 18:52:17 -05:00