All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] bitbake 1.42 next patch review
@ 2019-05-14  4:40 Armin Kuster
  2019-05-14  4:40 ` [PATCH 1/2] toaster: update to Warrior Armin Kuster
  2019-05-14  4:40 ` [PATCH 2/2] bitbake: fetch2/git: git-lfs check Armin Kuster
  0 siblings, 2 replies; 3+ messages in thread
From: Armin Kuster @ 2019-05-14  4:40 UTC (permalink / raw)
  To: bitbake-devel

Please review these changes for the next 1.42 update

The following changes since commit cd8d4ec8ec6650b756dafe750436528f736b3938:

  bitbake-user-manual: Added section on modifying variables (2019-04-23 16:33:48 +0100)

are available in the git repository at:

  git://git.openembedded.org/bitbake-contrib stable/1.42-nmut
  http://cgit.openembedded.org/bitbake-contrib /log/?h=stable/1.42-nmut

David Reyna (1):
  toaster: update to Warrior

Naveen Saini (1):
  bitbake: fetch2/git: git-lfs check

 lib/bb/fetch2/git.py                 | 25 +++++++++++++++++++++++++
 lib/toaster/orm/fixtures/oe-core.xml | 12 ++++++------
 lib/toaster/orm/fixtures/poky.xml    | 18 +++++++++---------
 3 files changed, 40 insertions(+), 15 deletions(-)

-- 
2.7.4



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] toaster: update to Warrior
  2019-05-14  4:40 [PATCH 0/2] bitbake 1.42 next patch review Armin Kuster
@ 2019-05-14  4:40 ` Armin Kuster
  2019-05-14  4:40 ` [PATCH 2/2] bitbake: fetch2/git: git-lfs check Armin Kuster
  1 sibling, 0 replies; 3+ messages in thread
From: Armin Kuster @ 2019-05-14  4:40 UTC (permalink / raw)
  To: bitbake-devel

From: David Reyna <David.Reyna@windriver.com>

Update the fixture files to add Warrior and remove Sumo.

[YOCTO #13287]

Signed-off-by: David Reyna <David.Reyna@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 lib/toaster/orm/fixtures/oe-core.xml | 12 ++++++------
 lib/toaster/orm/fixtures/poky.xml    | 18 +++++++++---------
 2 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/lib/toaster/orm/fixtures/oe-core.xml b/lib/toaster/orm/fixtures/oe-core.xml
index a37c664..bd9c3268 100644
--- a/lib/toaster/orm/fixtures/oe-core.xml
+++ b/lib/toaster/orm/fixtures/oe-core.xml
@@ -8,9 +8,9 @@
 
   <!-- Bitbake versions which correspond to the metadata release -->
   <object model="orm.bitbakeversion" pk="1">
-    <field type="CharField" name="name">sumo</field>
+    <field type="CharField" name="name">warrior</field>
     <field type="CharField" name="giturl">git://git.openembedded.org/bitbake</field>
-    <field type="CharField" name="branch">1.38</field>
+    <field type="CharField" name="branch">1.42</field>
   </object>
   <object model="orm.bitbakeversion" pk="2">
     <field type="CharField" name="name">HEAD</field>
@@ -30,11 +30,11 @@
 
   <!-- Releases available -->
   <object model="orm.release" pk="1">
-    <field type="CharField" name="name">sumo</field>
-    <field type="CharField" name="description">Openembedded Sumo</field>
+    <field type="CharField" name="name">warrior</field>
+    <field type="CharField" name="description">Openembedded Warrior</field>
     <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
-    <field type="CharField" name="branch_name">sumo</field>
-    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=sumo\"&gt;OpenEmbedded Sumo&lt;/a&gt; branch.</field>
+    <field type="CharField" name="branch_name">warrior</field>
+    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href=\"http://cgit.openembedded.org/openembedded-core/log/?h=warrior\"&gt;OpenEmbedded Warrior&lt;/a&gt; branch.</field>
   </object>
   <object model="orm.release" pk="2">
     <field type="CharField" name="name">local</field>
diff --git a/lib/toaster/orm/fixtures/poky.xml b/lib/toaster/orm/fixtures/poky.xml
index 482efaf..4162e4f 100644
--- a/lib/toaster/orm/fixtures/poky.xml
+++ b/lib/toaster/orm/fixtures/poky.xml
@@ -8,9 +8,9 @@
 
   <!-- Bitbake versions which correspond to the metadata release -->
   <object model="orm.bitbakeversion" pk="1">
-    <field type="CharField" name="name">sumo</field>
+    <field type="CharField" name="name">warrior</field>
     <field type="CharField" name="giturl">git://git.yoctoproject.org/poky</field>
-    <field type="CharField" name="branch">sumo</field>
+    <field type="CharField" name="branch">warrior</field>
     <field type="CharField" name="dirpath">bitbake</field>
   </object>
   <object model="orm.bitbakeversion" pk="2">
@@ -35,11 +35,11 @@
 
   <!-- Releases available -->
   <object model="orm.release" pk="1">
-    <field type="CharField" name="name">sumo</field>
-    <field type="CharField" name="description">Yocto Project 2.5 "Sumo"</field>
+    <field type="CharField" name="name">warrior</field>
+    <field type="CharField" name="description">Yocto Project 2.7 "Warrior"</field>
     <field rel="ManyToOneRel" to="orm.bitbakeversion" name="bitbake_version">1</field>
-    <field type="CharField" name="branch_name">sumo</field>
-    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=sumo"&gt;Yocto Project Sumo branch&lt;/a&gt;.</field>
+    <field type="CharField" name="branch_name">warrior</field>
+    <field type="TextField" name="helptext">Toaster will run your builds using the tip of the &lt;a href="http://git.yoctoproject.org/cgit/cgit.cgi/poky/log/?h=warrior"&gt;Yocto Project Warrior branch&lt;/a&gt;.</field>
   </object>
   <object model="orm.release" pk="2">
     <field type="CharField" name="name">local</field>
@@ -130,7 +130,7 @@
     <field rel="ManyToOneRel" to="orm.layer" name="layer">1</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">1</field>
-    <field type="CharField" name="branch">sumo</field>
+    <field type="CharField" name="branch">warrior</field>
     <field type="CharField" name="dirpath">meta</field>
   </object>
   <object model="orm.layer_version" pk="2">
@@ -168,7 +168,7 @@
     <field rel="ManyToOneRel" to="orm.layer" name="layer">2</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">1</field>
-    <field type="CharField" name="branch">sumo</field>
+    <field type="CharField" name="branch">warrior</field>
     <field type="CharField" name="dirpath">meta-poky</field>
   </object>
   <object model="orm.layer_version" pk="6">
@@ -206,7 +206,7 @@
     <field rel="ManyToOneRel" to="orm.layer" name="layer">3</field>
     <field type="IntegerField" name="layer_source">0</field>
     <field rel="ManyToOneRel" to="orm.release" name="release">1</field>
-    <field type="CharField" name="branch">sumo</field>
+    <field type="CharField" name="branch">warrior</field>
     <field type="CharField" name="dirpath">meta-yocto-bsp</field>
   </object>
   <object model="orm.layer_version" pk="10">
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] bitbake: fetch2/git: git-lfs check
  2019-05-14  4:40 [PATCH 0/2] bitbake 1.42 next patch review Armin Kuster
  2019-05-14  4:40 ` [PATCH 1/2] toaster: update to Warrior Armin Kuster
@ 2019-05-14  4:40 ` Armin Kuster
  1 sibling, 0 replies; 3+ messages in thread
