razor2.git/.git
17 years agoUse CSIDL on MS-Windows platforms instead of FHS paths.
J. Ali Harlow [Fri, 9 Jan 2009 15:28:50 +0000]
Use CSIDL on MS-Windows platforms instead of FHS paths.

17 years agoAvoid use of non-standard %m printf conversion code.
J. Ali Harlow [Fri, 9 Jan 2009 12:32:57 +0000]
Avoid use of non-standard %m printf conversion code.
Also switch to the more conventional ": <error>"
format allowing us to use perror() in more places.

17 years agoProvide a program_name global variable as required by gnulib to
J. Ali Harlow [Thu, 8 Jan 2009 17:50:04 +0000]
Provide a program_name global variable as required by gnulib to
avoid the need for all programs that use librazor to do so.

17 years agoReplace call to random() with the more portable rand() since we
J. Ali Harlow [Thu, 8 Jan 2009 17:36:50 +0000]
Replace call to random() with the more portable rand() since we
don't have any need for a "good" random number generator.

17 years agoUse fsync from gnulib for portability
J. Ali Harlow [Thu, 8 Jan 2009 17:29:31 +0000]
Use fsync from gnulib for portability

17 years agoLink to winsock2 under mingw (needed for ntohl).
J. Ali Harlow [Thu, 8 Jan 2009 17:12:28 +0000]
Link to winsock2 under mingw (needed for ntohl).

17 years agoAdd an early include of config.h as required by gnulib
J. Ali Harlow [Thu, 8 Jan 2009 16:54:05 +0000]
Add an early include of config.h as required by gnulib

17 years agoRemove another unnecessary include of sys/mman.h
J. Ali Harlow [Thu, 8 Jan 2009 15:44:43 +0000]
Remove another unnecessary include of sys/mman.h

17 years agoUse gnulib with the razor binary for portability (for fnmatch in particular).
J. Ali Harlow [Thu, 8 Jan 2009 15:36:35 +0000]
Use gnulib with the razor binary for portability (for fnmatch in particular).

17 years agoRemove unnecessary include of sys/mman.h
J. Ali Harlow [Thu, 8 Jan 2009 15:22:34 +0000]
Remove unnecessary include of sys/mman.h

17 years agoOnly include sys/wait.h on platforms that have it.
J. Ali Harlow [Thu, 8 Jan 2009 15:18:01 +0000]
Only include sys/wait.h on platforms that have it.

17 years agoInclude winsock.h rather than arpa/inet.h on mingw platforms.
J. Ali Harlow [Thu, 8 Jan 2009 15:08:08 +0000]
Include winsock.h rather than arpa/inet.h on mingw platforms.
Also fix a trivial int/long mismatch.

17 years agoDon't attempt to use chroot() on systems that don't support it.
J. Ali Harlow [Thu, 8 Jan 2009 14:35:18 +0000]
Don't attempt to use chroot() on systems that don't support it.

This has the added bonus of allowing us to use popen() rather than
fork()/exec() for improved portability. Of course, the loss of an
install root is a major reduction of functionality but it's hard to
see what else we could substitute for chroot().

17 years agoDon't try and create symbolic links on platforms that don't support symlink()
J. Ali Harlow [Thu, 8 Jan 2009 13:51:07 +0000]
Don't try and create symbolic links on platforms that don't support symlink()

17 years agoSupport platforms where mkdir only takes one argument (eg., MS-Windows)
J. Ali Harlow [Wed, 7 Jan 2009 18:00:06 +0000]
Support platforms where mkdir only takes one argument (eg., MS-Windows)

17 years agoInclude limits.h in files which used PATH_MAX for portability
J. Ali Harlow [Wed, 7 Jan 2009 17:59:12 +0000]
Include limits.h in files which used PATH_MAX for portability

17 years agoAvoid unportable "uint" type
J. Ali Harlow [Wed, 7 Jan 2009 17:26:33 +0000]
Avoid unportable "uint" type

17 years agoAdd support for platforms without fnmatch.
J. Ali Harlow [Wed, 7 Jan 2009 17:17:10 +0000]
Add support for platforms without fnmatch.

This uses gnulib so you will need to have a copy in order
to run autogen.sh (but not to build from a tarball). Either
arrange for gnulib-tool to be in your path or set the
environment variable GNULIB_TOOL to point to its location.

