razor.git
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.

17 years agoDo the same for rpm -i and rpm -U.
Kristian Høgsberg [Mon, 16 Jun 2008 03:15:59 +0000]
Do the same for rpm -i and rpm -U.

17 years agoUse depsolver to verify rpm -e, flush out more options.
Kristian Høgsberg [Mon, 16 Jun 2008 02:33:15 +0000]
Use depsolver to verify rpm -e, flush out more options.

17 years agoWIP patch for seperate files for filelists and package details
James Bowes [Sun, 15 Jun 2008 22:16:20 +0000]
WIP patch for seperate files for filelists and package details

17 years agoUse a seperate string pool for package details
James Bowes [Sun, 15 Jun 2008 15:21:24 +0000]
Use a seperate string pool for package details

17 years agoUse a seperate string pool for files
James Bowes [Sun, 15 Jun 2008 14:50:32 +0000]
Use a seperate string pool for files

17 years agoAdd info command to bash completion
James Bowes [Sun, 15 Jun 2008 14:50:16 +0000]
Add info command to bash completion

18 years agoMake razor_transaction_describe() work and use it in rpm wrapper.
Kristian Høgsberg [Tue, 10 Jun 2008 03:51:52 +0000]
Make razor_transaction_describe() work and use it in rpm wrapper.

18 years agoRemove some debug prints from depsolver.
Kristian Høgsberg [Tue, 10 Jun 2008 02:58:49 +0000]
Remove some debug prints from depsolver.

18 years agoAdd read-only open function for razor_root and support --root in rpm wrapper.
Kristian Høgsberg [Tue, 10 Jun 2008 02:41:37 +0000]
Add read-only open function for razor_root and support --root in rpm wrapper.

18 years agoAdd --initdb support for rpm wrapper.
Kristian Høgsberg [Mon, 9 Jun 2008 20:38:58 +0000]
Add --initdb support for rpm wrapper.

18 years agoMove razor root code to its own file.
Kristian Høgsberg [Mon, 9 Jun 2008 20:14:05 +0000]
Move razor root code to its own file.

18 years agoAdd librazor.a to Makefile to make it clearer what is core razor.
Kristian Høgsberg [Mon, 9 Jun 2008 20:01:34 +0000]
Add librazor.a to Makefile to make it clearer what is core razor.

18 years agoIntroduce struct razor_root.
Kristian Høgsberg [Mon, 9 Jun 2008 19:39:23 +0000]
Introduce struct razor_root.

This object encapsulates the directory layout and locking protocol for
a razor install root.

18 years agoMake yum url overridable by environment variable YUM_URL.
Kristian Høgsberg [Mon, 9 Jun 2008 18:38:58 +0000]
Make yum url overridable by environment variable YUM_URL.

18 years agoRewrite depsolver to use a series of passes over all packages.
Kristian Høgsberg [Mon, 14 Apr 2008 20:56:35 +0000]
Rewrite depsolver to use a series of passes over all packages.

The big change is that we follow one step of the depedency chain for
each package to resolve in each iteration, and repeat until there are
no more possible moves.  In contrast the old depsolver would try to
follow the dependency chain completely for one package at a time.

This new approach is simpler and faster, and at the same time more
roboust. Instead of knowing how one newly installed package may
affect other packages (obsoleting, pulling in new packages etc), the
new algorithm just looks at the total list of requires, provides,
obsoletes and conflicts after installing new packages.

18 years agoAdd url and license package data as well
James Bowes [Sun, 8 Jun 2008 22:29:24 +0000]
Add url and license package data as well

18 years agoImport summary and description into the repo files.
James Bowes [Sun, 8 Jun 2008 21:10:39 +0000]
Import summary and description into the repo files.

Also add a 'info' command for displaying them.

18 years agoClean up some segfaults in the test driver
James Bowes [Sun, 8 Jun 2008 15:56:11 +0000]
Clean up some segfaults in the test driver

18 years agoFactor out --query package selection, share with --verify.
Kristian Høgsberg [Thu, 5 Jun 2008 01:28:26 +0000]
Factor out --query package selection, share with --verify.

18 years agoStart implementing rpm -i.
Kristian Høgsberg [Thu, 5 Jun 2008 01:06:09 +0000]
Start implementing rpm -i.

18 years agoStart implementing erase - still need better depsolver.
Kristian Høgsberg [Thu, 5 Jun 2008 00:53:17 +0000]
Start implementing erase - still need better depsolver.

18 years agoSupport bundling of single letter options.
Kristian Høgsberg [Thu, 5 Jun 2008 00:16:50 +0000]
Support bundling of single letter options.

18 years agoProcess all option structs that match a given arg.
Kristian Høgsberg [Thu, 5 Jun 2008 00:04:57 +0000]
Process all option structs that match a given arg.

This lets us handle options such as -i that have different meanings
depending on what other options are present on the command line.

18 years agoImplement the rpm --package option.
Kristian Høgsberg [Wed, 4 Jun 2008 18:57:14 +0000]
Implement the rpm --package option.

18 years agoFlesh out the rpm -q part of the rpm command line wrapper.
Kristian Høgsberg [Wed, 4 Jun 2008 17:19:54 +0000]
Flesh out the rpm -q part of the rpm command line wrapper.

18 years agoStart rpm commandline compatible wrapper.
Kristian Høgsberg [Tue, 3 Jun 2008 19:20:00 +0000]
Start rpm commandline compatible wrapper.

18 years agoAdd more TODO items.
Kristian Høgsberg [Wed, 30 Apr 2008 22:18:27 +0000]
Add more TODO items.

18 years agoEdit TODO a bit.
Kristian Høgsberg [Thu, 10 Apr 2008 01:28:17 +0000]
Edit TODO a bit.

18 years agoAdd GPLv2 license headers.
Kristian Høgsberg [Thu, 10 Apr 2008 01:14:31 +0000]
Add GPLv2 license headers.

Make it all GPLv2 for now, we may want to break out an LGPLv2 librazor later.

18 years agoUse the cpio headers instead of the rpm headers when unpacking.
Kristian Høgsberg [Wed, 9 Apr 2008 06:41:03 +0000]
Use the cpio headers instead of the rpm headers when unpacking.

The files in the cpio payload doesn't actually follow the file order
in the rpm headers, so we need to decode the cpio header and use the
information there.

18 years agoMake transaction resolve step optional.
Kristian Høgsberg [Wed, 9 Apr 2008 03:53:57 +0000]
Make transaction resolve step optional.

18 years agoDon't add package to transaction more than once.
Kristian Høgsberg [Tue, 8 Apr 2008 04:10:31 +0000]
Don't add package to transaction more than once.

18 years agoMark package to be installed or removed after creating the transaction.
Kristian Høgsberg [Tue, 8 Apr 2008 03:52:14 +0000]
Mark package to be installed or removed after creating the transaction.

This lets us implement support for fnmatch wildcard and do
better error checking.