razor.git
18 years agodescription of the repo file format / struct razor_set
Dan Winship [Fri, 14 Mar 2008 19:32:24 +0000]
description of the repo file format / struct razor_set

18 years agoremove some done things
Dan Winship [Fri, 14 Mar 2008 17:37:06 +0000]
remove some done things

18 years agospell out the depsolving rules explicitly, separate from the algorithm
Dan Winship [Fri, 14 Mar 2008 14:18:58 +0000]
spell out the depsolving rules explicitly, separate from the algorithm

18 years agoMerge branch 'master' of git://people.freedesktop.org/~krh/razor
Dan Winship [Thu, 13 Mar 2008 12:29:05 +0000]
Merge branch 'master' of git://people.freedesktop.org/~krh/razor

18 years agoinstall: Handle the case where a directory already exists.
Kristian Høgsberg [Wed, 12 Mar 2008 21:00:10 +0000]
install: Handle the case where a directory already exists.

18 years agoadd more background to DEPSOLVE.txt
Dan Winship [Wed, 12 Mar 2008 20:41:34 +0000]
add more background to DEPSOLVE.txt

18 years ago64-bit fixes
Dan Winship [Wed, 12 Mar 2008 20:40:50 +0000]
64-bit fixes

18 years agoinstall: Initialize package array correctly.
Kristian Høgsberg [Wed, 12 Mar 2008 20:37:54 +0000]
install: Initialize package array correctly.

18 years agoFix importing flags from RPM file.
Kristian Høgsberg [Wed, 12 Mar 2008 20:26:26 +0000]
Fix importing flags from RPM file.

18 years agoWrite out the new repo on install.
Kristian Høgsberg [Wed, 12 Mar 2008 19:38:56 +0000]
Write out the new repo on install.

We write the repo to a lock file repo, and once the RPMs are installed
we rename() the lock repo back in place.

18 years ago"requires x > n" matches "provides x", but "obsoletes x < n" doesn't
Dan Winship [Wed, 12 Mar 2008 17:27:26 +0000]
"requires x > n" matches "provides x", but "obsoletes x < n" doesn't

18 years agofix up transaction descriptions a little more
Dan Winship [Wed, 12 Mar 2008 15:53:10 +0000]
fix up transaction descriptions a little more

18 years agoupdate to match latest DEPSOLVE.txt changes; find updates of obsoleted packages
Dan Winship [Wed, 12 Mar 2008 15:46:53 +0000]
update to match latest DEPSOLVE.txt changes; find updates of obsoleted packages

18 years agomove the initialization of the root entry name to razor_set_create
Dan Winship [Tue, 11 Mar 2008 22:12:02 +0000]
move the initialization of the root entry name to razor_set_create

18 years agodeal with a single package being the target of both a FORCED_UPDATE and an INSTALL
Dan Winship [Tue, 11 Mar 2008 22:08:12 +0000]
deal with a single package being the target of both a FORCED_UPDATE and an INSTALL

18 years agofix req_package in one case
Dan Winship [Tue, 11 Mar 2008 21:49:00 +0000]
fix req_package in one case

18 years agoFix file tree merging (broken since 7b26d6b3)
Dan Winship [Tue, 11 Mar 2008 21:15:02 +0000]
Fix file tree merging (broken since 7b26d6b3)

18 years agofix generated provides of files provided by more than one package
Dan Winship [Tue, 11 Mar 2008 20:48:20 +0000]
fix generated provides of files provided by more than one package

