Commit Graph

5 Commits

Author SHA1 Message Date
Alexey Tourbin
e00c2bc5a3 genpkglist.cc: rewrite copyStrippedFileList() to avoid inplace dirnames edit bug
There was an assumption that DIRINDEXES are always sorted ascending,
which actually does not hold.  This means we CANNOT use inplace
replacement in "dirnames" array, so as to append "later dirs" on top
of "older dirs".

The bug can actually be more subtle.  It is very well possible that
I simply cannot understand that previous "inplace optimization" logic.
But I think that it sucks anyway.  I choose to rewrite this piece of code
for the sake of clarity and correctness.  I hope that the correctness of
the code now should be a bit more obvious, even for a casual reader.
2007-11-30 19:19:42 +03:00
Alexey Tourbin
27122041c0 genpkglist.cc: removed very bad piece of code which could break my fine-grained file list stripping algorithm 2007-11-23 13:52:00 +03:00
Alexey Tourbin
bb7eaffe62 genpkglist: don't strip paths that are owned by 2 or more packages
Another attempt to deal with semi-unmet dependencies.  This should fix
most of the cross-arch semi-unmets generated via conetnts_index_all.

Consider a few noarch packages which own /usr/share/foo.  Now if i586
package somehow refers /usr/share/foo, contents_index_all search will
produce as-is reference, which is going to be cross-arch semi-unmet.

Note that if /usr/share/foo is owned by only one package,
contents_index_all search will produce explicit package name.

This is why genpkglist should not strip paths that are owned
by 2 or more packages.
2007-10-08 22:57:09 +04:00
Alexey Tourbin
ef2de99f5f fixed alt-genpkglist-reqfiles.patch: plugged memory leak, added progress bar for the first pass 2007-08-11 22:10:49 +04:00
Alexey Tourbin
30e27b0f1c apt-0.5.15lorg2-alt-genpkglist-reqfiles.patch
genpkglist strips file lists by default (without --bloat option).
It keeps only some "useful files" by using a few ad hoc patterns.

This can break file-level dependencies.  Consider pkgA requires
/usr/lib/foo1/bar, and pkgB owns this file without explicitly
providing it.  Now if genpkglist strips /usr/lib/foo1/bar
from pkgB file list, this is going to be an unmet dependency.

This patch changes genpkglist behaviour, so that, when genpkglist
is invoked without --bloat option, it first finds all file-level
dependencies (something like "rpm -qaR |grep ^/").  This requires
a separate pass.  The list of file-level dependencies is saved into
"reqfiles" global variable.  And on the second (normal) pass, the
function usefulFile() is modified to check the "reqfiles" variable;
that is, it should keep a file in the file list if it's been required
by some package in the repo.

(Unfortunately, this patch does not solve all of the problems
I want it to solve; we have separate repos for i586 and noarch --
inter-repo file-level dependencies cannot be resolved this way.)
2007-08-11 20:01:05 +04:00