Commit Graph

24 Commits

Author SHA1 Message Date
Dave Reisner d6ccd44390 include config.h via Makefiles
Ensures that config.h is always ordered correctly (first) in the
includes. Also means that new source files get this for free without
having to remember to add it.

We opt for -imacros over -include as its more portable, and the
added constraint by -imacros doesn't bother us for config.h.

This also touches the HACKING file to remove the explicit mention of
config.h as part of the includes.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-12-21 18:13:17 -06:00
Dave Reisner d98ff04cc9 src/util: link vercmp against .lo, not the .o
This seems to fix FS#26652.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-11-01 10:25:15 -05:00
Dave Reisner b283a1e065 src/util/Makefile.am: alphabetize targets
Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-08 16:49:49 -05:00
Dave Reisner 0b57da2a43 pacsort: add new utility
pacsort is a command line sorting utility that implements libalpm's
alpm_pkg_vercmp algorithm.

Signed-off-by: Dave Reisner <dreisner@archlinux.org>
Signed-off-by: Dan McGee <dan@archlinux.org>
2011-08-08 16:49:43 -05:00
Dave Reisner 7c06e66c24 pactree: rewrite in C
Use the bash script in contrib as the basis for a C rewrite using
libalpm. The speedup can go from dozens of seconds to less than one
second.

Colorized output is preserved.

The --graph option generates output that graphviz's `dot' utility will
understand to draw us a graph. Output is written to stdout and it is
left up to the user to pipe the data and determine the output
characteristics.

Signed-off-by: Dave Reisner <d@falconindy.com>
Signed-off-by: Xavier Chantry <chantry.xavier@gmail.com>
2010-12-12 20:21:15 -06:00
Dan McGee eb6af031ec Build vercmp without needing link to libalpm
Include the object file directly from the libalpm version comparison code as
it is the only thing we need. This drops the dependency of vercmp on
libalpm and all of the stuff we know it drags in.

Signed-off-by: Dan McGee <dan@archlinux.org>
2010-05-04 23:42:01 -05:00
Xavier Chantry 087be2f1fb delta : add external cleanup script
Signed-off-by: Xavier Chantry <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2010-03-14 18:34:42 -05:00
Chantry Xavier 046c8a6819 Remove the DB consistency check from pacman and libalpm.
This reverts commit dfc85cb5f5
and b6f3fe6957.
This DB check is already in testdb (among others).

Also testdb now uses the db path set at make time by default,
so specifying the db path is optional.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-16 20:10:18 -05:00
Chantry Xavier 71a4511d0f Add testdb util for finding inconsistencies in the database.
Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-09-11 21:11:42 -05:00
Dan McGee f4dbb204f1 src/util: Clean up headers and a few fixes
Remove some unnecessary headers in the two utilities as well as fix
a possible non-null termination issue in vercmp.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-08-15 20:16:46 -04:00
Andrew Fyfe e0afe6e94a Autotool clean up.
* Add vim modeline to Makefile.am and configure.ac
	* Fix white space in Makefile.am and configure.ac
	* Add contrib/wget-xdelta.sh to EXTRA_DIST in Makefile.am

Signed-off-by: Andrew Fyfe <andrew@neptune-one.net>
Signed-off-by: Dan McGee <dan@archlinux.org>
2007-06-04 22:24:29 -04:00
Dan McGee 7bbcaaaae9 Add -pedantic flag to pacman (frontend) CFLAGS
Now that we got rid of the ERR and WARN macros, compilation with
-pedantic turned on works with only minor changes.

Signed-off-by: Dan McGee <dan@archlinux.org>
2007-04-26 16:59:38 -04:00
Dan McGee ba1806f5ac * Removed ${CFLAGS} from Makefile.am(s) as it was causing all CFLAGS to be
duplicated.
* Updated the util Makefile.am to link with the proper libalpm.la.
* Fixed bitmasking issues in be_files.c and db.h.
* Rankmirrors updates from James Rosten (with some cleaning up of my own).
  KeyboardInterrupts are now handled gracefully.
2007-03-12 03:02:57 +00:00
Aaron Griffin a7d7c96357 * handle changes: callbacks should check handle first, as there's a few
occasions where some alpm stuff could be used without initializing the
  library (vercmp is one).  TODO make these functions (handle accessors)
  better by returning "library not initialized" instead of failing.
* Removed NoUpgrade lines from pacman.conf - we need to test this!
* Re-corrected the lib targets for src/util/*
* make dist seems to have updated the po files
2007-03-04 06:28:48 +00:00
Aaron Griffin 549ca632ef * libtool fixes for building against the right libs 2007-03-04 05:50:58 +00:00
Dan McGee 3595201f5f * A lot of Makefile.am updates to try to get 'make dist' and 'make distcheck'
to work as expected.
2007-02-22 04:36:02 +00:00
Aaron Griffin 9803ec3066 Added 'testpkg' binary to test for validity of a package:
testpkg <package file>, returns 0 on success, 1 on failure
  failure will also output error messages to stdout
2007-02-12 01:30:02 +00:00
Jürgen Hötzel 13f9fc4d19 * Fix building outside $(srcdir).
* Removed ./gen-mirrorlist.sh invocation from configure script:
  Mirror-files are generated by make, not configure.
2007-01-29 22:18:31 +00:00
Aaron Griffin 07b0092736 -std=c99 seems to undefine PATH_MAX in this case. I don't care enough to fix it
at the moment, so this workaround works.
2006-11-23 02:36:26 +00:00
Aaron Griffin 8da03650b0 * Whoops util Makefile
* Slight modification to depcmp debug output
2006-11-22 20:03:52 +00:00
Aaron Griffin 986409f9bd * Completed getinfo api changes (pmmissing_t, pmtrans_t, etc)
* Modified some dependancy checking
* Changed "performing local database upgrade" message to be more clear
* Change 'usize' to 'isize' in database files
* Scriptlet output is now sent to pacman's log file
* Limited some debugging output to be more clear
2006-11-22 09:03:41 +00:00
Aaron Griffin 29fef7b97b Whoops, actually remove convertdb this time 2006-10-15 22:28:16 +00:00
Aaron Griffin 6f46645e77 Removed convertdb 2006-10-15 22:25:42 +00:00
Judd Vinet a1526a3e7d added first part of the autoconf stuff - patch from Christian Hamar <krics@linuxforum.hu> 2005-10-17 18:52:43 +00:00