[gnome-continuous-yocto/gnomeostree-3.28-rocko: 2744/8267] dev-manual: Updated the example to identify GPL files.



commit b064c34f12877e0e5ec9d9633b684cf0e218aa60
Author: Scott Rifenbark <srifenbark gmail com>
Date:   Mon Sep 26 08:51:42 2016 -0700

    dev-manual: Updated the example to identify GPL files.
    
    Fixes [YOCTO #10323]
    
    In the Providing the Source Code section, I replaced the 3-line
    code example that returns GPL files.  The bits I put in are a
    script that does the trick.  The 3-line example was not working.
    
    (From yocto-docs rev: a07873d46b5135555961499c6ce8f0b6b8bf2c8f)
    
    Signed-off-by: Scott Rifenbark <srifenbark gmail com>
    Signed-off-by: Richard Purdie <richard purdie linuxfoundation org>

 .../dev-manual/dev-manual-common-tasks.xml         |   29 ++++++++++++++++---
 1 files changed, 24 insertions(+), 5 deletions(-)
---
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml 
b/documentation/dev-manual/dev-manual-common-tasks.xml
index 4cdd805..f846dac 100644
--- a/documentation/dev-manual/dev-manual-common-tasks.xml
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -10591,12 +10591,31 @@
                 tarballs for licenses that require the release of
                 source.
                 Let us assume you are only concerned with GPL code as
-                identified with the following:
+                identified by running the following script:
                 <literallayout class='monospaced'>
-     $ cd poky/build/tmp/deploy/sources
-     $ mkdir ~/gpl_source_release
-     $ for dir in */*GPL*; do cp -r $dir ~/gpl_source_release; done
-                </literallayout>
+     # Script to archive a subset of packages matching specific license(s)
+     # Source and license files are copied into sub folders of package folder
+     # Must be run from build folder
+     #!/bin/bash
+     src_release_dir="source-release"
+     mkdir -p $src_release_dir
+     for a in tmp/deploy/sources/*; do
+        for d in $a/*; do
+           # Get package name from path
+           p=`basename $d`
+           p=${p%-*}
+           p=${p%-*}
+           # Only archive GPL packages (update *GPL* regex for your license check)
+           numfiles=`ls tmp/deploy/licenses/$p/*GPL* 2> /dev/null | wc -l`
+           if [ $numfiles -gt 1 ]; then
+              echo Archiving $p
+              mkdir -p $src_release_dir/$p/source
+              cp $d/* $src_release_dir/$p/source 2> /dev/null
+              mkdir -p $src_release_dir/$p/license
+              cp tmp/deploy/licenses/$p/* source-release/$p/license 2> /dev/null
+           fi
+        done
+     done                </literallayout>
                 At this point, you could create a tarball from the
                 <filename>gpl_source_release</filename> directory and
                 provide that to the end user.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]