(uniqueify_properties() assumes that each property only belongs to a
single package, so our previous strategy of generating a single property
with an indirect package list wouldn't work.)

18 years agofix the types of fields in razor_property for easier debugging
Dan Winship [Tue, 11 Mar 2008 19:45:53 +0000]
fix the types of fields in razor_property for easier debugging

also fix a case in razor_transaction_describe

18 years agoupdate to deal with obsoletes better
Dan Winship [Tue, 11 Mar 2008 15:44:51 +0000]
update to deal with obsoletes better

when looking for a package "foo" to install/update, we have to look
not just for a package named "foo", but also any package that
obsoletes+provides "foo".

So redo the algorithm to satisfy *all* installs/removes from the
property list, so now we don't need to walk the package list at all.

18 years agoupdate to match DEPSOLVE.txt
Dan Winship [Tue, 11 Mar 2008 15:43:54 +0000]
update to match DEPSOLVE.txt

unfortunately not quite right; it can't figure out that "git-core" updates
to "git"

18 years agowhen importing, create fake file PROVIDES to match file REQUIRES
Dan Winship [Mon, 10 Mar 2008 18:12:31 +0000]
when importing, create fake file PROVIDES to match file REQUIRES

18 years agoupdate DEPSOLVE.txt after talking with Kristian
Dan Winship [Mon, 10 Mar 2008 15:30:00 +0000]
update DEPSOLVE.txt after talking with Kristian

In particular, we're going to do the fake PROVIDES for files thing now.

18 years agodepsolving plan
Dan Winship [Fri, 7 Mar 2008 20:38:31 +0000]
depsolving plan

18 years agoFix both sides of provide/conflict handling to work the same way
Dan Winship [Fri, 7 Mar 2008 18:45:37 +0000]
Fix both sides of provide/conflict handling to work the same way

thus fixing conflicts-on-properties-rather-than-names, thus fixing the
last remaining unpassed test

18 years agokill warning
Dan Winship [Fri, 7 Mar 2008 18:44:22 +0000]
kill warning

18 years agoanother checkpoint...
Dan Winship [Fri, 7 Mar 2008 13:52:09 +0000]
another checkpoint...

there are a bunch of problems with doing things this way, and file
provide removals are currently unhandled

18 years agofix version parsing to not sometimes use octal :)
Dan Winship [Fri, 7 Mar 2008 13:24:09 +0000]
fix version parsing to not sometimes use octal :)

18 years agoUse the razor transaction logic when installing rpms.
Kristian Høgsberg [Thu, 6 Mar 2008 05:54:13 +0000]
Use the razor transaction logic when installing rpms.

18 years agoSplit install root creation out into command_init().
Kristian Høgsberg [Thu, 6 Mar 2008 05:28:25 +0000]
Split install root creation out into command_init().

18 years agoInitalize empty package sets with a proper empty file list.
Kristian Høgsberg [Thu, 6 Mar 2008 06:30:55 +0000]
Initalize empty package sets with a proper empty file list.

18 years agoFix bug in razor_create_dir() path component loop.
Kristian Høgsberg [Thu, 6 Mar 2008 05:27:43 +0000]
Fix bug in razor_create_dir() path component loop.

18 years agoFix epoch in rpm and rpmdb importer: epoch is an integer tag.
Kristian Høgsberg [Thu, 6 Mar 2008 04:49:05 +0000]
Fix epoch in rpm and rpmdb importer: epoch is an integer tag.

18 years agokeep track of both the install and the remove on an update
Dan Winship [Thu, 6 Mar 2008 00:02:29 +0000]
keep track of both the install and the remove on an update

razor_transaction_satisfy_removes() is now quite broken, as it thinks
it should remove a package if a package it depends on was updated.

18 years agomove razor_set_diff so it's not in the middle of the transaction code
Dan Winship [Thu, 6 Mar 2008 00:01:51 +0000]
move razor_set_diff so it's not in the middle of the transaction code

18 years agoclean up packages states some
Dan Winship [Wed, 5 Mar 2008 15:46:40 +0000]
clean up packages states some

18 years agocheckpoint, misc rewritage
Dan Winship [Wed, 5 Mar 2008 00:07:14 +0000]
checkpoint, misc rewritage

18 years agoFix version handling (particularly wrt epoch) on import
Dan Winship [Tue, 4 Mar 2008 15:55:01 +0000]
Fix version handling (particularly wrt epoch) on import

18 years agounduplicate file-finding code
Dan Winship [Mon, 3 Mar 2008 21:19:56 +0000]
unduplicate file-finding code

18 years agoadd struct razor_transaction_resolver to reduce redundant procedure args
Dan Winship [Mon, 3 Mar 2008 21:05:33 +0000]
add struct razor_transaction_resolver to reduce redundant procedure args

18 years agoredo some of the transaction code, get conflicts and obsoletes partly working
Dan Winship [Mon, 3 Mar 2008 19:55:16 +0000]
redo some of the transaction code, get conflicts and obsoletes partly working

now uses a bit array of to-be-installed/removed packages and uses that to
avoid needing to do either per-property searches or repeated merges. but it
really needs to have a bit array of properties too probably

checkpoint before starting on simplifying/cleaning up the existing
transaction code