17 years agoSupport platforms without mmap
J. Ali Harlow [Tue, 6 Jan 2009 17:33:37 +0000]
Support platforms without mmap

17 years agoMake curl an optional dependancy
J. Ali Harlow [Tue, 6 Jan 2009 16:00:32 +0000]
Make curl an optional dependancy

17 years agoMake rpmlib an optional dependency
J. Ali Harlow [Tue, 6 Jan 2009 14:06:00 +0000]
Make rpmlib an optional dependency

Use configure --without-rpm to avoid the dependency (default is unchanged).

17 years agoReduce intltool requirements to version 0.35 for compatibility with Centos 5
J. Ali Harlow [Mon, 5 Jan 2009 17:39:05 +0000]
Reduce intltool requirements to version 0.35 for compatibility with Centos 5

17 years agoUse strings to identify section types in the on-disk repo format.
James Bowes [Wed, 9 Jul 2008 12:16:08 +0000]
Use strings to identify section types in the on-disk repo format.

Previously, a given razor file type had a fixed number of sections in a
fixed order, identified by an integer type. Now, sections are identified
by a named string (stored in a string pool after the section lists).

This will allow for razor files to contain arbitrary sections.

For bonus points, also drop the 4k section alignment and change the
magic byte string to "RZDB".

17 years agoConvert main.c to use razor_root for most cases.
Kristian Høgsberg [Wed, 9 Jul 2008 02:57:34 +0000]
Convert main.c to use razor_root for most cases.

With this we change the default repo location to /var/lib/razor, but let the env
variable RAZOR_ROOT override it.

17 years agoChange the install iterator API to what we want.
Kristian Høgsberg [Wed, 9 Jul 2008 02:02:58 +0000]
Change the install iterator API to what we want.

17 years agoAlways open all three rzdb files when we're merging package sets.
Kristian Høgsberg [Wed, 9 Jul 2008 01:59:36 +0000]
Always open all three rzdb files when we're merging package sets.

17 years agoFix old typo in file merging code.
Kristian Høgsberg [Wed, 9 Jul 2008 01:56:48 +0000]
Fix old typo in file merging code.

17 years agoUse the file string pool when merging directories.
Kristian Høgsberg [Wed, 9 Jul 2008 01:55:56 +0000]
Use the file string pool when merging directories.

17 years agoRename a couple more .repo references.
Kristian Høgsberg [Wed, 2 Jul 2008 18:39:44 +0000]
Rename a couple more .repo references.

17 years agoMove DEPSOLVE.txt and REPO.txt into docbook.
Kristian Høgsberg [Wed, 2 Jul 2008 18:35:58 +0000]
Move DEPSOLVE.txt and REPO.txt into docbook.

A little messy, but it's a first step towards pulling all the docs into
a nice self-contained document.

17 years agorename the .repo files to .rzdb files
Richard Hughes [Wed, 2 Jul 2008 17:46:47 +0000]
rename the .repo files to .rzdb files

17 years agoDocument the razor_importer API.
Kristian Høgsberg [Tue, 1 Jul 2008 14:49:48 +0000]
Document the razor_importer API.

17 years agoUpdate docs for the RAZOR_DETAIL_LAST change.
Kristian Høgsberg [Tue, 1 Jul 2008 13:44:46 +0000]
Update docs for the RAZOR_DETAIL_LAST change.

17 years agoconvert the NULL sentinel to RAZOR_DETAIL_LAST
Richard Hughes [Tue, 1 Jul 2008 08:22:25 +0000]
convert the NULL sentinel to RAZOR_DETAIL_LAST

17 years agoGet rid of razor_set_get_package().
Kristian Høgsberg [Mon, 30 Jun 2008 02:38:57 +0000]
Get rid of razor_set_get_package().

This was always a silly little helper function, not general enough for
real world applications.  Use an iterator to search through the set to
find the package of interest.

17 years agoTweak razor search a bit: casefold, print summary, search rawhide instead.
Kristian Høgsberg [Mon, 30 Jun 2008 02:03:13 +0000]
Tweak razor search a bit: casefold, print summary, search rawhide instead.

17 years agothe vararg list must be terminated with zero else 64bit machines may crash
Richard Hughes [Mon, 30 Jun 2008 09:46:20 +0000]
the vararg list must be terminated with zero else 64bit machines may crash

