On Fri, Feb 25, 2005 at 06:10:04PM -0800, Bill Campbell wrote:

> While updating a SuSE 9.2 Professional system from Release 2.2 to Release
> 2.3 today I have run into quite a few issues with dependency order
> problems.

There are dependency problems that cannot be solved. This happens mostly
when packages or options are renamed or when the dependency graph changes
significantly between releases.

In the latter case a clean install instead of an upgrade using -za instead of 
-Ua
should work.

This doesn't mean that there are no bugs in the build tool :-|

> I've looked at the code for the build.pl program, and am not
> ready to dig into it yet to figure out how it's handling this.

In short:

1. identify which packages you want to have installed by looking up the most 
recent
   version in the repository (or if missing, the one that is already installed).
2. for each such package
   2a. if the package is already on the TODO list, ignore it.
   2b. if the package is already installed and if it satisfies the various
           requirements (options/version/command line flags) then ignore it.
   2c. look up its requirements and map these to packages
       for each such package do 2. recursively
   2d. add the package to the TODO list and keep track of its version/options
           in the list of installed packages
   2e. look up packages that depend on this package (reverse dependencies)
           for each such package do 2. recursively
3. generate build instructions from the TODO list.

build_list() starts with step1 and then runs make_dep() for each selected 
package.
make_dep() is what implements step 2.
print_list1() is what implements step 3.

There are three complex parts:

chose_source() maps package names to packages. It has to deal with binary 
packages, 
packages without full source, virtual packages (like MTA), resolve ambiguities 
and
then select a "best package".

dep2target() maps requirements to packages. It looks up all packages that 
satisfy
a requirement and then selects one depending on the build tool options.

get_revdep() computes a reverse dependency map. This one should do a full 
topological
sort that also needs to be recomputed/corrected when a package is added to the 
TODO
list. So far it just sorts direct dependencies and is computed only once as the 
full
computation is way too slow.

So far I haven't seen a case where the incomplete get_revdep() caused problems 
but
I have seen many cases where renaming of packages and options caused problems.

If you don't mind I would like to see the output of 'rpm --provides --qa' and
the output of the build tool when you believe it does things wrong.

As a workaround you may try 'openpkg build -zqa'. This will do an unconditional
rebuild of all installed packages and ignore reverse dependencies.


Greetings,
-- 
                                Michael van Elst
Internet: [EMAIL PROTECTED]
                                "A potential Snark may lurk in every tree."
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
Developer Communication List                   openpkg-dev@openpkg.org

Reply via email to