On Thu, Jul 12, 2018 at 03:17:27PM -0700, Martin Xu wrote: > On Thu, Jul 12, 2018 at 12:23 PM, Flavio Leitner <f...@redhat.com> wrote: > > > On Thu, Jul 12, 2018 at 10:35:55AM -0700, Martin Xu wrote: > > > This patch only affects rhel6 spec file. [...] > > > + > > > +# By default, build against the latest installed kernel-devel > > > +%{!?kversion:%global kversion %(rpm -q --qf > > '%{VERSION}-%{RELEASE}.%{ARCH}' `rpm -qa | egrep > > "^kernel(-rt|-aarch64)?-devel" | /usr/lib/rpm/redhat/rpmsort -r | head -n > > 1` | head -n 1)} > > > > I am afraid that '%{VERSION}-%{RELEASE}.%{ARCH}' will be expanded by > > rpm when building the package to the openvswitch's one in this > > package, so you end up with: > > rpm -q --qf '2.9.0-1.xxx.x86_64' $kernel_pkg_name > > > > otherwise LGTM. > > fbl > > > > Hi Flavio, > > Thanks for the review. I hadn't noticed it. I just tried again, but I don't > see that %{VERSION} being expanded to 2.9.0 for example. If I changed that > long rpm command to query with lower case pattern > '%{version}-%{release}.%{arch}, it did get expanded. Maybe I'm missing > something here? > I kinda prefer to use it as it is right now than inventing my own. Since > this is from a macro nested inside the definition > for kernel_module_package. I think it's safe to assume it's written more > correctly than mine.
Interesting, ok, I learned something today :) thanks, -- Flavio _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev