Skip to contentSkip to conversation

Fix i2c-tools SRCURI syntax

PATCH In review Rick Altherr 2 participants 7 messages May 26, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Fix i2c-tools SRCURI syntax

Override syntax (FOO_append, FOO_prepend) doesn't insert spaces to separate the append from the original value. This caused the two URIs to be incorrectly merged into one and caused a download failure. It happens that the fallback in that case is to use the Yocto mirror so it kept working other than emitting a warning. Using =+ prepend syntax correctly adds the separating space.

Change-Id I36f48cb53aa29ea9a4bde738c975784f6ce24250
---
 meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend +2 -1
index bdbdc67..599394d 100644
@@ -1,4 +1,5 @@
+# Prefer the Yocto mirror over the direct lm-sensors download.
 SRC_URI_remove = "http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2"
-SRC_URI_prepend = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2"
+SRC_URI =+ "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2"
 
 RDEPENDS_${PN}_remove = "${PN}-misc"
Signature · 1 line
2.8.0.rc3.226.g39d4020
Reviewed-by on v1 1/1
#1 lore raw

Hi Rick,

Thanks for the patch. I've reproduced the warning* and tested the fix. As an aside, the commit message introducing the .bbappend was pretty terse, I assume the reason for switching the SRC_URI is that {www,dl}.lm-sensors.org seem to be unreachable.

Separately, the means to contribute to OpenBMC is a bit fragmented at the moment, and there are ongoing discussions about how to manage it. As it stands for the openbmc/openbmc repository, pull-requests are the preferred approach. More generally, for projects that are OpenBMC- specific pull-requests are preferred**, but for contributions to our forks of other projects the upstream workflow is preferred. So for u- boot, the kernel and qemu, sending patches to the list is the way to go.

* The warning was:
WARNING: Failed to fetch URL http://downloads.yoctoproject.org/mirror/sources/i2c-tools-3.1.2.tar.bz2http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-3.1.2.tar.bz2, attempting MIRRORS if available

** Though the word is the OpenBMC repos will be using Gerrit shortly

Quoted 9 lines · Rick Altherr

Override syntax (FOO_append, FOO_prepend) doesn't insert spaces to separate the append from the original value.  This caused the two URIs to be incorrectly merged into one and caused a download failure.  It happens that the fallback in that case is to use the Yocto mirror so it kept working other than emitting a warning.  Using =+ prepend syntax correctly adds the separating space.

Change-Id I36f48cb53aa29ea9a4bde738c975784f6ce24250

Cheers,

Andrew

Quoted 15 lines

---
 meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend | 3 ++-

 1 file changed, 2 insertions(+), 1 deletion(-)
meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend +1 -0
index bdbdc67..599394d 100644
@@ -1,4 +1,5 @@
+# Prefer the Yocto mirror over the direct lm-sensors download.

 SRC_URI_remove = "http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2"

meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend +1 -1
-SRC_URI_prepend = "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2"
+SRC_URI =+ "http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2"


 RDEPENDS_${PN}_remove = "${PN}-misc"

#2 lore raw

Thanks Andrew. https://github.com/openbmc/docs/blob/master/contributing.md
wasn't really clear on what was preferred. I'll pass along your explanation to the rest of the Google team.

Quoted 64 lines · Andrew Jeffery

Hi Rick,

Thanks for the patch. I've reproduced the warning* and tested the fix. As an aside, the commit message introducing the .bbappend was pretty terse, I assume the reason for switching the SRC_URI is that {www,dl}.lm-sensors.org seem to be unreachable.

Separately, the means to contribute to OpenBMC is a bit fragmented at the moment, and there are ongoing discussions about how to manage it. As it stands for the openbmc/openbmc repository, pull-requests are the preferred approach. More generally, for projects that are OpenBMC- specific pull-requests are preferred**, but for contributions to our forks of other projects the upstream workflow is preferred. So for u- boot, the kernel and qemu, sending patches to the list is the way to go.

* The warning was:
WARNING: Failed to fetch URL
http://downloads.yoctoproject.org/mirror/sources/i2c-tools-3.1.2.tar.bz2http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-3.1.2.tar.bz2,
attempting MIRRORS if available

** Though the word is the OpenBMC repos will be using Gerrit shortly

Quoted 9 lines · Rick Altherr