18 years agoadd somewhat inefficient file dep removal code
Dan Winship [Fri, 29 Feb 2008 20:09:44 +0000]
add somewhat inefficient file dep removal code

(fwiw, the comment on the previous commit was incorrect)

18 years agoimplement file dependencies for installs
Dan Winship [Fri, 29 Feb 2008 17:45:08 +0000]
implement file dependencies for installs

removes are trickier because there are no backlinks from the files array
the properties array, so there's currently no way to efficiently determine
what packages are affected by the removal of a particular file

18 years agoRedo updates and removes in terms of a single razor_transaction abstraction
Dan Winship [Fri, 29 Feb 2008 16:53:15 +0000]
Redo updates and removes in terms of a single razor_transaction abstraction

Also does versioned depsolving at least partially.
Update main.c and test-driver.c for that, and fix some unrelated test-driver
bugs.

Now gets up to testUpdateSinglePackageObsoletesOldRequirement, although
it really should not be passing the multilib tests; apparently they aren't
clever enough in their testing of the depsolving algorithm and are allowing
it to come up with the right answer for the wrong reason.

18 years agouse -Wmissing-prototypes to help find dead code
Dan Winship [Fri, 29 Feb 2008 16:51:58 +0000]
use -Wmissing-prototypes to help find dead code

(by forcing us to declare functions static, allowing gcc to tell us
"warning: foo defined by not used")

18 years agofix
Dan Winship [Fri, 29 Feb 2008 16:46:37 +0000]
fix

18 years agoredo razor_set_update to only rebuild the set once
Dan Winship [Tue, 26 Feb 2008 21:39:01 +0000]
redo razor_set_update to only rebuild the set once

messy, and with too much duplicated code...

18 years agofix one of the tests to match the probably mistaken python version, and
Dan Winship [Tue, 26 Feb 2008 18:47:31 +0000]
fix one of the tests to match the probably mistaken python version, and
add two more comments pointing out oddities in the python tests

18 years agoMerge branch 'master' of git+ssh://people.freedesktop.org/~danw/razor
Dan Winship [Fri, 22 Feb 2008 17:53:07 +0000]
Merge branch 'master' of git+ssh://people.freedesktop.org/~danw/razor

Conflicts:

razor.c

18 years agoredo razor_set_remove() to only do a single merge
Dan Winship [Fri, 22 Feb 2008 17:49:13 +0000]
redo razor_set_remove() to only do a single merge

18 years agomake razor_set_update not loop forever on unsatisfiable dependencies
Dan Winship [Thu, 21 Feb 2008 19:58:39 +0000]
make razor_set_update not loop forever on unsatisfiable dependencies

this is mostly a dead-end, as to get the next test working i need to
rewrite the code as suggested in the comment above razor_set_revalidate

18 years agoAdd support for removing packages
Dan Winship [Thu, 21 Feb 2008 17:09:13 +0000]
Add support for removing packages

Should be redone to avoid rebuilding the set multiple times

First two tests pass now

18 years agofix rebuild_property_package_lists to put the lists in the right pool
Dan Winship [Wed, 20 Feb 2008 21:54:03 +0000]
fix rebuild_property_package_lists to put the lists in the right pool

(likewise rebuild_file_package_lists, which was copied from it)

18 years agoMerge file lists when updating
Dan Winship [Wed, 20 Feb 2008 18:34:55 +0000]
Merge file lists when updating

Currently a bit of a mess due to repeated rewriting. To be cleaned up
after we decide whether or not to keep the current file layout

18 years agoFix file importing code to not generate some duplicate directories
Dan Winship [Wed, 20 Feb 2008 17:37:37 +0000]
Fix file importing code to not generate some duplicate directories

build_file_tree() depends on the fact that the contents of a directory
are sorted immediately after it in the file list, but '.' sorts before '/'
lexicographically, so you'd actually end up with, eg:

    /etc/yum
    /etc/yum.conf
    /etc/yum/pluginconf.d

which would cause a second entry for /etc/yum to be added to the file
list.

For now I've fixed this by make compare_filenames() do a special strcmp
by hand, manually sorting '/' before anything else.

18 years agoredo test framework, with tests taken from yum sources
Dan Winship [Fri, 15 Feb 2008 20:09:37 +0000]
redo test framework, with tests taken from yum sources

(none of them pass yet...)

18 years agomisc fixes for edge cases
Dan Winship [Fri, 15 Feb 2008 20:08:38 +0000]
misc fixes for edge cases