From: Armin Kuster @ 2019-05-14  4:40 UTC (permalink / raw)
  To: bitbake-devel

From: Naveen Saini <naveen.kumar.saini@intel.com>

Build will fail if repository has lfs contents in absense of git-lfs tool on host.
Build will pass if repository may or may not contains lfs content if host has git-lfs installed.

[YOCTO #13198]

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
---
 lib/bb/fetch2/git.py | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py
index 8185bf4..c69d25c 100644
--- a/lib/bb/fetch2/git.py
+++ b/lib/bb/fetch2/git.py
@@ -503,6 +503,17 @@ class Git(FetchMethod):
 
         repourl = self._get_repo_url(ud)
         runfetchcmd("%s remote set-url origin %s" % (ud.basecmd, repourl), d, workdir=destdir)
+
+        if self._contains_lfs(ud, d, destdir):
+            path = d.getVar('PATH')
+            if path:
+                gitlfstool = bb.utils.which(path, "git-lfs", executable=True)
+                if not gitlfstool:
+                    raise bb.fetch2.FetchError("Repository %s has lfs content, install git-lfs plugin on host to download" % (repourl))
+            else:
+                bb.note("Could not find 'PATH'")
+
+
         if not ud.nocheckout:
             if subdir != "":
                 runfetchcmd("%s read-tree %s%s" % (ud.basecmd, ud.revisions[ud.names[0]], readpathspec), d,
@@ -553,6 +564,20 @@ class Git(FetchMethod):
             raise bb.fetch2.FetchError("The command '%s' gave output with more then 1 line unexpectedly, output: '%s'" % (cmd, output))
         return output.split()[0] != "0"
 
+    def _contains_lfs(self, ud, d, wd):
+        """
+        Check if the repository has 'lfs' (large file) content
+        """
+        cmd = "%s grep lfs HEAD:.gitattributes | wc -l" % (
+                ud.basecmd)
+        try:
+            output = runfetchcmd(cmd, d, quiet=True, workdir=wd)
+            if int(output) > 0:
+                return True
+        except (bb.fetch2.FetchError,ValueError):
+            pass
+        return False
+
     def _get_repo_url(self, ud):
         """
         Return the repository URL
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-14  4:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-14  4:40 [PATCH 0/2] bitbake 1.42 next patch review Armin Kuster
2019-05-14  4:40 ` [PATCH 1/2] toaster: update to Warrior Armin Kuster
2019-05-14  4:40 ` [PATCH 2/2] bitbake: fetch2/git: git-lfs check Armin Kuster

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.