[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] maint: sort private sym lists



On Thu, Oct 21, 2010 at 08:30:12AM -0600, Eric Blake wrote:
> On 10/21/2010 02:15 AM, Daniel Veillard wrote:
> >On Wed, Oct 20, 2010 at 11:47:59AM -0600, Eric Blake wrote:
> >>* src/libvirt_private.syms: Sort by header name, then within
> >>header, and drop duplicate virNetworkDefParseNode,
> >>virFileLinkPointsTo and virXPathBoolean.
> >>---
> >>
> >>Fixes the duplication first noted here, and hopefully makes the
> >>file easier to maintain.
> >>https://www.redhat.com/archives/libvir-list/2010-October/msg00283.html
> >>
> >>  src/libvirt_private.syms |  746 +++++++++++++++++++++++-----------------------
> >>  1 files changed, 376 insertions(+), 370 deletions(-)
> >
> >   ACK,
> 
> Thanks; pushed.  I also added a comment at the top of the file
> reminding about the sort order.

  okay, I think that's sufficient :-)

> >
> >I wonder if it's worth trying to enforce that sorting, probably not,
> 
> I started on that yesterday, but gave up after getting to the point
> where I could reliably sort the file, but not refactor the sorted
> output back into the original form (maybe it's just me, but sed's x
> and G operators are not the most common, and I had to read the
> manual):
> 
> $ sed '/^$/,$ { # For lines after the header...
>  /^#/ { x; s/^/ /; }; # Stick the filename in hold space
>  /^[^#]/ { G; s/\n/ /; }; # For all other lines, append the filename
>  /^$/ { x; d; } # and clear the hold space after each file
> }' src/libvirt_private.syms | sort -k 3,3 -k 1,1
> 
> Does anyone wants to take that idea further to automate keeping
> things sorted?  For now, I'm fine with just manual efforts.

  Yeah I started to think about what it would take to do the sorting,
and hum it looked too complex for the benefit ... it's not like we add
entries there very often :-)

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]