From noreply at rubyforge.org Mon Jul 14 23:56:20 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 14 Jul 2008 23:56:20 -0400 (EDT) Subject: [ap4r-devel] [ ap4r-Patches-21225 ] Patch for uuid to run under AIX Message-ID: <20080715035620.B84C118581B8@rubyforge.org> Patches item #21225, was opened at 2008-07-15 12:56 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=6912&aid=21225&group_id=1765 Category: UUID Group: None Status: Open Resolution: None Priority: 3 Submitted By: shunichi shinohara (shino) Assigned to: Nobody (None) Summary: Patch for uuid to run under AIX Initial Comment: recently had occasion to install your uuid GEM on an AIX system. I had a problem due to the fact that AIX does not put a MAC address in the output of "ifconfig". It does put MAC addresses in the output of "netstat -v". I modified the code in the following way, and uuid now works on AIX. I have tested this on both AIX 5.3 and AIX 6.1, but all versions of AIX I have worked with would have the same issue. ifconfig has never reported a MAC address, and netstat -v always has. # Run ifconfig for UNIX, or ipconfig for Windows. config = "" Kernel.open "|ifconfig" do |input| input.each_line { |line| config << line } end rescue nil Kernel.open "|netstat -v" do |input| # AIX input.each_line { |line| config << line } # AIX end rescue nil # AIX Kernel.open "|ipconfig /all" do |input| input.each_line { |line| config << line } end rescue nil ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=6912&aid=21225&group_id=1765 From noreply at rubyforge.org Mon Jul 14 23:58:51 2008 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 14 Jul 2008 23:58:51 -0400 (EDT) Subject: [ap4r-devel] [ ap4r-Bugs-21226 ] UUID bugs: last_clock Message-ID: <20080715035851.E550F18581B8@rubyforge.org> Bugs item #21226, was opened at 2008-07-15 12:58 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=6910&aid=21226&group_id=1765 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: shunichi shinohara (shino) Assigned to: Nobody (None) Summary: UUID bugs: last_clock Initial Comment: I'm looking at your UUID class http://trac.labnotes.org/cgi-bin/trac.cgi/browser/uuid/lib/uuid.rb and am puzzled by two things: * line 202 you have "elsif clock = @@last_clock", that's an assignment that will always evaluate to true as far as I can tell * if you change 202 to ==, then the combination of 205 incrementing @@last_clock by 1 and the masking of the lower-order bits of the time in line 198 will make it that the next time you generate a UUID withing the same clock tick the clock is less than @@last_clock, which is not what you intend. I'll see how I can fix this on my end. Thanks for making your class available! ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=6910&aid=21226&group_id=1765