On 64 bit systems, the integer 0 is 32 bits and the pointer 0 is 64 bits.
The upper 32 bits will not be cleared and the loop will never terminate.
Also add the RAZOR_SENTINEL __attribute__ ((__sentinel__(0))) on GCC4
so we catch where we get this wrong automatically.

This also fixes the new search functionality from James which was missed
in the merge.

17 years agotrivial: razor_property_iterator_create() can have package NULL and be valid
Richard Hughes [Mon, 30 Jun 2008 08:47:32 +0000]
trivial: razor_property_iterator_create() can have package NULL and be valid

17 years agoconvert razor_package_get_details() and razor_package_iterator_next() to varargs
Richard Hughes [Mon, 30 Jun 2008 07:51:26 +0000]
convert razor_package_get_details() and razor_package_iterator_next() to varargs

The functions for getting package details about a package were limited to a few
things, when in the future we will want to support much more about a package.
The iterator was also limited to name,version,arch when most of the time we
didn't need all this data.

17 years agoprotect all exported functions by checking the input parameters for NULL input
Richard Hughes [Sun, 29 Jun 2008 16:32:19 +0000]
protect all exported functions by checking the input parameters for NULL input

17 years agoadd missing licencing information at the top of each source file
Richard Hughes [Sun, 29 Jun 2008 09:55:17 +0000]
add missing licencing information at the top of each source file

The licence text is needed when razor is packaged for Debian. :-)

17 years agoRemove a couple of done TODO items.
Kristian Høgsberg [Sun, 29 Jun 2008 00:34:29 +0000]
Remove a couple of done TODO items.

17 years agoMerge commit 'fdo/master'
Kristian Høgsberg [Sat, 28 Jun 2008 23:22:55 +0000]
Merge commit 'fdo/master'

17 years agoRevert "Get api docs building"
Kristian Høgsberg [Sat, 28 Jun 2008 22:27:55 +0000]
Revert "Get api docs building"

Pass --enable-gtk-doc to ./configure to build API docs.  Add a
status print-out at the end of configure.ac to show whether gtk-doc
was enabled.

This reverts commit 436386fb11ee56e50c2c76c496b1f6c39530e170.

17 years agoAdd more gtk-doc artifacts to gitignore
James Bowes [Fri, 27 Jun 2008 00:49:11 +0000]
Add more gtk-doc artifacts to gitignore

17 years agoAdd 'search' command
James Bowes [Thu, 26 Jun 2008 23:11:36 +0000]
Add 'search' command

17 years agoSave the details and files repo files when importing a dir of rpms
James Bowes [Thu, 26 Jun 2008 22:41:55 +0000]
Save the details and files repo files when importing a dir of rpms

17 years agoAdd import-rpms to bash-completion
James Bowes [Thu, 26 Jun 2008 22:39:37 +0000]
Add import-rpms to bash-completion

17 years agoget rpm -qpi working fully
James Bowes [Thu, 26 Jun 2008 22:15:59 +0000]
get rpm -qpi working fully

17 years agoAdd return codes to razor_set_open_files and open_details
James Bowes [Thu, 26 Jun 2008 21:16:13 +0000]
Add return codes to razor_set_open_files and open_details

17 years agoGet api docs building
James Bowes [Thu, 26 Jun 2008 14:37:45 +0000]
Get api docs building

17 years agoAdd missing newline for conflicts output
James Bowes [Thu, 26 Jun 2008 13:21:14 +0000]
Add missing newline for conflicts output

17 years agoinclude stdint.h in razor.h to fix an error
Richard Hughes [Thu, 26 Jun 2008 06:17:48 +0000]
include stdint.h in razor.h to fix an error

This fixes the error: /usr/include/razor/razor.h:161: error: expected declaration specifiers or '...' before 'uint32_t'

17 years agoUpdate gitignore files for docs and test-driver
James Bowes [Thu, 26 Jun 2008 01:11:33 +0000]
Update gitignore files for docs and test-driver

17 years agoGet the test driver compiling and running again (but not passing).
James Bowes [Thu, 26 Jun 2008 00:53:48 +0000]
Get the test driver compiling and running again (but not passing).

17 years agoAllow NULL pointers in razor_package_get_details().
Richard Hughes [Wed, 25 Jun 2008 19:31:50 +0000]
Allow NULL pointers in razor_package_get_details().

17 years agoFix pkg-config file problems.
Kristian Høgsberg [Wed, 25 Jun 2008 19:29:49 +0000]
Fix pkg-config file problems.