Override syntax (FOO_append, FOO_prepend) doesn't insert spaces to separate the append from the original value. This caused the two URIs to be incorrectly merged into one and caused a download failure. It happens that the fallback in that case is to use the Yocto mirror so it kept working other than emitting a warning. Using =+ prepend syntax correctly adds the separating space.

Change-Id I36f48cb53aa29ea9a4bde738c975784f6ce24250

Cheers,

Andrew

Quoted 2 lines

---
meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend |

3 ++-

Quoted 3 lines
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git

a/meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend b/meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend

Quoted 2 lines

index bdbdc67..599394d 100644
---

a/meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend

Quoted 1 line

+++

b/meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend

Review line 2

Quoted 3 lines
(quoted diff) +1 -0
@@ -1,4 +1,5 @@
+# Prefer the Yocto mirror over the direct lm-sensors download.
 SRC_URI_remove = "

http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2"

Review line 2

Quoted 1 line
(quoted diff) +0 -1
-SRC_URI_prepend = "

http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2"

Review line 3

Quoted 1 line
(quoted diff) +1 -0
+SRC_URI =+ "

http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2"

Quoted 2 lines
meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend +0 -0
 RDEPENDS_${PN}_remove = "${PN}-misc"
#4 lore raw
In reply to Andrew Jeffery

Shall I resend this patch as a pull request?

Quoted 64 lines · Andrew Jeffery

Hi Rick,

Thanks for the patch. I've reproduced the warning* and tested the fix. As an aside, the commit message introducing the .bbappend was pretty terse, I assume the reason for switching the SRC_URI is that {www,dl}.lm-sensors.org seem to be unreachable.

Separately, the means to contribute to OpenBMC is a bit fragmented at the moment, and there are ongoing discussions about how to manage it. As it stands for the openbmc/openbmc repository, pull-requests are the preferred approach. More generally, for projects that are OpenBMC- specific pull-requests are preferred**, but for contributions to our forks of other projects the upstream workflow is preferred. So for u- boot, the kernel and qemu, sending patches to the list is the way to go.

* The warning was:
WARNING: Failed to fetch URL
http://downloads.yoctoproject.org/mirror/sources/i2c-tools-3.1.2.tar.bz2http://dl.lm-sensors.org/i2c-tools/releases/i2c-tools-3.1.2.tar.bz2,
attempting MIRRORS if available

** Though the word is the OpenBMC repos will be using Gerrit shortly

Quoted 9 lines · Rick Altherr

Override syntax (FOO_append, FOO_prepend) doesn't insert spaces to separate the append from the original value. This caused the two URIs to be incorrectly merged into one and caused a download failure. It happens that the fallback in that case is to use the Yocto mirror so it kept working other than emitting a warning. Using =+ prepend syntax correctly adds the separating space.

Change-Id I36f48cb53aa29ea9a4bde738c975784f6ce24250

Cheers,

Andrew

Quoted 2 lines

---
meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend |

3 ++-

Quoted 3 lines
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git

a/meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend b/meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend

Quoted 2 lines

index bdbdc67..599394d 100644
---

a/meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend

Quoted 1 line

+++

b/meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend

Review line 2

Quoted 3 lines
(quoted diff) +1 -0
@@ -1,4 +1,5 @@
+# Prefer the Yocto mirror over the direct lm-sensors download.
 SRC_URI_remove = "

http://dl.lm-sensors.org/i2c-tools/releases/${BP}.tar.bz2"

Review line 2

Quoted 1 line
(quoted diff) +0 -1
-SRC_URI_prepend = "

http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2"

Review line 3

Quoted 1 line
(quoted diff) +1 -0
+SRC_URI =+ "

http://downloads.yoctoproject.org/mirror/sources/${BP}.tar.bz2"

Quoted 2 lines
meta-phosphor/common/recipes-devtools/i2c-tools/i2c-tools_%.bbappend +0 -0
 RDEPENDS_${PN}_remove = "${PN}-misc"
#5 lore raw

Hi Rick,

Quoted 1 line · Rick Altherr

Shall I resend this patch as a pull request?

That's probably the best thing to do if it's not too much fuss for you. Either Patrick or Norm (both CC'ed now) will merge it, so maybe they can weigh in?

Andrew

#6 lore raw

Not a big deal.

Quoted 10 lines · Andrew Jeffery

Hi Rick,

Quoted 1 line · Rick Altherr

Shall I resend this patch as a pull request?

That's probably the best thing to do if it's not too much fuss for you. Either Patrick or Norm (both CC'ed now) will merge it, so maybe they can weigh in?

Andrew