Re: [PATCH] maint: sort private sym lists

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

 



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.


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.

--
Eric Blake   eblake@xxxxxxxxxx    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]