Skip to contentSkip to conversation

archiver: fix truncation of src_rev

PATCH New Joe Slater 1 participant 1 message Oct 16, 2014

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 archiver: fix truncation of src_rev

In trying to eliminate AUTOINC+ from revision strings, we accidently truncated the strings to almost guarantee information from SRCREV_FORMAT, when supplied, would be lost. So, we now only delete any AUTOINC+'s from the string.

---
 meta/classes/archiver.bbclass |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
meta/classes/archiver.bbclass +2 -2
index 058ba63..b598aa3 100644
@@ -146,9 +146,9 @@ python do_ar_original() {
             fetch.unpack(tmpdir, (url,))
 
             os.chdir(tmpdir)
-            # We split on '+' to chuck any annoying AUTOINC+ in the revision.
+            # We eliminate any AUTOINC+ in the revision.
             try:
-                src_rev = bb.fetch2.get_srcrev(d).split('+')[-1][:10]
+                src_rev = bb.fetch2.get_srcrev(d).replace('AUTOINC+','')
             except:
                 src_rev = 'NOREV'
             tarname = os.path.join(ar_outdir, basename + '.' + src_rev + '.tar.gz')
Signature · 1 line
1.7.3.4