1) sets with only one package
2) packages with only one property
3) sets with only one property

18 years agoremove some unused code
Dan Winship [Fri, 15 Feb 2008 14:31:20 +0000]
remove some unused code

18 years ago(trivial optimization)
Dan Winship [Thu, 14 Feb 2008 15:35:25 +0000]
(trivial optimization)

18 years agoadd a missing comparison to ensure correct repo sorting
Dan Winship [Thu, 14 Feb 2008 15:35:10 +0000]
add a missing comparison to ensure correct repo sorting

18 years agoSplit razor_package and razor_entry names into name and flags
Dan Winship [Mon, 11 Feb 2008 16:57:47 +0000]
Split razor_package and razor_entry names into name and flags

18 years agosplit razor_property.name into name, flags, and type bitfields
Dan Winship [Mon, 11 Feb 2008 16:21:54 +0000]
split razor_property.name into name, flags, and type bitfields

18 years agoChange list flags back to 8 bits instead of just 2
Dan Winship [Mon, 11 Feb 2008 14:50:17 +0000]
Change list flags back to 8 bits instead of just 2

18 years agoimprove the list abstraction with "struct list_head" and "struct list"
Dan Winship [Fri, 8 Feb 2008 19:39:34 +0000]
improve the list abstraction with "struct list_head" and "struct list"

both structs are actually just uint32_t's in disguise, using bitfields
to avoid the need for explicit bit operations, and using two type names
to hide the RAZOR_IMMEDIATE hack from the public API

18 years agoAdd a list abstraction for package/property lists
Dan Winship [Fri, 8 Feb 2008 16:19:36 +0000]
Add a list abstraction for package/property lists

18 years agosplit array and hashtable code out into a new file
Dan Winship [Thu, 7 Feb 2008 14:58:48 +0000]
split array and hashtable code out into a new file

18 years agoclean up some duplicated code around calls to add_to_property_pool
Dan Winship [Wed, 6 Feb 2008 18:02:50 +0000]
clean up some duplicated code around calls to add_to_property_pool

18 years agopad repo files with 0 bytes, not random memory
Dan Winship [Wed, 6 Feb 2008 17:59:27 +0000]
pad repo files with 0 bytes, not random memory

so you can do:
  ./razor import-yum
  mv rawhide.repo rawhide.repo.orig
  make
  ./razor import-yum
  diff rawhide.repo.orig rawhide.repo