It's libcurl, and expat doesn't have a pkg-config file.

17 years agoAlso don't explode when a given path doesn't exist.
Kristian Høgsberg [Wed, 25 Jun 2008 15:48:46 +0000]
Also don't explode when a given path doesn't exist.

17 years agoDon't explode when listing files.
Richard Hughes [Wed, 25 Jun 2008 15:44:54 +0000]
Don't explode when listing files.

17 years agoFactor out package selection and listing in main.c.
Kristian Høgsberg [Wed, 25 Jun 2008 15:24:55 +0000]
Factor out package selection and listing in main.c.

17 years agoError out if package isn't found instead of listing all properties.
Richard Hughes [Wed, 25 Jun 2008 15:00:25 +0000]
Error out if package isn't found instead of listing all properties.

17 years agoFor rpm --query, --requires is also -R
James Bowes [Tue, 24 Jun 2008 01:38:33 +0000]
For rpm --query, --requires is also -R

17 years agoCreate an empty package iterator when we don't know about the given file.
James Bowes [Tue, 24 Jun 2008 01:20:16 +0000]
Create an empty package iterator when we don't know about the given file.

This is an easy way to stop segfaults when trying to destroy iterators for
unknown files.

17 years agoImplement rpm --query --file
James Bowes [Tue, 24 Jun 2008 00:48:48 +0000]
Implement rpm --query --file

17 years agoDisplay razor version number for rpm --version
James Bowes [Tue, 24 Jun 2008 00:20:08 +0000]
Display razor version number for rpm --version

17 years agoImplement rpm --query --list
James Bowes [Tue, 24 Jun 2008 00:09:56 +0000]
Implement rpm --query --list

17 years agoMake file listing (either per-repo or per-package) use the correct string pool
James Bowes [Mon, 23 Jun 2008 23:58:13 +0000]
Make file listing (either per-repo or per-package) use the correct string pool

17 years agoSave all 3 repo files on razor_root_create
James Bowes [Mon, 23 Jun 2008 23:43:52 +0000]
Save all 3 repo files on razor_root_create

17 years agoFix configure.ac version, remove /usr/bin/rpm workaround from spec file.
Richard Hughes [Mon, 23 Jun 2008 21:41:10 +0000]
Fix configure.ac version, remove /usr/bin/rpm workaround from spec file.

17 years agoNuke ARRAY_SIZE and obsolete razor_set_list_unsatisfied from razor.h.
Kristian Høgsberg [Mon, 23 Jun 2008 21:31:32 +0000]
Nuke ARRAY_SIZE and obsolete razor_set_list_unsatisfied from razor.h.

17 years agoMove a couple of unrelated functions out of transaction.c.
Kristian Høgsberg [Mon, 23 Jun 2008 21:21:03 +0000]
Move a couple of unrelated functions out of transaction.c.

17 years agoUse GCC 4 -fvisibility to control exported symbols.
Kristian Høgsberg [Mon, 23 Jun 2008 21:19:20 +0000]
Use GCC 4 -fvisibility to control exported symbols.

17 years agoMerge commit 'krh/master'
James Bowes [Mon, 23 Jun 2008 18:52:39 +0000]
Merge commit 'krh/master'

17 years agoActually store the files strings in the files string pool
James Bowes [Mon, 23 Jun 2008 18:51:56 +0000]
Actually store the files strings in the files string pool

17 years agoCompare the right index against pq->count.
Kristian Høgsberg [Mon, 23 Jun 2008 18:43:08 +0000]
Compare the right index against pq->count.

Fix a little logic error there.

17 years agoAdd some support for --info.
Kristian Høgsberg [Mon, 23 Jun 2008 18:34:47 +0000]
Add some support for --info.

17 years agoDon't install /usr/bin/rpm just yet...
Kristian Høgsberg [Mon, 23 Jun 2008 18:07:07 +0000]
Don't install /usr/bin/rpm just yet...

17 years agoDisplay progress when importing rpms
James Bowes [Mon, 23 Jun 2008 15:28:00 +0000]
Display progress when importing rpms

17 years agoSet up gtkdoc for razor.
Kristian Høgsberg [Mon, 23 Jun 2008 17:48:18 +0000]
Set up gtkdoc for razor.

Despite its name, gtkdoc doesn't require gtk+ and is a nice way to
generate DocBook format API documentation.

