James Olin wrote: > On 2/9/07, Stanislav Brabec <[EMAIL PROTECTED]> wrote:
> Unfortunately though, I just realized I might be misled, because > there is no way that I know to deal with autogenerated deps in this > way. You are true, but at least partially it is possible. Yes, it is a overkill, because if dependency graph is not cyclic, this will never cause any problem. But if you add call-just-installed-binary scriptlet to a package with the cyclic dependency with another one, you can easily broke the whole stuff. Here is my work-around code: # Find prerequirements of %{_bindir}/foo %define my_prereq %{_builddir}/%{?buildsubdir}/%{name}-prereq cat << EOF > %{my_prereq} #! /bin/sh echo "$RPM_BUILD_ROOT%{_bindir}/foo" | %__find_requires "\$@" EOF chmod 755 %{my_prereq} # NOTE: %%__find_prereq is documented, but not implemented (see rpm-4.4.2/build/rpmfc.c). #%%define __find_prereq %{my_prereq} # Work around unimplemented %%__find_prereq: # EDIT_HERE: Add all self-provides to grep -v PREREQ=$( %{my_prereq} | grep -v ^libfoo | tr '\n' ' ' | sed "s/ *$//" ) PREREQ_MD5=$(echo "$PREREQ" | md5sum | sed "s/ *-//" ) %define new_prereq $(PREREQ) if test "$PREREQ_MD5" != "%prereq_md5" ; then echo "Please update PreReq in preamble of this package on actual platform: ====== PreReq: $PREREQ %%define prereq_md5 $PREREQ_MD5 ======" exit 1 fi ... And please remove %__find_prereq from documentation. -- Best Regards / S pozdravem, Stanislav Brabec software developer --------------------------------------------------------------------- SUSE LINUX, s. r. o. e-mail: [EMAIL PROTECTED] Lihovarská 1060/12 tel: +420 284 028 966 190 00 Praha 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ _______________________________________________ Rpm-maint mailing list Rpm-maint@lists.rpm.org https://lists.rpm.org/mailman/listinfo/rpm-maint