(doesn't work with system.repo at the moment...)

18 years agofix dependencies
Dan Winship [Wed, 6 Feb 2008 17:37:49 +0000]
fix dependencies

18 years agos/import/yum/
Dan Winship [Tue, 5 Feb 2008 17:14:50 +0000]
s/import/yum/

18 years agoupdate
Dan Winship [Tue, 5 Feb 2008 17:02:53 +0000]
update

18 years agoSupport for less/equal/greater version in requires/conflicts, etc
Dan Winship [Mon, 4 Feb 2008 19:25:45 +0000]
Support for less/equal/greater version in requires/conflicts, etc

Add less/equal/greater information to razor_property, and update
importers and other code.

Move the rpm importer from import.c to rpm.c to avoid code
duplication, and then rename import.c to yum.c since that's all that's
left.

18 years agoFix repo format on x86_64 by using uint32_t instead of unsigned long
Dan Winship [Mon, 4 Feb 2008 15:46:29 +0000]
Fix repo format on x86_64 by using uint32_t instead of unsigned long

18 years agodon't use -O2 for now
Dan Winship [Mon, 4 Feb 2008 15:12:04 +0000]
don't use -O2 for now

18 years agoFix comparisong bug in razor_set_diff().
Kristian Høgsberg [Tue, 22 Jan 2008 16:34:28 +0000]
Fix comparisong bug in razor_set_diff().

We could end up calling the callback for p1 even if it's NULL, if p2 != NULL
and the previous comparison left res == -1.

18 years agoUse a package iterator in find_packages() to add packages sorted.
Kristian Høgsberg [Tue, 22 Jan 2008 05:08:13 +0000]
Use a package iterator in find_packages() to add packages sorted.

Also avoids use of razor_set_get_package().

18 years agoFactor out property importing for rpm importer.
Kristian Høgsberg [Tue, 22 Jan 2008 04:02:47 +0000]
Factor out property importing for rpm importer.

18 years agoUse iterators for razor_set_diff() implementation.
Kristian Høgsberg [Tue, 22 Jan 2008 03:40:54 +0000]
Use iterators for razor_set_diff() implementation.

18 years agoUse the package iterator for looping over file owners too.
Kristian Høgsberg [Fri, 18 Jan 2008 04:36:12 +0000]
Use the package iterator for looping over file owners too.

18 years agoAdd a package iterator for iterating through property owners.
Kristian Høgsberg [Fri, 18 Jan 2008 04:28:37 +0000]
Add a package iterator for iterating through property owners.

18 years agoMove more front-end logic from razor_set_list_property_packages() to main.c.
Kristian Høgsberg [Fri, 11 Jan 2008 04:42:42 +0000]
Move more front-end logic from razor_set_list_property_packages() to main.c.

18 years agoUse property iterator in razor_set_list_property_packages().
Kristian Høgsberg [Fri, 11 Jan 2008 04:30:51 +0000]
Use property iterator in razor_set_list_property_packages().

18 years agoClean up property iterator constructor a bit.
Kristian Høgsberg [Fri, 11 Jan 2008 04:03:03 +0000]
Clean up property iterator constructor a bit.

18 years agoImplement razor_set_get_package() using the package iterator.
Kristian Høgsberg [Fri, 11 Jan 2008 03:50:51 +0000]
Implement razor_set_get_package() using the package iterator.

Drop bsearch and qsort with data TODO items.

18 years agoUse property iterator for razor_set_get_property().
Kristian Høgsberg [Fri, 11 Jan 2008 03:44:41 +0000]
Use property iterator for razor_set_get_property().

18 years agoGet rid of razor_importer_tokenize() helper function.
Kristian Høgsberg [Fri, 11 Jan 2008 03:07:07 +0000]
Get rid of razor_importer_tokenize() helper function.

18 years agoFix a few warnings.
Kristian Høgsberg [Fri, 11 Jan 2008 02:08:03 +0000]
Fix a few warnings.

18 years agoAdd missing test.xml.
Kristian Høgsberg [Tue, 8 Jan 2008 17:55:34 +0000]
Add missing test.xml.

18 years agoAdd iterator API, boot-strap test suite.
Kristian Høgsberg [Fri, 4 Jan 2008 00:50:20 +0000]
Add iterator API, boot-strap test suite.

18 years agoSplit a few functions out into new file util.c.
Kristian Høgsberg [Thu, 3 Jan 2008 14:32:21 +0000]
Split a few functions out into new file util.c.

18 years agoDrop unused sha1.h.
Kristian Høgsberg [Sat, 29 Dec 2007 23:59:51 +0000]
Drop unused sha1.h.

18 years agoFix a bit of return -1 / exit(-1) confusion.
Kristian Høgsberg [Sat, 29 Dec 2007 21:43:34 +0000]
Fix a bit of return -1 / exit(-1) confusion.

18 years agoUse fstat() instead of stat() when opening rpm.
Kristian Høgsberg [Sat, 29 Dec 2007 20:56:59 +0000]
Use fstat() instead of stat() when opening rpm.

18 years agoDrop table based section lookup and look up sections on demand.
Kristian Høgsberg [Sat, 29 Dec 2007 20:36:13 +0000]
Drop table based section lookup and look up sections on demand.

18 years agoExtend installer implementation further.
Kristian Høgsberg [Thu, 27 Dec 2007 22:01:52 +0000]
Extend installer implementation further.

18 years agoRun install scripts.
Kristian Høgsberg [Sun, 23 Dec 2007 03:05:29 +0000]
Run install scripts.

18 years agoUse an array of tags instead of a big switch for parsing the RPM headers.
Kristian Høgsberg [Sat, 22 Dec 2007 05:37:06 +0000]
Use an array of tags instead of a big switch for parsing the RPM headers.

18 years agoFix file tree traversal to not skip the last entry.
Kristian Høgsberg [Fri, 16 Nov 2007 22:14:51 +0000]
Fix file tree traversal to not skip the last entry.

18 years agoDump a couple of ideas to TODO, prune a few old items.
Kristian Høgsberg [Tue, 13 Nov 2007 06:30:09 +0000]
Dump a couple of ideas to TODO, prune a few old items.

18 years agoDrop unused sha1.c from repository.
Kristian Høgsberg [Tue, 13 Nov 2007 06:08:08 +0000]
Drop unused sha1.c from repository.