[OE-core] [PATCH 1/3] package_ipk: check CONFFILES exist before adding them to metadata

Martin Jansa martin.jansa at gmail.com
Thu Feb 14 18:31:14 UTC 2013


On Thu, Feb 14, 2013 at 05:52:50PM +0000, Ross Burton wrote:
> opkg-build verifies that conffiles exist, so verify that the specified files
> actually exist before writing them to conffiles.

Shouldn't this show at least a warning about missing conffile?

opkg-build error saved me few times before adding CONFFILES with wrong
pattern not matching anything in FILES.

I understand that you cannot use fatal error here for that xorg.conf
use-case, but warning would be nice.

> This mirrors the behaviour of FILES and package_rpm's CONFFILES handling.

 
> Signed-off-by: Ross Burton <ross.burton at intel.com>
> ---
>  meta/classes/package_ipk.bbclass |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/classes/package_ipk.bbclass b/meta/classes/package_ipk.bbclass
> index d735051..e5e76ef 100644
> --- a/meta/classes/package_ipk.bbclass
> +++ b/meta/classes/package_ipk.bbclass
> @@ -440,7 +440,8 @@ python do_package_ipk () {
>                  bb.utils.unlockfile(lf)
>                  raise bb.build.FuncFailed("unable to open conffiles for writing.")
>              for f in conffiles_str.split():
> -                conffiles.write('%s\n' % f)
> +                if os.path.exists(oe.path.join(root, f)):
> +                    conffiles.write('%s\n' % f)
>              conffiles.close()
>  
>          os.chdir(basedir)
> -- 
> 1.7.10.4
> 
> 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20130214/39c8386b/attachment-0002.sig>


More information about the Openembedded-core mailing list