Commit Graph

19 Commits

Author SHA1 Message Date
0358825884 pruneRDeps1: fix check for cycles
The check for cycles introduced in 4.0.4-alt100.17-6-ga71e004 appeared
to be incomplete.  For example, it fails to recognize a cycle in the
following example:

%package -n test
Requires: libtest = %version-%release

%package -n libtest
Requires: libtest-common = %version-%release

%package -n libtest-common
Requires: libtest = %version-%release
2011-03-14 02:27:17 +00:00
Alexey Tourbin
d5b1a5e2f2 build/interdep.c: missing alFree 2011-02-08 08:28:24 +03:00
Alexey Tourbin
7891bc3a46 build/interdep.c: diagnose non-strict dependencies between subpackages
warning: util-linux: non-strict dependency on libblkid
warning: util-linux: non-strict dependency on libuuid
warning: util-linux: non-strict dependency on libmount
warning: mount: non-strict dependency on libblkid
warning: cfdisk: non-strict dependency on libblkid
warning: fdisk: non-strict dependency on libblkid
warning: libblkid: non-strict dependency on libuuid
warning: libblkid-devel: non-strict dependency on libuuid-devel
warning: libmount-devel: non-strict dependency on libblkid-devel
warning: util-linux-debuginfo: non-strict dependency on libblkid-debuginfo
warning: util-linux-debuginfo: non-strict dependency on libuuid-debuginfo
warning: util-linux-debuginfo: non-strict dependency on libmount-debuginfo
warning: mount-debuginfo: non-strict dependency on libblkid-debuginfo
warning: cfdisk-debuginfo: non-strict dependency on libblkid-debuginfo
warning: fdisk-debuginfo: non-strict dependency on libblkid-debuginfo
warning: libblkid-debuginfo: non-strict dependency on libuuid-debuginfo

Note that the right time for this check is after strict dependencies
are propagated, and also after debuginfo dependencies have been lifted.
2011-02-08 07:19:01 +03:00
Alexey Tourbin
d92517ed56 build/interdep.c: diagnose mssing Epoch in subpackage dependencies
warning: libX11-devel: dependency on libX11 needs Epoch
warning: libX11: dependency on libX11-locales needs Epoch
2011-02-08 05:21:38 +03:00
Alexey Tourbin
a71e004bdf build/interdep.c: cycles must not be pruned completely
%package -n test
Requires: libtest = %version-%release
Requires: libtest-common = %version-%release

%package -n libtest
Requires: libtest-common = %version-%release

%package -n libtest-common
Requires: libtest = %version-%release

Here libtest and libtest-common make a cycle, and the "test" package
requires a cycle.  Naiive optimization against a cycle can simply
wipe out all dependencies: the dependency on libtest-common will be
optimized out, because libtest-common is already required by libtest;
likewise, the dependency on libtest will be optimized out, because
libtest is already required required by libtest-common.
2011-02-07 07:38:04 +03:00
Alexey Tourbin
e9d4612abe build/interdep.c: recognize %_deps_optimization
%_deps_optimization is now treated as optimization level 0, 1, or 2
(the default is 2).  Level 1 will make single-package optimizations.
Level 2 will additionally optimize dependencies between subpackages.
2011-02-07 06:26:02 +03:00
Alexey Tourbin
f5ed7f870a build/interdep.c: prune already required deps between dependent subpackages 2011-02-07 06:03:02 +03:00
Alexey Tourbin
8d0056fd39 build/interdep.c: also prune rpmlib(SetVersions) dependency 2011-02-05 07:25:46 +03:00
Alexey Tourbin
e061586385 build/files.c (finalizePkg): calculate RPMTAG_SIZE after optimizations
Note that checkHardLinks function is now removed.  It was unclear
whether it was supposed to verify %lang attributes (returning non-zero
on error) or indicate if all hardlinks are packaged within the package.

It turns out that only a single package in our repo has
PartialHardlinkSets dependency:

$ cd /ALT/Sisyphus/files/x86_64/RPMS/
$ rpm -qp --qf '[%{NAME}\t%{REQUIRENAME}\n]' *.rpm |fgrep 'PartialHardlinkSets'
$ cd /ALT/Sisyphus/files/noarch/RPMS/
$ rpm -qp --qf '[%{NAME}\t%{REQUIRENAME}\n]' *.rpm |fgrep 'PartialHardlinkSets'
freeciv-common  rpmlib(PartialHardlinkSets)
$

