Commit Graph

5 Commits

Author SHA1 Message Date
Alexey Tourbin
959c18fe5e find-package: renamed FindByPath -> FindByFile 2010-04-08 11:24:55 +04:00
Alexey Tourbin
c8ccb0da6c find-package: enhanced path lookups under buildroot, added special case for dir dependencies
$ less alterator-install-common-desktop-0.11-alt1.i586.rpm |grep help
-rwxr-xr-x    1 root    root              972 Oct 30 18:38 /usr/share/alterator/help/ru_RU/basesystem.html
-rwxr-xr-x    1 root    root              340 Oct 30 18:38 /usr/share/alterator/help/ru_RU/kbd.html
-rwxr-xr-x    1 root    root             2233 Oct 30 18:38 /usr/share/alterator/help/ru_RU/license.html
-rwxr-xr-x    1 root    root             1280 Oct 30 18:38 /usr/share/alterator/help/ru_RU/lilo.html
-rwxr-xr-x    1 root    root             3032 Oct 30 18:38 /usr/share/alterator/help/ru_RU/network.html
-rwxr-xr-x    1 root    root             4840 Oct 30 18:38 /usr/share/alterator/help/ru_RU/packages.html
-rwxr-xr-x    1 root    root             1928 Oct 30 18:38 /usr/share/alterator/help/ru_RU/root.html
-rwxr-xr-x    1 root    root             1387 Oct 30 18:38 /usr/share/alterator/help/ru_RU/time.html
-rwxr-xr-x    1 root    root             1223 Oct 30 18:38 /usr/share/alterator/help/ru_RU/user.html
-rwxr-xr-x    1 root    root            11024 Oct 30 18:38 /usr/share/alterator/help/ru_RU/vm.html
-rwxr-xr-x    1 root    root             1789 Oct 30 18:38 /usr/share/alterator/help/ru_RU/x11.html
lrwxrwxrwx    1 root    root               31 Oct 30 18:38 /usr/share/alterator/help/ru_UA -> /usr/share/alterator/help/ru_RU
$

%files ...
%_datadir/alterator/help/ru_RU/*
%_datadir/alterator/help/ru_UA

The package referes ru_RU directory but does not own the directory.
Old behaviour: unmet dependency.

>  alterator-icons-lite-0.4.0-alt1      Requires(rpmlib)        rpmlib(PayloadFilesHavePrefix) <= 4.0-1
> +alterator-install-common-desktop-0.11-alt1   Requires        /usr/share/alterator/help/ru_RU
>  alterator-install-common-desktop-0.11-alt1   Requires        alterator-autoinstall

New behaviour: though the package does not explicitly own the directory,
it has some files packaged under the directory.  Because of this, ru_UA
symlink will not be broken after install.  We chose to be forgiving:

symlinks.req: WARNING: /usr/src/tmp/alterator-install2-desktop-buildroot/usr/share/alterator/help/ru_UA: directory /usr/share/alterator/help/ru_RU not owned by the package
2008-01-23 02:42:02 +03:00
Alexey Tourbin
4c187ca387 functions: added new function PackagedFiles() 2008-01-23 01:22:45 +03:00
Alexey Tourbin
9ad1babe6a functions: new function: Warning() 2007-12-03 11:39:48 +03:00
Alexey Tourbin
c9d79d6f16 moved functions and find-package from rpm-build to rpm, added .provides.sh
This will allow to relax rpm-build-* dependencies, hopefully without adding
new essential dependencies to rpm (note that rpm already depends on sh and
coreutils; now this also includes grep, and possibly should include sed,
awk, and gzip).

Consider mono-mcs package, which is mono C# compiler.  Recently I added
dependency on rpm-build-mono to this package, to enable automatic support
for mono dependencies whenever mono compiler is used.  Now the problem
is that rpm-build-mono depends on rpm-build (via /usr/lib/rpm/functions),
and rpm-build in turn requires a lot of packages, e.g. gcc and autotools,
for the purpose of populating base build environment.

To put it another way, the problem is that it is impossible to install
mono compiler (with automatic support for mono dependencies) without also
installing gcc and stuff, which is roughly 100M of unrelated packages.

This seems like a minor problem to me, since every "devel" package (including
compilers) can conventionally require base build environment.  However,
Alexander Bokovoy argues that school kids desperately need mono-mcs compiler
on their desktops without gcc and another stuff from the base build environment!

The upshot is that possibly we want to relax rpm-build-* dependencies,
so that those "support for dependencies" packages do not require
full-fledged rpm-build.  The easiest way to accomplish this is to
move /usr/lib/rpm/functions from rpm-build to rpm package.  I also
choose to move /usr/lib/rpm/find-package as well, along with making
/usr/lib/rpm/.provides.sh, so that rpm-build-* packages depend on
something like /usr/lib/rpm(Fatal), not just rpm.
2007-11-21 14:14:55 +03:00