Patchwork [04/10] kernel: Fix packaging issue

login
register
mail settings
Submitter Saul Wold
Date April 19, 2012, 10:44 p.m.
Message ID <33d6305e28845e6fd225e76f3add810cb0aa7cad.1334875218.git.sgw@linux.intel.com>
Download mbox | patch
Permalink /patch/26175/
State New
Headers show

Comments

Saul Wold - April 19, 2012, 10:44 p.m.
Remove /etc since it is empty, when creating a machine that does not
deliver any module config files, the /etc is empty and is then warned
about not being shipped, so we remove it.

This occurs in the routerstationpro with the following warning:
WARNING: For recipe linux-yocto, the following files/directories were installed but not shipped in any package:
WARNING:   /etc

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/classes/kernel.bbclass |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
Darren Hart - April 19, 2012, 10:56 p.m.
On 04/19/2012 03:44 PM, Saul Wold wrote:
> Remove /etc since it is empty, when creating a machine that does not
> deliver any module config files, the /etc is empty and is then warned
> about not being shipped, so we remove it.
> 
> This occurs in the routerstationpro with the following warning:
> WARNING: For recipe linux-yocto, the following files/directories were installed but not shipped in any package:
> WARNING:   /etc
> 
> Signed-off-by: Saul Wold <sgw@linux.intel.com>
> ---
>  meta/classes/kernel.bbclass |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 3519e7c..19dad8e 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -464,9 +464,11 @@ python populate_packages_prepend () {
>  	# avoid warnings. removedirs only raises an OSError if an empty
>  	# directory cannot be removed.
>  	dvar = d.getVar('PKGD', True)
> -	for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
> +	for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar), "%s/etc" % (dvar)]:
>  		if len(os.listdir(dir)) == 0:
>  			os.rmdir(dir)
> +	if len(os.listdir("%s/etc" % (dvar))) == 0:
> +		os.rmdir("%s/etc" % (dvar))

This second test is redundant now that %s/etc is in the "for dir in ...
" line.
Saul Wold - April 19, 2012, 10:58 p.m.
On 04/19/2012 03:44 PM, Saul Wold wrote:
> Remove /etc since it is empty, when creating a machine that does not
> deliver any module config files, the /etc is empty and is then warned
> about not being shipped, so we remove it.
>
> This occurs in the routerstationpro with the following warning:
> WARNING: For recipe linux-yocto, the following files/directories were installed but not shipped in any package:
> WARNING:   /etc
>
> Signed-off-by: Saul Wold<sgw@linux.intel.com>
> ---
>   meta/classes/kernel.bbclass |    4 +++-
>   1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
> index 3519e7c..19dad8e 100644
> --- a/meta/classes/kernel.bbclass
> +++ b/meta/classes/kernel.bbclass
> @@ -464,9 +464,11 @@ python populate_packages_prepend () {
>   	# avoid warnings. removedirs only raises an OSError if an empty
>   	# directory cannot be removed.
>   	dvar = d.getVar('PKGD', True)
> -	for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
> +	for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar), "%s/etc" % (dvar)]:
>   		if len(os.listdir(dir)) == 0:
>   			os.rmdir(dir)
> +	if len(os.listdir("%s/etc" % (dvar))) == 0:
> +		os.rmdir("%s/etc" % (dvar))
>
>   	import re
>   	metapkg = "kernel-modules"
Looks like I grapped the wrong version somehow, will be fixed in the branch!

Sau!

Patch

diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 3519e7c..19dad8e 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -464,9 +464,11 @@  python populate_packages_prepend () {
 	# avoid warnings. removedirs only raises an OSError if an empty
 	# directory cannot be removed.
 	dvar = d.getVar('PKGD', True)
-	for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar)]:
+	for dir in ["%s/etc/modprobe.d" % (dvar), "%s/etc/modules-load.d" % (dvar), "%s/etc" % (dvar)]:
 		if len(os.listdir(dir)) == 0:
 			os.rmdir(dir)
+	if len(os.listdir("%s/etc" % (dvar))) == 0:
+		os.rmdir("%s/etc" % (dvar))
 
 	import re
 	metapkg = "kernel-modules"