This probably means that freeciv-common has hardlinks with different
%lang attributes (which probably was supposed to be an error).  So
the whole issue should be reconsidered.  A leave XXX marks in the
code and suggest new PartialHardlinkSets implementation (however,
the dependency is not being added yet).
2011-02-05 03:49:54 +03:00
Alexey Tourbin
a6c78a83c9 build/interdep.c: prune extra deps between dependent subpackages
When pkg1 has strict dependency on pkg2, all other non-strict/virtual
dependencies on pkg2 will be reaped off pkg1.  Note that the are subtle
cases: though I try to make something about merging dependency flags,
it is not always possible, as the dependency on pkg2 can be obtained
via a transitive chain.  I see this being a non-critical issue which
is worthwhile to be mentioned.
2011-02-05 01:26:16 +03:00
Alexey Tourbin
e81ad7e376 build/interdep.c (liftDebuginfoDeps): social lift for debuginfo
Basically, if pkg1 has strict dependency on pkg2, the question
is whether pkg1-debuginfo should possess a strict dependency on
pkg2-debuginfo.  The answer is "yes" provided that pkg1-debuginfo
is already dependent on pkg2-debuginfo (i.e. has new soname-based
debuginfo dependencies resolved to pkg2-debuginfo).  This provides
an opportunity for dependency optimization between dependend
debuginfo subpackages.
2011-02-04 23:45:01 +03:00
Alexey Tourbin
43261c6111 build/interdep.c (processDependentDebuginfo): factored from pruneDebuginfoSrc 2011-02-04 02:56:14 +03:00
Alexey Tourbin
140d6de605 build/interdep.c: do not propagate self-Requires 2011-02-03 23:10:49 +03:00
Alexey Tourbin
2e38d0ef4c build/interdep.c: prune debuginfo src dups, Vierter und letzter Theil 2011-01-31 06:22:29 +03:00
Alexey Tourbin
31fc3dcd6f build/interdep.c: prune debuginfo src dups, part 3 - directories 2011-01-31 06:22:28 +03:00
Alexey Tourbin
c7567ffb9a build/interdep.c: prune debuginfo src dups, part 2
The output now is like this:
removing 12 sources from rpm-debuginfo and adding dependency on librpm-debuginfo
removing 11 sources from rpm-debuginfo and adding dependency on librpmbuild-debuginfo
removing 13 sources from rpm-build-debuginfo and adding dependency on rpm-debuginfo
removing 14 sources from rpm-static-debuginfo and adding dependency on rpm-debuginfo
removing 20 sources from librpmbuild-debuginfo and adding dependency on librpm-debuginfo
removing 13 sources from rpm-build-debuginfo and adding dependency on librpm-debuginfo
removing 80 sources from rpm-static-debuginfo and adding dependency on librpm-debuginfo
removing 12 sources from python-module-rpm-debuginfo and adding dependency on librpm-debuginfo
removing 12 sources from rpm-build-debuginfo and adding dependency on librpmbuild-debuginfo
removing 35 sources from rpm-static-debuginfo and adding dependency on librpmbuild-debuginfo
2011-01-31 06:22:25 +03:00
Alexey Tourbin
e00c43536c build/interdep.c: prune debuginfo src dups, part 1
The output is like this:
remove sources from rpm-debuginfo because it requires librpm-debuginfo
remove sources from rpm-debuginfo because it requires librpmbuild-debuginfo
remove sources from rpm-build-debuginfo because it requires rpm-debuginfo
remove sources from rpm-static-debuginfo because it requires rpm-debuginfo
remove sources from librpmbuild-debuginfo because it requires librpm-debuginfo
remove sources from rpm-build-debuginfo because it requires librpm-debuginfo
remove sources from rpm-static-debuginfo because it requires librpm-debuginfo
remove sources from python-module-rpm-debuginfo because it requires librpm-debuginfo
remove sources from rpm-build-debuginfo because it requires librpmbuild-debuginfo
remove sources from rpm-static-debuginfo because it requires librpmbuild-debuginfo
2011-01-31 06:22:11 +03:00
Alexey Tourbin
2213cb3f56 build/interdep.c: propagate dependencies 2011-01-31 04:54:22 +03:00
Alexey Tourbin
2c673900ce build/interdep.c: initial revision 2011-01-31 04:53:26 +03:00