Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package arpwatch-ethercodes for 
openSUSE:Factory checked in at 2022-12-05 18:01:39
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/arpwatch-ethercodes (Old)
 and      /work/SRC/openSUSE:Factory/.arpwatch-ethercodes.new.1835 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "arpwatch-ethercodes"

Mon Dec  5 18:01:39 2022 rev:766 rq:1040162 version:20201026_100149

Changes:
--------
--- /work/SRC/openSUSE:Factory/arpwatch-ethercodes/arpwatch-ethercodes.changes  
2020-11-10 13:53:40.538824782 +0100
+++ 
/work/SRC/openSUSE:Factory/.arpwatch-ethercodes.new.1835/arpwatch-ethercodes.changes
        2022-12-05 18:01:49.820787157 +0100
@@ -1,0 +2,7 @@
+Fri Nov 11 11:11:11 UTC 2022 - [email protected]
+
+- sort existing oui.csv to show differences in future updates
+- sort downloaded oui.csv
+- move vim commands to a place where vim can find the commands
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ fetch_ethercodes.py ++++++
--- /var/tmp/diff_new_pack.00DmyI/_old  2022-12-05 18:01:50.688791884 +0100
+++ /var/tmp/diff_new_pack.00DmyI/_new  2022-12-05 18:01:50.692791907 +0100
@@ -42,7 +42,6 @@
 {license}
 """
 #
-# vim:set et ts=8 sw=4:
 #
 
 __version__ = '0.3'
@@ -159,7 +158,32 @@
     # fetch oui.csv
     if fetchoui:
         vout(1, 'fetch {ouifile}')
-        open(infile, 'wb').write(req.read())
+        content = req.read()
+        lines = content.split(sep=b'\r')
+        heading = lines.pop(0).replace(b'\n', b'', 1)
+
+        sort_dict = {}
+        for line in lines:
+            stripped = line.replace(b'\n', b'', 1)
+            items = stripped.split(b',', 3)
+            if len(stripped) == 0:
+                continue
+            OUI = items[1].decode('ascii').lower()
+            if OUI in sort_dict:
+                sort_dict[OUI].append(stripped)
+            else:
+                sort_dict[OUI] = [stripped]
+
+        with open(infile, 'wb') as f:
+            CRLF = b'\r\n'
+            f.write(heading)
+            f.write(CRLF)
+            for OUI in sorted(sort_dict.keys()):
+                items = sort_dict[OUI]
+                for item in items:
+                    f.write(item)
+                    f.write(CRLF)
+                        
         os.utime(infile, (ouitime, ouitime))
 
     return ouidate
@@ -296,4 +320,5 @@
 
 if __name__ == '__main__':
     sys.exit(main())
+# vim: ts=8 shiftwidth=8 expandtab
 

++++++ oui.csv ++++++
++++ 57347 lines (skipped)
++++ between /work/SRC/openSUSE:Factory/arpwatch-ethercodes/oui.csv
++++ and /work/SRC/openSUSE:Factory/.arpwatch-ethercodes.new.1835/oui.csv

Reply via email to