Merge lp:~gandelman-a/ubuntu/lucid/facter/lp732953_876130 into lp:ubuntu/lucid-updates/facter

Proposed by Adam Gandelman
Status: Needs review
Proposed branch: lp:~gandelman-a/ubuntu/lucid/facter/lp732953_876130
Merge into: lp:ubuntu/lucid-updates/facter
Diff against target: 51 lines (+18/-2)
3 files modified
debian/changelog (+11/-0)
lib/facter/ec2.rb (+2/-1)
lib/facter/util/collection.rb (+5/-1)
To merge this branch: bzr merge lp:~gandelman-a/ubuntu/lucid/facter/lp732953_876130
Reviewer Review Type Date Requested Status
Luke Yelavich (community) Approve
Review via email: mp+80366@code.launchpad.net

Description of the change

Rebased a previous MP on lucid-updates. Properly versioned and applied patches as per feedback from James Page on original MP:

A few comments that need resolution before we can upload:

1) The branch is currently based on 1.5.6-2ubuntu2 from the lucid release pocket; it needs to be based on 1.5.6-2ubuntu2.1 from lucid-updates - this is why the merge shows a conflict in debian/changelog

2) This package in Lucid uses an earlier version of debhelper and is source format 1.0; so patches don't get automatically applied. The correct course of action (as one patch has already be directly applied in 1.5.6-2ubuntu2.1) is to directly apply the patches to the upstream source tree. Ugly but its the most minimal change for the SRU and does not impact the update that has already been made

To post a comment you must log in.
Revision history for this message
Luke Yelavich (themuso) wrote :

Uploaded, thanks for your work.

review: Approve

Unmerged revisions

14. By Adam Gandelman

Fix series

13. By Adam Gandelman

lib/facter/util/collection.rb: Backported fix from upstream commit
2255abee7bdb9b6478ca228546e3d275dbac0ec3. Reload all facts if the
requested fact is not found. Ensures consistency after facts
have been cleared. (LP: #876130)

12. By Adam Gandelman

lib/facter/ec2.rb: Properly handle ip+port when testing connectivity
of ec2 metadata service.(LP: #732953)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-01-26 21:36:23 +0000
3+++ debian/changelog 2011-10-25 17:40:30 +0000
4@@ -1,3 +1,14 @@
5+facter (1.5.6-2ubuntu2.2) lucid-proposed; urgency=low
6+
7+ * lib/facter/ec2.rb: Properly handle ip+port when testing connectivity
8+ of ec2 metadata service.(LP: #732953)
9+ * lib/facter/util/collection.rb: Backported fix from upstream commit
10+ 2255abee7bdb9b6478ca228546e3d275dbac0ec3. Reload all facts if the
11+ requested fact is not found. Ensures consistency after facts
12+ have been cleared. (LP: #876130)
13+
14+ -- Adam Gandelman <adamg@canonical.com> Tue, 25 Oct 2011 10:28:17 -0700
15+
16 facter (1.5.6-2ubuntu2.1) lucid-proposed; urgency=low
17
18 * Cherry-picked KVM detection for 'virtual' fact from upstream commit
19
20=== modified file 'lib/facter/ec2.rb'
21--- lib/facter/ec2.rb 2009-06-30 00:21:23 +0000
22+++ lib/facter/ec2.rb 2011-10-25 17:40:30 +0000
23@@ -6,7 +6,8 @@
24 require 'timeout'
25
26 def can_connect?(ip,port,wait_sec=2)
27- Timeout::timeout(wait_sec) {open(ip, port)}
28+ url = "http://#{ip}:#{port}"
29+ Timeout::timeout(wait_sec) {open(url)}
30 return true
31 rescue
32 return false
33
34=== modified file 'lib/facter/util/collection.rb'
35--- lib/facter/util/collection.rb 2008-09-03 09:06:56 +0000
36+++ lib/facter/util/collection.rb 2011-10-25 17:40:30 +0000
37@@ -66,9 +66,13 @@
38 def fact(name)
39 name = canonize(name)
40
41+ # Try to load the fact if necessary
42 loader.load(name) unless @facts[name]
43
44- return @facts[name]
45+ # Try HARDER
46+ loader.load_all unless @facts[name]
47+
48+ @facts[name]
49 end
50
51 # Flush all cached values.

Subscribers

People subscribed via source and target branches