17 years agoRename bash completion script to razor.sh
Richard Hughes [Mon, 23 Jun 2008 14:31:04 +0000]
Rename bash completion script to razor.sh

More suitable for installation into /etc/bash_completion.d.

17 years agoDon't assume razor is being run locally in bash-completion.
Richard Hughes [Sun, 22 Jun 2008 15:01:51 +0000]
Don't assume razor is being run locally in bash-completion.

Breaks when installed system wide.

17 years agoMerge commit 'jbowes/master'
Kristian Høgsberg [Mon, 23 Jun 2008 13:59:08 +0000]
Merge commit 'jbowes/master'

17 years agoWhen uniquifying properties, also sort them on the owning package.
Kristian Høgsberg [Sat, 21 Jun 2008 03:13:09 +0000]
When uniquifying properties, also sort them on the owning package.

This ensures that whenever two packages provide or (or require, obsolete
or conflict) the same property, they appear in the same order in the
propertys list of packages.

17 years agoCall exit() instead of just returning if child fails.
Kristian Høgsberg [Sat, 21 Jun 2008 02:27:07 +0000]
Call exit() instead of just returning if child fails.

17 years agoReturn if we fail to open root.
Kristian Høgsberg [Sat, 21 Jun 2008 02:26:41 +0000]
Return if we fail to open root.

17 years agoIntroduce install/remove iterators.
Kristian Høgsberg [Sat, 21 Jun 2008 01:56:43 +0000]
Introduce install/remove iterators.

These iterator constructors lets you pass in two sets and creates
an iterator for the packages to remove or the packages to install.
The iterators will step through the packages in a sequence that respects
the pre, post, preun and postun modifiers.

Right now, the install order isn't actually implemented, this patch just
implements the API changes and updates the applications.

17 years agoFix the razor_set_diff() callback prototype.
Kristian Høgsberg [Sat, 21 Jun 2008 01:38:29 +0000]
Fix the razor_set_diff() callback prototype.

The old proto type didn't let us pass the razor_package.

17 years agocommand_update: check the right return code to see if transaction failed.
Kristian Høgsberg [Sat, 21 Jun 2008 01:33:29 +0000]
command_update: check the right return code to see if transaction failed.

17 years agoFix package queries for empty sets.
Kristian Høgsberg [Sat, 21 Jun 2008 00:57:51 +0000]
Fix package queries for empty sets.

17 years agoMerge branch 'krh/master'
James Bowes [Fri, 20 Jun 2008 23:04:06 +0000]
Merge branch 'krh/master'

Conflicts:

librazor/razor.h
librazor/rpm.c
razor.c
src/main.c

17 years agoAdd getter to return system set for a razor_root.
Kristian Høgsberg [Fri, 20 Jun 2008 22:26:46 +0000]
Add getter to return system set for a razor_root.

17 years agoRename razor_importer_new to _create to follow convention.
Kristian Høgsberg [Fri, 20 Jun 2008 20:48:44 +0000]
Rename razor_importer_new to _create to follow convention.

17 years agoBreak up the monolithic razor.c.
Kristian Høgsberg [Fri, 20 Jun 2008 19:10:34 +0000]
Break up the monolithic razor.c.

17 years agoRecord the time of dependencies (post, pre, postun, preun).
Kristian Høgsberg [Fri, 20 Jun 2008 18:18:52 +0000]
Record the time of dependencies (post, pre, postun, preun).

17 years agoHandle NULL dirnames when importing rpms into a set.
Kristian Høgsberg [Thu, 19 Jun 2008 19:09:48 +0000]
Handle NULL dirnames when importing rpms into a set.

17 years agoMake razor install work again after the razor_root changes.
Kristian Høgsberg [Thu, 19 Jun 2008 04:32:24 +0000]
Make razor install work again after the razor_root changes.

17 years agoDon't fail to update if there is not older package found.
Kristian Høgsberg [Tue, 17 Jun 2008 02:35:09 +0000]
Don't fail to update if there is not older package found.

17 years agoFix a typo when creating the root path.
Kristian Høgsberg [Tue, 17 Jun 2008 02:28:51 +0000]
Fix a typo when creating the root path.

17 years agoAdd spec file.
Richard Hughes [Mon, 16 Jun 2008 21:54:29 +0000]
Add spec file.

17 years agoAutoconfify razor.
Richard Hughes [Mon, 16 Jun 2008 18:43:03 +0000]
Autoconfify razor.