[Rpm-maint] Re: 4.5.90 and %expanding %%package from macro
Axel Thimm
Axel.Thimm at ATrpms.net
Thu Sep 4 18:33:57 UTC 2008
On Thu, Sep 04, 2008 at 10:03:28AM +0200, devzero2000 wrote:
> Probably a bug in rpm 4.6 on FC10:%%{testmacro bar2} have to expand as
> expected . I have put a %trace in the SPEC and i have this
> result from rpmbuild -bi (look at the macros expansion):
That looks OK, doesn't it?
> 1> %{expand:%%package -n bar1
> Summary: bar1
> Group: bar1
> %description -n bar1
> bar1
> %%{testmacro bar2}
> %%package -n bar3
> Summary: bar3
> Group: bar3
> %description -n bar3
> bar3}^
> 2> %description^-n bar1
> 2> %description^-n bar3
> 1< bar3
> 2> %package^-n bar1
> 2> %description^-n bar1
> 2> %{testmacro bar2}^
> 3> %package^-n %1
> 3> %1^
> 3< bar2
> 3> %1^
> 3< bar2
> 3> %1^
> 3< bar2
> 3> %description^-n %1
> 3> %1^
> 3< bar2
> 3> %{nil}^
> 4> %{!?nil}^
> 3< (empty)
> 2< (empty)
> 2> %package^-n bar3
> 2> %description^-n bar3
> 1< bar3
> 0< %package -n bar1
> Summary: bar1
> Group: bar1
> %description -n bar1
> bar1
>
> %package -n bar2
> Summary: bar2
> Group: bar2
> %description -n bar2
>
> %package -n bar3
> Summary: bar3
> Group: bar3
> %description -n bar3
> bar3
>
> In effect from an rpmbuild -ba test-macros.spec i have
>
> Wrote: /home/machbuild/rpmbuild/SRPMS/test-macros-1.0-1.src.rpm
> Wrote: /home/machbuild/rpmbuild/RPMS/test-macros-1.0-1.noarch.rpm
> Wrote: /home/machbuild/rpmbuild/RPMS/foo1-1.0-1.noarch.rpm
> Wrote: /home/machbuild/rpmbuild/RPMS/foo2-1.0-1.noarch.rpm
> Wrote: /home/machbuild/rpmbuild/RPMS/foo3-1.0-1.noarch.rpm
> Wrote: /home/machbuild/rpmbuild/RPMS/bar1-1.0-1.noarch.rpm
> Wrote: /home/machbuild/rpmbuild/RPMS/bar2-1.0-1.noarch.rpm
> Wrote: /home/machbuild/rpmbuild/RPMS/bar3-1.0-1.noarch.rpm
That also looks fine.
> My rpm version on FC9 is
>
> rpm -V --version
> rpm (RPM) 5.1.4
F9's rpm (which is 4.4.x) is also fine.
> Perhaps you have to fillup a redhat bugzilla for the "official" rpm version
> on FC10.
OK, done so:
https://bugzilla.redhat.com/show_bug.cgi?id=461180
>
> On Wed, Sep 3, 2008 at 9:04 PM, Axel Thimm <Axel.Thimm at atrpms.net> wrote:
>
> > Hi,
> >
> > I'm very often using constructs that create a macro that is later
> > expanding before %install defining several subpackages (like the
> > debuginfo packages do). This worked for all version of rpm as far back
> > as RHL8, but breaks now with F10.
> >
> > The simplified construct is as follows:
> >
> > Some macro file (e.g. /etc/rpm/macros.libs) contains the following
> > definition:
> >
> > %testmacro() \
> > %package -n %1\
> > Summary: %1\
> > Group: %1\
> > %description -n %1\
> > blah
> >
> > (I tried with adding %{nil} more empty lines at the end etc, this is
> > just one variant).
> >
> > A test specfile contains a variant w/o using the testmacro (which
> > works) and one that does, where the macro seems to kill any further
> > %%package instances in the %expand:
> >
> > %{expand:%%package -n foo1
> > Summary: foo1
> > Group: foo1
> > %description -n foo1
> > foo1
> > %%package -n foo2
> > Summary: foo2
> > Group: foo2
> > %description -n foo2
> > foo2
> > %%package -n foo3
> > Summary: foo3
> > Group: foo3
> > %description -n foo3
> > foo3}
> >
> > %{expand:%%package -n bar1
> > Summary: bar1
> > Group: bar1
> > %description -n bar1
> > bar1
> > %%{testmacro bar2}
> > %%package -n bar3
> > Summary: bar3
> > Group: bar3
> > %description -n bar3
> > bar3}
> >
> > The expected behaviour from a query on this specfile is to get
> > subpackages like
> >
> > main-1.0-1
> > foo1-1.0-1
> > foo2-1.0-1
> > foo3-1.0-1
> > bar1-1.0-1
> > bar2-1.0-1
> > bar3-1.0-1
> >
> > F10's 4.5.90 kills the subpackage after the %%{testmacro ...}
> > invocation, e.g. there is no bar3.
> >
> > Is this a bug in rpm, or was I using a buggy feature all these years
> > and need to do it properly? (If so what is the proper way?)
> >
> > Thanks!
> >
> > _______________________________________________
> > Rpm-maint mailing list
> > Rpm-maint at lists.rpm.org
> > https://lists.rpm.org/mailman/listinfo/rpm-maint
> >
> >
> _______________________________________________
> Rpm-maint mailing list
> Rpm-maint at lists.rpm.org
> https://lists.rpm.org/mailman/listinfo/rpm-maint
--
Axel.Thimm at ATrpms.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.rpm.org/pipermail/rpm-maint/attachments/20080904/af3d28dd/attachment-0001.pgp
More information about the Rpm-maint
mailing list