Re: [yocto] who are using archlinux?

2012-03-29 Thread Giannis Damigos
Hi,

I had similar errors building an OE image for my Micro2440 board under
archlinux x86-64. I solved the problem by installing gcc-multlib
(https://wiki.archlinux.org/index.php/Arch64_FAQ#Multilib_Repository_-_Multilib_Project).

But, I tried to bake gconf with yocto just adding MACHINE and DISTRO
to my local.conf:
MACHINE ?= qemux86-64
DISTRO ?= poky-lsb

and I had the same error.

On Thu, Mar 29, 2012 at 5:05 AM, Ni Qingliang
niqingli...@insigma.com.cn wrote:

 Oh, I lost something, before running the testgconf.sh, you should
 cleanall gconf, and build gconf. If not, you can't run it.

 On Thu, 2012-03-29 at 09:52 +0800, 倪庆亮 wrote:
  what the custom script has done is only adding the build dir (which
  include the 'python' symlink) into the 'PATH', only that.
  AND: integrate the oe-init-build-env and bitbake together.
  indeed, no modification.
 
  using it, I can build anything with one command (call the script),
  without it, I must call init env script manually.
 
  archlinux: latest
  poky: latest
  build: clean ( 4times)
 
  indeed, the possibility you mentioned has been excluded by my test.
  you can build it succcessfully. what arch of arch you are using? x86 or
  x86-64? what about the local.conf? are you using the same as mine?.
 
  both of them from my side is x86-64.
 
  I doubt 'ld', only because of my test. the attachment 'testgconf.sh'
  contain the root cause of the problem. and I attached the local.conf I
  have used, just remove the 'SOURCE_MIRROR_URL' if test it.
 
  you can run it to check the output, before that, you should change the
  two var in the head of it:
  POKY_DIR=/media/pangu/optimus
  COMPILE_DIR=/media/pangu/lsbt
 
  in it, the modification I have done (modify 'PATH') has been removed.
 
  maybe you can run it success, but you can check the 'libXrandr.so.2'
  line in the output, if it like:
  found libXrandr.so.2 at /usr/lib/../lib/libXrandr.so.2
 
  that is the problem, even you success, it has problem.
  you can paste your output in the email. let's check it.
  the version of libxrandr on my host is 1.3.2-2.
 
 
  On Wed, 2012-03-28 at 18:06 +0800, Jack Mitchell wrote:
   On 28/03/12 10:21, Ni Qingliang wrote:
no echo again?
   
what's the problem?
   
am I wrong? where?
   
On Tue, 2012-03-27 at 18:09 +0800, 倪庆亮 wrote:
thanks your reply, indeed, this is not the first email thread about
the
gconf compile problem. it in there only because of no echo.
   
I have installed python2, and made a symlink in the build
directory, and
exported to the env var PATH.
   
this is the script I used to build (located in the build
directory):
 #!/bin/bash
 loc_dir=`pwd`
 . ${loc_dir}/../optimus/oe-init-build-env ${loc_dir}
 export PATH=${loc_dir}:$PATH
 bitbake $@
   
OS: x86-64 arch / desktop env: gnome 3.2
local.conf ( modified section ):
 MACHINE ??= qemux86-64
 DISTRO ?= poky-lsb
 SOURCE_MIRROR_URL = http://10.10.20.149/optimussources/;
 INHERIT += own-mirrors
 BB_GENERATE_MIRROR_TARBALLS = 0
 INHERIT += rm_work
 CCACHE = 
   
when build gconf, got error:
  /usr/lib/../lib/libXrandr.so.2: undefined reference to
`memcpy@GLIBC_2.14'
when 'do_compile' at sanity-check step.
   
the log of do_compile is attached, here is the last cmd (only
reserve
rpath):
 ../x86_64-poky-linux-libtool ...  -Wl,-rpath -Wl,/usr/lib/../lib
   
the libXrandr.so.2 (depended by the libgtk/libgdk) not appear in
the
command explicitly.
   
I have add --verbose in the command, and found the ld find it in
the
host's rootfs, but it should search it in the sysroot arg.
   
If remove the rpath arg or with the rpath arg prefixed by sysroot
arg, I
can build success. (wich will search the libXrandr in the sysroot
arg
correctly)
   
so I think the error is focused on the `ld' which should search in
the
sysroot arg at first for implicit dependended libs, but not host's
rootfs.
   
   
   
On Tue, 2012-03-27 at 16:49 +0800, Jack Mitchell wrote:
On 27/03/12 03:33, Ni Qingliang wrote:
who are using archlinux? I want to talk about gconf compile fail
problem.
   
   
I use Archlinux for OE/Yocto, could you post your error so we can
get an
idea of the problem you are having?
   
One note for Archlinux is that it ships Python 3 as default, to
you must
install Python2 from the repositories then symlink python2 to
python in
/usb/bin.
   
Regards,
   
  
   I'm not 100% sure what the issue is. How come you are using a custom
   build script and not the one bundled with OE? I'm not an expert by any
   stretch of the imagination but by not using the given initialisation
   scripts leaves me completely out of ideas as you're running a custom
   setup which I couldn't possibly know the extent of.
  
   All I can really comment on is that Yocto builds fine and consistently
   with 

[yocto] [opkg-utils][PATCH 0/5] Import patches from oe-core

2012-03-29 Thread Martin Jansa
The following changes since commit 002d29bc605d7c2d02e4cf20a43c5277c15f5597:

  [opkg-utils] fix install fail problem  Thanks for khorben's patch :-)  
https://docs.openmoko.org/trac/attachment/ticket/2072/patch-opkg-utils_Makefile_install_path.diff
 (2008-11-03 03:59:59 +)

are available in the git repository at:
  git://github.com/shr-project/opkg-utils jansa/pull
  https://github.com/shr-project/opkg-utils/tree/jansa/pull

Christopher Larson (1):
  Use python via the PATH, rather than hardcoding /usr/bin/python

Enrico Scholz (1):
  opkg-make-index: convert mtime to int before comparing it

Khem Raj (1):
  opkg.py: Add knowledge about License field in ipk headers

Richard Purdie (1):
  opkg-make-index: don't error out when some package disappears

Scott Anderson (1):
  arfile.py: handle six digit UIDs

 arfile.py |7 ++-
 opkg-list-fields  |2 +-
 opkg-make-index   |   29 ++---
 opkg-show-deps|2 +-
 opkg-unbuild  |2 +-
 opkg-update-index |2 +-
 opkg.py   |8 
 7 files changed, 44 insertions(+), 8 deletions(-)

-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 1/5] opkg-make-index: don't error out when some package disappears

2012-03-29 Thread Martin Jansa
From: Richard Purdie richard.pur...@linuxfoundation.org

* If we're building an image and some package rebuilds while this is
  happening some package can be removed/added to the ipk deploy
  directory. The image will not depend on this package so we can
  safely ignore these cases rather than error out.

Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-make-index |   25 -
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index ae829e6..2f1ae17 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -96,6 +96,7 @@ if (verbose):
 files=glob(pkg_dir + '/*.opk') + glob(pkg_dir + '/*.deb') + glob(pkg_dir + 
'/*.ipk')
 files.sort()
 for filename in files:
+  try:
  basename = os.path.basename(filename)
  pkg = None
  fnameStat = os.stat(filename)
@@ -130,6 +131,12 @@ for filename in files:
to_morgue(basename)
   if opt_s:
print filename
+  except OSError:
+  sys.stderr.write(Package %s disappeared on us!\n % (filename))
+  continue
+  except IOError:
+  sys.stderr.write(Package %s disappeared on us!\n % (filename))
+  continue
 
 pkgsStampsFile = open(stamplist_filename, w)
 for f in pkgsStamps.keys():
@@ -148,6 +155,7 @@ if packages_filename:
 names = packages.packages.keys()
 names.sort()
 for name in names:
+  try:
  pkg = packages.packages[name]
  if locales_dir and pkg.depends:
  depends = string.split(pkg.depends, ',')
@@ -165,6 +173,13 @@ for name in names:
  if (verbose):
   sys.stderr.write(Writing info for package %s\n % (pkg.package,))
  print pkg
+  except OSError:
+  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  continue
+  except IOError:
+  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  continue
+
 if packages_filename:
  sys.stdout.close()
  sys.stdout = old_stdout
@@ -182,7 +197,15 @@ files = {}
 names = packages.packages.keys()
 names.sort()
 for name in names:
- for fn in packages[name].get_file_list():
+ try:
+  fnlist = packages[name].get_file_list()
+ except OSError, e:
+  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  continue
+ except IOError, e:
+  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  continue
+ for fn in fnlist:
   (h,t) = os.path.split(fn)
   if not t: continue
   if not files.has_key(t): files[t] = name+':'+fn
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 2/5] opkg-make-index: convert mtime to int before comparing it

2012-03-29 Thread Martin Jansa
From: Enrico Scholz enrico.sch...@sigma-chemnitz.de

* The st_mtime attribute (which is a float) is compared against a value
  from the timestamp database, which was stored as an integer there.

* When working on a filesystem with precise timestamps the comparision
  will fail nearly everytime hence.

* Although it might be possible to enhance the database to store the
  fractional part too, this will complicate things more than we would
  gain by this change.

Signed-off-by: Enrico Scholz enrico.sch...@sigma-chemnitz.de
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-make-index |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index 2f1ae17..dc98c63 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -101,7 +101,7 @@ for filename in files:
  pkg = None
  fnameStat = os.stat(filename)
  if old_pkg_hash.has_key(basename):
-  if pkgsStamps.has_key(basename) and fnameStat.st_mtime == 
pkgsStamps[basename]:
+  if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == 
pkgsStamps[basename]:
 if (verbose):
sys.stderr.write(Found %s in Packages\n % (filename,))
 pkg = old_pkg_hash[basename]
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 4/5] arfile.py: handle six digit UIDs

2012-03-29 Thread Martin Jansa
From: Scott Anderson o...@saaworld.com

* Essentially, the problem is that arfile.py is splitting the ar header with
  white-space instead of fixed-width fields, so two fields would get treated
  as a single field.  This makes things better than before as it now honors
  the fixed field widths.

Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 arfile.py |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arfile.py b/arfile.py
index 22548af..8291a2d 100644
--- a/arfile.py
+++ b/arfile.py
@@ -75,7 +75,12 @@ class ArFile:
 l = self.f.readline()
 if not l: break
 l = l.replace('`', '')
-descriptor = l.split()
+# Field lengths from /usr/include/ar.h:
+ar_field_lens = [ 16, 12, 6, 6, 8, 10, 2 ]
+descriptor = []
+for field_len in ar_field_lens:
+descriptor.append(l[:field_len].strip())
+l = l[field_len:]
 #print descriptor
 size = int(descriptor[5])
 memberName = descriptor[0][:-1]
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 5/5] Use python via the PATH, rather than hardcoding /usr/bin/python

2012-03-29 Thread Martin Jansa
From: Christopher Larson kerg...@gmail.com

Signed-off-by: Christopher Larson kerg...@gmail.com
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-list-fields  |2 +-
 opkg-make-index   |2 +-
 opkg-show-deps|2 +-
 opkg-unbuild  |2 +-
 opkg-update-index |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opkg-list-fields b/opkg-list-fields
index d263b90..da78d53 100755
--- a/opkg-list-fields
+++ b/opkg-list-fields
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, opkg
 
diff --git a/opkg-make-index b/opkg-make-index
index dc98c63..b65dc6e 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, posixpath
 from glob import glob
diff --git a/opkg-show-deps b/opkg-show-deps
index a6681f4..9de1aac 100755
--- a/opkg-show-deps
+++ b/opkg-show-deps
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, posixpath
 from glob import glob
diff --git a/opkg-unbuild b/opkg-unbuild
index eff604b..b5c5227 100755
--- a/opkg-unbuild
+++ b/opkg-unbuild
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, re
 
diff --git a/opkg-update-index b/opkg-update-index
index 807f8f4..3864fa5 100755
--- a/opkg-update-index
+++ b/opkg-update-index
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.1
+#!/usr/bin/env python
 
 import sys, os
 from glob import glob
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Deleting layers in Hob

2012-03-29 Thread Barros Pena, Belen
Hi all,

Do we have enough information to make a decision about the meta-yocto
layer? I don't understand all the technical details, but I am inclined to
make it non-deletable in Hob (i.e. it is not possible to delete this layer
in Hob).

What do you think?

Belen

On 27/03/2012 17:56, Joshua Lock j...@linux.intel.com wrote:

On 27/03/12 00:19, Lu, Lianhao wrote:

 -Original Message-
 From: yocto-boun...@yoctoproject.org
[mailto:yocto-boun...@yoctoproject.org] On Behalf Of Xu, Dongxiao
 Sent: Tuesday, March 27, 2012 2:49 PM
 To: yocto
 Subject: [yocto] Deleting layers in Hob

 When using Hob in Yocto Project, I found a issue when deleting layers.
I
 think I ever raised this problem before.

 Let me briefly introduce how layer removal works in Hob. When user
 changes a layer, it will following the below steps
 1) init the cooker.
 2) set new layers to cooker.
 3) parse configuration files.
 4) get available machines, distros, SDKs, etc.

 As we know, if we source oe-init-build-env in Yocto project
environment,
 we will have DISTRO=poky set in local.conf by default, where the
 poky DISTRO comes from the meta-yocto layer. If user deletes
 meta-yocto in Hob, and then error will happen when bitbake parsing the
 local.conf, since it could not find where the poky DISTRO is defined.

 Even if we are able to successfully removed the meta-yocto layer by
 removing the DISTRO definition in local.conf, system will report
another
 issue that:

 Your configuration is using stamp files including the sstate hash but
 your build directory was built with stamp files that do not include
 this.
 To continue, either rebuild or switch back to the OEBasic signature
 handler with BB_SIGNATURE_HANDLER = 'OEBasic'.

 This is because BB_SIGNATURE_HANDLER = OEBasic is also defined in
 meta-yocto layer (poky.conf).

 Meta-yocto is using OEBasicHash as default signature
handler(ABI_VERSION=8, see ${TMPDIR}/abi_version), while oe-core is
still using the OEBasic(ABI_VERSION=7). This means the oe-core can not
reuse the stamp files generated by meta-yocto.

Could we workaround the incompatibility by setting BB_SIGNATURE_HANDLER
= OEBasic somewhere in meta-hob?

Cheers,
Joshua
-- 
Joshua '贾詡' Lock
 Yocto Project Johannes factotum
 Intel Open Source Technology Centre
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

-
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Deleting layers in Hob

2012-03-29 Thread Xu, Dongxiao
On Thu, 2012-03-29 at 19:05 +0800, Barros Pena, Belen wrote:
 Hi all,
 
 Do we have enough information to make a decision about the meta-yocto
 layer? I don't understand all the technical details, but I am inclined to
 make it non-deletable in Hob (i.e. it is not possible to delete this layer
 in Hob).

The layer is removable in Hob, since many people are just using oe-core
without meta-yocto layer.

I have patches to solve the deletion of meta-yocto layer, and will send
it out soon.

Thanks,
Dongxiao

 
 What do you think?
 
 Belen
 
 On 27/03/2012 17:56, Joshua Lock j...@linux.intel.com wrote:
 
 On 27/03/12 00:19, Lu, Lianhao wrote:
 
  -Original Message-
  From: yocto-boun...@yoctoproject.org
 [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Xu, Dongxiao
  Sent: Tuesday, March 27, 2012 2:49 PM
  To: yocto
  Subject: [yocto] Deleting layers in Hob
 
  When using Hob in Yocto Project, I found a issue when deleting layers.
 I
  think I ever raised this problem before.
 
  Let me briefly introduce how layer removal works in Hob. When user
  changes a layer, it will following the below steps
  1) init the cooker.
  2) set new layers to cooker.
  3) parse configuration files.
  4) get available machines, distros, SDKs, etc.
 
  As we know, if we source oe-init-build-env in Yocto project
 environment,
  we will have DISTRO=poky set in local.conf by default, where the
  poky DISTRO comes from the meta-yocto layer. If user deletes
  meta-yocto in Hob, and then error will happen when bitbake parsing the
  local.conf, since it could not find where the poky DISTRO is defined.
 
  Even if we are able to successfully removed the meta-yocto layer by
  removing the DISTRO definition in local.conf, system will report
 another
  issue that:
 
  Your configuration is using stamp files including the sstate hash but
  your build directory was built with stamp files that do not include
  this.
  To continue, either rebuild or switch back to the OEBasic signature
  handler with BB_SIGNATURE_HANDLER = 'OEBasic'.
 
  This is because BB_SIGNATURE_HANDLER = OEBasic is also defined in
  meta-yocto layer (poky.conf).
 
  Meta-yocto is using OEBasicHash as default signature
 handler(ABI_VERSION=8, see ${TMPDIR}/abi_version), while oe-core is
 still using the OEBasic(ABI_VERSION=7). This means the oe-core can not
 reuse the stamp files generated by meta-yocto.
 
 Could we workaround the incompatibility by setting BB_SIGNATURE_HANDLER
 = OEBasic somewhere in meta-hob?
 
 Cheers,
 Joshua
 -- 
 Joshua '贾詡' Lock
  Yocto Project Johannes factotum
  Intel Open Source Technology Centre
 ___
 yocto mailing list
 yocto@yoctoproject.org
 https://lists.yoctoproject.org/listinfo/yocto
 


___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] tentative list of vars to be dropped from variable glossary

2012-03-29 Thread Richard Purdie
On Mon, 2012-03-26 at 16:50 -0700, Rudolf Streif wrote:
 Thanks, Richard. Clearer now but not entirely.
 
 
 
  BBMASK removes recipes from being parsed. It does not
 remove them from
  images although that would I guess be an indirect result
 since you could
 no longer build them.
 
 
 Yes, it removes it from being parsed. I used, for test although not
 sensible, BBMASK = base-passwd. If I then tried building
 core-image-minimal it fails with Nothing provides base-passwd. If
 one could use BBMASK to customize images as suggested
 in 
 http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#usingpoky-extend-customimage-localconf
  then one would expect the package to be removed indirectly from the image. 
 However, that does not happen, the build just fails.

I hadn't realised Scott had added this to the customising images section
of the manual. This is not what its designed for and we need to move
this to somewhere less confusing.

Scott: This is going to need to move somewhere else in the manual as
this is confusing. I'm going to suggest a 4.12 section Other tips and
tricks which says:


Sometimes there are groups of recipes you might wish to filter out. If
there were recipes you know you're never going to want/use, removing
them from parsing would speed up parts of the build for example.

It is possible to filter or mask out both .bb and .bbappend files. You
can do this by providing an expression with the BBMASK variable. Here is
an example:

 BBMASK = .*/meta-mymachine/recipes-maybe/

Here, all .bb and .bbappend files in the directory that matches the
expression are ignored during the build process. 


Cheers,

Richard



___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] issue building iputils with uclibc.

2012-03-29 Thread John Toomey

On 20/03/2012 16:56, Khem Raj wrote:

On Tue, Mar 20, 2012 at 9:23 AM, Paul Eggleton
paul.eggle...@linux.intel.com  wrote:

IIRC the thread ended with Khem asking if UCLIBC_HAS_RESOLVER_SUPPORT='y' was
in the uclibc configuration, the implication being that dn_comp is unavailable
unless that is true. I'm not too familiar with how uclibc is configured and
with only a brief glance at the recipe I can see the config seems to be
automatically generated but I can't see exactly how additional options (beyond
what gets added from DISTRO_FEATURES) would be added.

Khem, could you help out here?

go into the uclibc build tree and like kernel or busybox it will have
a .config and grok that. If this is disabled then enable it in
uClibc.distro file under uclibc recipes dir and rebuild uclibc.
ideally these are distro knobs but for tests you can try it
file ( uclibc uses kconfig )


Hi Folks

I am unable to find a .config file in the uclibc build tree, can you be 
more specific about the path i might find it at?


UCLIBC_HAS_RESOLVER_SUPPORT=y doesnt seem to be present in the 
uClibc.distro file, i added it and tried running the build again with no 
success. Is there anything else I can try?


Thanks,
John


___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] tentative list of vars to be dropped from variable glossary

2012-03-29 Thread Rifenbark, Scott M
I will take care of this. 

Scott

-Original Message-
From: Richard Purdie [mailto:richard.pur...@linuxfoundation.org] 
Sent: Thursday, March 29, 2012 6:48 AM
To: Rudolf Streif; Rifenbark, Scott M
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] tentative list of vars to be dropped from variable glossary

On Mon, 2012-03-26 at 16:50 -0700, Rudolf Streif wrote:
 Thanks, Richard. Clearer now but not entirely.
 
 
 
  BBMASK removes recipes from being parsed. It does not
 remove them from
  images although that would I guess be an indirect result
 since you could
 no longer build them.
 
 
 Yes, it removes it from being parsed. I used, for test although not
 sensible, BBMASK = base-passwd. If I then tried building
 core-image-minimal it fails with Nothing provides base-passwd. If
 one could use BBMASK to customize images as suggested
 in 
 http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html#usingpoky-extend-customimage-localconf
  then one would expect the package to be removed indirectly from the image. 
 However, that does not happen, the build just fails.

I hadn't realised Scott had added this to the customising images section
of the manual. This is not what its designed for and we need to move
this to somewhere less confusing.

Scott: This is going to need to move somewhere else in the manual as
this is confusing. I'm going to suggest a 4.12 section Other tips and
tricks which says:


Sometimes there are groups of recipes you might wish to filter out. If
there were recipes you know you're never going to want/use, removing
them from parsing would speed up parts of the build for example.

It is possible to filter or mask out both .bb and .bbappend files. You
can do this by providing an expression with the BBMASK variable. Here is
an example:

 BBMASK = .*/meta-mymachine/recipes-maybe/

Here, all .bb and .bbappend files in the directory that matches the
expression are ignored during the build process. 


Cheers,

Richard



___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] yassl recipe in the yocto project

2012-03-29 Thread Koen Kooi

Op 27 mrt. 2012, om 17:53 heeft Kamble, Nitin A het volgende geschreven:

 Hi Chris,
   Here is the recipe we have in yocto-project for openssl projects to be 
 incorporated into embedded Linux distributions. 
 http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/recipes-connectivity/openssl

That should be 
http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-connectivity/openssl
 for obvious reasons, poky is downstream of oe-core


___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] filing enhancement for build appliance

2012-03-29 Thread Barros Pena, Belen
I've just received an screenshot showing how Hob looks like in the build 
appliance, and I'd like to file an enhancement to include a GTK theme that will 
show Hob with a better face.

Does anybody know how should I file it? Bugzilla under build system  general 
and indicating 'build appliance' in the title?

Thanks

Belen
-
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] Deleting layers in Hob

2012-03-29 Thread Barros Pena, Belen
Great! Care to tell us a bit about it, or will we have to hold our breath
until you submit the patches? ;)

Belen

On 29/03/2012 13:00, Xu, Dongxiao dongxiao...@intel.com wrote:

On Thu, 2012-03-29 at 19:05 +0800, Barros Pena, Belen wrote:
 Hi all,
 
 Do we have enough information to make a decision about the meta-yocto
 layer? I don't understand all the technical details, but I am inclined
to
 make it non-deletable in Hob (i.e. it is not possible to delete this
layer
 in Hob).

The layer is removable in Hob, since many people are just using oe-core
without meta-yocto layer.

I have patches to solve the deletion of meta-yocto layer, and will send
it out soon.

Thanks,
Dongxiao

 
 What do you think?
 
 Belen
 
 On 27/03/2012 17:56, Joshua Lock j...@linux.intel.com wrote:
 
 On 27/03/12 00:19, Lu, Lianhao wrote:
 
  -Original Message-
  From: yocto-boun...@yoctoproject.org
 [mailto:yocto-boun...@yoctoproject.org] On Behalf Of Xu, Dongxiao
  Sent: Tuesday, March 27, 2012 2:49 PM
  To: yocto
  Subject: [yocto] Deleting layers in Hob
 
  When using Hob in Yocto Project, I found a issue when deleting
layers.
 I
  think I ever raised this problem before.
 
  Let me briefly introduce how layer removal works in Hob. When user
  changes a layer, it will following the below steps
  1) init the cooker.
  2) set new layers to cooker.
  3) parse configuration files.
  4) get available machines, distros, SDKs, etc.
 
  As we know, if we source oe-init-build-env in Yocto project
 environment,
  we will have DISTRO=poky set in local.conf by default, where the
  poky DISTRO comes from the meta-yocto layer. If user deletes
  meta-yocto in Hob, and then error will happen when bitbake parsing
the
  local.conf, since it could not find where the poky DISTRO is
defined.
 
  Even if we are able to successfully removed the meta-yocto layer by
  removing the DISTRO definition in local.conf, system will report
 another
  issue that:
 
  Your configuration is using stamp files including the sstate hash
but
  your build directory was built with stamp files that do not include
  this.
  To continue, either rebuild or switch back to the OEBasic signature
  handler with BB_SIGNATURE_HANDLER = 'OEBasic'.
 
  This is because BB_SIGNATURE_HANDLER = OEBasic is also defined in
  meta-yocto layer (poky.conf).
 
  Meta-yocto is using OEBasicHash as default signature
 handler(ABI_VERSION=8, see ${TMPDIR}/abi_version), while oe-core is
 still using the OEBasic(ABI_VERSION=7). This means the oe-core can not
 reuse the stamp files generated by meta-yocto.
 
 Could we workaround the incompatibility by setting BB_SIGNATURE_HANDLER
 = OEBasic somewhere in meta-hob?
 
 Cheers,
 Joshua
 -- 
 Joshua '贾詡' Lock
  Yocto Project Johannes factotum
  Intel Open Source Technology Centre
 ___
 yocto mailing list
 yocto@yoctoproject.org
 https://lists.yoctoproject.org/listinfo/yocto
 



-
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] filing enhancement for build appliance

2012-03-29 Thread Zhang, Jessica
Belen,

That should work.

Thanks,
Jessica

-Original Message-
From: yocto-boun...@yoctoproject.org [mailto:yocto-boun...@yoctoproject.org] On 
Behalf Of Barros Pena, Belen
Sent: Thursday, March 29, 2012 8:16 AM
To: yocto@yoctoproject.org
Subject: [yocto] filing enhancement for build appliance

I've just received an screenshot showing how Hob looks like in the build 
appliance, and I'd like to file an enhancement to include a GTK theme that will 
show Hob with a better face.

Does anybody know how should I file it? Bugzilla under build system  general 
and indicating 'build appliance' in the title?

Thanks

Belen
-
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient(s). Any review or distribution by others is 
strictly prohibited. If you are not the intended recipient, please contact the 
sender and delete all copies.

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] care when using remove_packaging_data_files

2012-03-29 Thread Chatre, Reinette
Hi,

I am building an image using ipk packages. The minimal images all seem
to set ROOTFS_POSTPROCESS_COMMAND to remove_packaging_data_files, which
(for all package management systems) recursively removes the packages
directory in /var/lib. This seems a bit harsh considering that some
packages may still be in the unpacked state and thus have a script in
that directory that needs to be run when the image boots. 

ipk seems to cleanup without the need of remove_packaging_data_files -
rootfs_ipk.bbclass:rootfs_ipk_do_rootfs() checks if any packages are in
unpacked state and then will delete the packages directory in /var/lib
if nothing there is needed. I could not find similar actions in
rootfs_deb.bbclass or rootfs_rpm.bbclass 

I am thus planning on proceeding with my minimal image without setting
ROOTFS_POSTPROCESS_COMMAND, but it seems that minimal images based on
rpm and deb may need some changes to avoid surprises.

Reinette
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [PATCH 1/1] [meta-intel] Cedartrail: Add pvr graphics driver

2012-03-29 Thread kishore . k . bodke
From: Kishore Bodke kishore.k.bo...@intel.com

Include the PVR Graphics driver to the Cedartrail BSP.
These patch set will add the PVR Graphics driver and
update the SRCREVs for both pvr and nopvr.

Signed-off-by: Kishore Bodke kishore.k.bo...@intel.com
---
 conf/machine/include/ia32-base.inc |2 +
 meta-cedartrail/README |   42 -
 meta-cedartrail/conf/machine/cedartrail-nopvr.conf |   21 
 meta-cedartrail/conf/machine/cedartrail.conf   |   13 ++-
 .../cedartrail-audio/cedartrail-audio.bb   |   30 ++
 .../cedartrail-audio/cedartrail-audio  |   42 
 .../formfactor/cedartrail-nopvr/machconfig |3 +
 .../tasks/task-core-tools-profile.bbappend |2 +-
 .../xorg-driver/cdv-pvr-driver.inc |   48 +
 .../xorg-driver/cdv-pvr-driver_1.0.bb  |  101 
 .../xserver-xf86-config/cedartrail-nopvr/xorg.conf |   26 +
 .../xserver-xf86-config/cedartrail/xorg.conf   |   24 ++---
 .../linux/linux-yocto-rt_3.0.bbappend  |   16 +++
 .../recipes-kernel/linux/linux-yocto_3.0.bbappend  |   20 -
 .../ogg-CC-BY-3.0-music-samples_0.1.bb |   23 +
 .../video-samples/bigbuckbunny-ogg.bb  |   24 +
 .../images/core-image-sato-dev.bbappend|2 +
 .../images/core-image-sato-sdk.bbappend|2 +
 .../recipes-sato/images/core-image-sato.bbappend   |1 +
 19 files changed, 418 insertions(+), 24 deletions(-)
 create mode 100644 meta-cedartrail/conf/machine/cedartrail-nopvr.conf
 create mode 100644 
meta-cedartrail/recipes-bsp/cedartrail-audio/cedartrail-audio.bb
 create mode 100644 
meta-cedartrail/recipes-bsp/cedartrail-audio/cedartrail-audio/cedartrail-audio
 create mode 100644 
meta-cedartrail/recipes-bsp/formfactor/formfactor/cedartrail-nopvr/machconfig
 create mode 100644 
meta-cedartrail/recipes-graphics/xorg-driver/cdv-pvr-driver.inc
 create mode 100644 
meta-cedartrail/recipes-graphics/xorg-driver/cdv-pvr-driver_1.0.bb
 create mode 100644 
meta-cedartrail/recipes-graphics/xorg-xserver/xserver-xf86-config/cedartrail-nopvr/xorg.conf
 create mode 100644 
meta-cedartrail/recipes-mediasamples/music-samples/ogg-CC-BY-3.0-music-samples_0.1.bb
 create mode 100644 
meta-cedartrail/recipes-mediasamples/video-samples/bigbuckbunny-ogg.bb
 create mode 100644 
meta-cedartrail/recipes-sato/images/core-image-sato-dev.bbappend
 create mode 100644 
meta-cedartrail/recipes-sato/images/core-image-sato-sdk.bbappend
 create mode 100644 meta-cedartrail/recipes-sato/images/core-image-sato.bbappend

diff --git a/conf/machine/include/ia32-base.inc 
b/conf/machine/include/ia32-base.inc
index 9b2ef5a..d1bd0d7 100644
--- a/conf/machine/include/ia32-base.inc
+++ b/conf/machine/include/ia32-base.inc
@@ -64,3 +64,5 @@ XSERVER_IA32_EMGD = emgd-driver-bin \

 
 XSERVER_IA32_VESA = xf86-video-vesa
+
+XSERVER_IA32_PVR = cdv-pvr-driver
diff --git a/meta-cedartrail/README b/meta-cedartrail/README
index 295e9ff..9b7ce9b 100755
--- a/meta-cedartrail/README
+++ b/meta-cedartrail/README
@@ -52,10 +52,24 @@ common metadata shared between BSPs) e.g.:
 yocto/meta-intel \  
yocto/meta-intel/meta-cedartrail \
 
-To enable the cedartrail layer, add the cedartrail MACHINE to local.conf:
+To enable the cedartrail layer that supports Power VR graphics, 
+add the cedartrail MACHINE to local.conf:
 
   MACHINE ?= cedartrail
 
+
+Power VR Graphics user-space driver binaries are covered by a
+Intel Free Distribution Binary License. The build of this driver
+can be enabled by adding the following line to the local.conf file:
+
+ PVR_LICENSE = yes
+
+To enable the layer that does not support Power VR graphics
+add the following to the local.conf file:
+
+ MACHINE ?= cedartrail-nopvr
+
+
 You should then be able to build a cedartrail image as such:
 
   $ source oe-init-build-env
@@ -85,7 +99,7 @@ Under Linux, insert a USB flash drive.  Assuming the USB 
flash drive
 takes device /dev/sdf, use dd to copy the live image to it.  For
 example:
 
-# dd if=core-image-sato-cedartrail-20120105232035.hddimg of=/dev/sdf
+# dd if=core-image-sato-cedartrail-20120329171409.hddimg of=/dev/sdf
 # sync
 # eject /dev/sdf
 
@@ -109,3 +123,27 @@ the syslinux boot: prompt, or the boot: prompt contains 
strange
 characters), try doing this first:
 
 # dd if=/dev/zero of=/dev/sdf bs=1M count=512
+
+Miscellaneous Notes
+
+
+Video and Music Samples
+---
+This BSP includes recipes to download Ogg format video and
+music files that can be played-back with the Video and music players
+included in the sato images.  The sample files are installed in
+/home/Music and /home/Videos directories.  
+
+
+Adding Glxgears to image
+-
+Glxgears can be added to the generated image by adding debug-tweaks
+option to the extra image features variable in the default local.conf
+before building 

[yocto] [PATCH 0/1] [meta-intel] Add PVR Graphics Driver to the Cedartrail BSP

2012-03-29 Thread kishore . k . bodke
From: Kishore Bodke kishore.k.bo...@intel.com

Hi,

These patch set updates the existing Cedartrail BSP with PVR Graphics Driver 
and 
also the SRCREVS to build with both pvr and nopvr images.

pvr version supports EFI and pcbios.
no-pvr (VESA Graphics) version does not support EFI.

Please pull into meta-intel/master.

Thanks
Kishore.

The following changes since commit f89405e115d73426c8a6450b6e795b5885d6bdf3:

  MAINTAINERS: Add FRI2 maintainer (2012-03-23 09:46:15 -0700)

are available in the git repository at:
  git://git.pokylinux.org/meta-intel-contrib kishore/cedartrail-pvr-graphics
  
http://git.pokylinux.org/cgit.cgi/meta-intel-contrib/log/?h=kishore/cedartrail-pvr-graphics

Kishore Bodke (1):
  Cedartrail: Add pvr graphics driver

 conf/machine/include/ia32-base.inc |2 +
 meta-cedartrail/README |   42 -
 meta-cedartrail/conf/machine/cedartrail-nopvr.conf |   21 
 meta-cedartrail/conf/machine/cedartrail.conf   |   13 ++-
 .../cedartrail-audio/cedartrail-audio.bb   |   30 ++
 .../cedartrail-audio/cedartrail-audio  |   42 
 .../formfactor/cedartrail-nopvr/machconfig |3 +
 .../tasks/task-core-tools-profile.bbappend |2 +-
 .../xorg-driver/cdv-pvr-driver.inc |   48 +
 .../xorg-driver/cdv-pvr-driver_1.0.bb  |  101 
 .../xserver-xf86-config/cedartrail-nopvr/xorg.conf |   26 +
 .../xserver-xf86-config/cedartrail/xorg.conf   |   24 ++---
 .../linux/linux-yocto-rt_3.0.bbappend  |   16 +++
 .../recipes-kernel/linux/linux-yocto_3.0.bbappend  |   20 -
 .../ogg-CC-BY-3.0-music-samples_0.1.bb |   23 +
 .../video-samples/bigbuckbunny-ogg.bb  |   24 +
 .../images/core-image-sato-dev.bbappend|2 +
 .../images/core-image-sato-sdk.bbappend|2 +
 .../recipes-sato/images/core-image-sato.bbappend   |1 +
 19 files changed, 418 insertions(+), 24 deletions(-)
 create mode 100644 meta-cedartrail/conf/machine/cedartrail-nopvr.conf
 create mode 100644 
meta-cedartrail/recipes-bsp/cedartrail-audio/cedartrail-audio.bb
 create mode 100644 
meta-cedartrail/recipes-bsp/cedartrail-audio/cedartrail-audio/cedartrail-audio
 create mode 100644 
meta-cedartrail/recipes-bsp/formfactor/formfactor/cedartrail-nopvr/machconfig
 create mode 100644 
meta-cedartrail/recipes-graphics/xorg-driver/cdv-pvr-driver.inc
 create mode 100644 
meta-cedartrail/recipes-graphics/xorg-driver/cdv-pvr-driver_1.0.bb
 create mode 100644 
meta-cedartrail/recipes-graphics/xorg-xserver/xserver-xf86-config/cedartrail-nopvr/xorg.conf
 create mode 100644 
meta-cedartrail/recipes-mediasamples/music-samples/ogg-CC-BY-3.0-music-samples_0.1.bb
 create mode 100644 
meta-cedartrail/recipes-mediasamples/video-samples/bigbuckbunny-ogg.bb
 create mode 100644 
meta-cedartrail/recipes-sato/images/core-image-sato-dev.bbappend
 create mode 100644 
meta-cedartrail/recipes-sato/images/core-image-sato-sdk.bbappend
 create mode 100644 meta-cedartrail/recipes-sato/images/core-image-sato.bbappend

-- 
1.7.5.4

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] can all of the licensing discussion be centralized in an appendix?

2012-03-29 Thread Rudolf Streif
Scott,

That's great. The dev manual is very comprehensive and at the right level
of detail. I think many new as well as more experienced users of YP will
appreciate it. From a quick read the only suggestion I have for now is to
place the section on Customizing Images before the section on Adding
Packages. Most users will probably first build custom images by adding
packages using readily available recipes before writing recipes for their
own packages.

The reference sections in the reference manual are great. The other
sections need more work on coherence. Layers should be added, also a
section that deals with the syntax and semantics of setting variables e.g.
+=, .= vs. _append etc. This is where most people get confused.

Another thing worth explaining in the reference manual is the use of the
Bitbake data structures in Python functions in recipes. This is where I can
see folks pulling their hair out too.

I will keep on rummaging through.

Rudi




On Mon, Mar 26, 2012 at 3:28 PM, Rifenbark, Scott M 
scott.m.rifenb...@intel.com wrote:

  Rudi, 

 ** **

 Great comments!  Thanks very much.  I will immediately update the revision
 history tables to show the 1.2 release as WIP.  Not having it there did
 cause you confusion.  Good suggestion. 

 ** **

 Regarding your other observations.  If you have the time I would
 appreciate you looking at the YP Development manual, particularly Chapter
 4.  Much of the “how-to” stuff that was in the YP reference manual has been
 moved to there.  “Adding a Package” section that you noted was now missing
 is in fact in that area.  Let me give you some background on the strategy
 of the two manuals….

 ** **

 I am trying to eventually turn the YP reference guide into a “reference”
 guide with minimal “how-to” information.  That is the long-term goal.  The
 YP Development Manual has been getting some how-to stuff added to it.
 Chapter 4 (Common Tasks) tells how to create layers, add a package,
 customize images, etc.).  

 ** **

 Here is the link to the “latest” YP Development Manual:
 http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html.  With
 this new context, maybe you can augment or comment on your previous
 comments J

 ** **

 I appreciate your help, 

 Scott

 ** **

 *From:* rstr...@linuxfoundation.org [mailto:rstr...@linuxfoundation.org] *On
 Behalf Of *Rudolf Streif
 *Sent:* Monday, March 26, 2012 4:02 PM
 *To:* Rifenbark, Scott M
 *Cc:* yocto@yoctoproject.org

 *Subject:* Re: [yocto] can all of the licensing discussion be centralized
 in an appendix?

  ** **

 Scott,

 ** **

   

 
 http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html
 .

  

  Yes, I looked at that one but I now noticed that I referenced it
 incorrectly. This is the latest version, however, in the revision history
 it shows Revision 1.1, October 6, 2011, Released with the Yocto Project
 Release 1.1.

 ** **

 Now, this one
 http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html 
 is
 the current one but its revision history shows Revision 1.1.1, March 15,
 2012, Released with the Yocto Project Release 1.1.1.

 ** **

 Ok, now I get how I confused myself successfully. I presume that the first
 is the newer one although its revision history suggests otherwise? Would
 you mind updating the revision history with something like Revision 1.2,
 WIP, To be released with Yocto Project Release 1.2?

 ** **

 The latest one does not seem to have a section about writing recipes
 anymore at all. Are you planning on putting it back? While the previous one
 had a section on writing recipes it did so in a vacuum. It told you how
 to write a recipe but not really where to put it and how to include it with
 an image. The latter it explained in the next section about customizing an
 image.

 ** **

 The info about the licensing is great and dead-nuts on, however, a reader
 new to the Yocto Project would be missing the context. A good add-on to
 that paragraph would be that if you omit the md5 parameter in the
 LIC_FILES_CHKSUM variable Bitbake will actually spit it out for you which
 is in particular useful if the checksum is calculated over a subset of a
 license file specified by startline and endline because md5sum won't easily
 do that for you.

 ** **

 ** **

 These are my suggestions:

 ** **

 * Remove 3.3 x32 and 3.4 Licenses from section 3. Section 3 currently
 looks a little bit like a kitchen sink. The first two paragraphs deal with
 build system components and architecture, x32 then mixes a very specific
 technology into it for particular targets, and then Licenses tops it off
 with package licensing details. I would dedicate Section 3 to Yocto Project
 Build System Architecture only.

 ** **

 * Then I would dedicate a section 4 to Build Customization:

 ** The first subsection could deal with the most trivial customization
 through local.conf: 

Re: [yocto] issue building iputils with uclibc.

2012-03-29 Thread Paul Eggleton
On Thursday 29 March 2012 14:20:44 John Toomey wrote:
 On 20/03/2012 16:56, Khem Raj wrote:
  go into the uclibc build tree and like kernel or busybox it will have
  a .config and grok that. If this is disabled then enable it in
  uClibc.distro file under uclibc recipes dir and rebuild uclibc.
  ideally these are distro knobs but for tests you can try it
  file ( uclibc uses kconfig )
 
 I am unable to find a .config file in the uclibc build tree, can you be
 more specific about the path i might find it at?
 
 UCLIBC_HAS_RESOLVER_SUPPORT=y doesnt seem to be present in the
 uClibc.distro file, i added it and tried running the build again with no
 success. Is there anything else I can try?

OK, so I just gave this build a try. You can find the configuration actually 
used in the build in TMPDIR/work/i586-poky-linux-uclibc/uclibc-0.9.32-
r4.3/git/.config  (directory names may vary slightly depending on your build 
configuration). 

With master, when I checked my version of that file, 
UCLIBC_HAS_RESOLVER_SUPPORT=y is set, so apparently this feature is getting 
enabled by default. However, when I did the same on edison (which uses uclibc 
0.9.32 as opposed to 0.9.33) that setting is not present. Digging around I'm 
beginning to wonder if this option was perhaps added in uclibc 0.9.33, which 
if true would explain why it is not present when building uclibc in edison; 
but does that mean the underlying functionality was added in that version or 
just the option?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] can all of the licensing discussion be centralized in an appendix?

2012-03-29 Thread Rifenbark, Scott M
Rudi,

Thanks for taking the time to look this stuff over.  I will place customizing 
images ahead of adding packages in the dev manual.

I will dig into the other issues and see what I can get in the way of 
information from the development team.

Scott

From: rstr...@linuxfoundation.org [mailto:rstr...@linuxfoundation.org] On 
Behalf Of Rudolf Streif
Sent: Thursday, March 29, 2012 1:05 PM
To: Rifenbark, Scott M
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] can all of the licensing discussion be centralized in an 
appendix?

Scott,

That's great. The dev manual is very comprehensive and at the right level of 
detail. I think many new as well as more experienced users of YP will 
appreciate it. From a quick read the only suggestion I have for now is to place 
the section on Customizing Images before the section on Adding Packages. 
Most users will probably first build custom images by adding packages using 
readily available recipes before writing recipes for their own packages.

The reference sections in the reference manual are great. The other sections 
need more work on coherence. Layers should be added, also a section that deals 
with the syntax and semantics of setting variables e.g. +=, .= vs. _append etc. 
This is where most people get confused.

Another thing worth explaining in the reference manual is the use of the 
Bitbake data structures in Python functions in recipes. This is where I can see 
folks pulling their hair out too.

I will keep on rummaging through.

Rudi



On Mon, Mar 26, 2012 at 3:28 PM, Rifenbark, Scott M 
scott.m.rifenb...@intel.commailto:scott.m.rifenb...@intel.com wrote:
Rudi,

Great comments!  Thanks very much.  I will immediately update the revision 
history tables to show the 1.2 release as WIP.  Not having it there did cause 
you confusion.  Good suggestion.

Regarding your other observations.  If you have the time I would appreciate you 
looking at the YP Development manual, particularly Chapter 4.  Much of the 
how-to stuff that was in the YP reference manual has been moved to there.  
Adding a Package section that you noted was now missing is in fact in that 
area.  Let me give you some background on the strategy of the two manuals

I am trying to eventually turn the YP reference guide into a reference guide 
with minimal how-to information.  That is the long-term goal.  The YP 
Development Manual has been getting some how-to stuff added to it.  Chapter 4 
(Common Tasks) tells how to create layers, add a package, customize images, 
etc.).

Here is the link to the latest YP Development Manual:  
http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html.  With this 
new context, maybe you can augment or comment on your previous comments :)

I appreciate your help,
Scott

From: rstr...@linuxfoundation.orgmailto:rstr...@linuxfoundation.org 
[mailto:rstr...@linuxfoundation.orgmailto:rstr...@linuxfoundation.org] On 
Behalf Of Rudolf Streif
Sent: Monday, March 26, 2012 4:02 PM
To: Rifenbark, Scott M
Cc: yocto@yoctoproject.orgmailto:yocto@yoctoproject.org

Subject: Re: [yocto] can all of the licensing discussion be centralized in an 
appendix?

Scott,


 http://www.yoctoproject.org/docs/latest/poky-ref-manual/poky-ref-manual.html.

Yes, I looked at that one but I now noticed that I referenced it incorrectly. 
This is the latest version, however, in the revision history it shows Revision 
1.1, October 6, 2011, Released with the Yocto Project Release 1.1.

Now, this one 
http://www.yoctoproject.org/docs/current/poky-ref-manual/poky-ref-manual.html 
is the current one but its revision history shows Revision 1.1.1, March 15, 
2012, Released with the Yocto Project Release 1.1.1.

Ok, now I get how I confused myself successfully. I presume that the first is 
the newer one although its revision history suggests otherwise? Would you mind 
updating the revision history with something like Revision 1.2, WIP, To be 
released with Yocto Project Release 1.2?

The latest one does not seem to have a section about writing recipes anymore at 
all. Are you planning on putting it back? While the previous one had a section 
on writing recipes it did so in a vacuum. It told you how to write a recipe 
but not really where to put it and how to include it with an image. The latter 
it explained in the next section about customizing an image.

The info about the licensing is great and dead-nuts on, however, a reader new 
to the Yocto Project would be missing the context. A good add-on to that 
paragraph would be that if you omit the md5 parameter in the LIC_FILES_CHKSUM 
variable Bitbake will actually spit it out for you which is in particular 
useful if the checksum is calculated over a subset of a license file specified 
by startline and endline because md5sum won't easily do that for you.


These are my suggestions:

* Remove 3.3 x32 and 3.4 Licenses from section 3. Section 3 currently looks a 
little bit like a kitchen sink. The first two paragraphs deal with build system 

Re: [yocto] issue building iputils with uclibc.

2012-03-29 Thread Khem Raj
On Thu, Mar 29, 2012 at 12:05 PM, Paul Eggleton
paul.eggle...@linux.intel.com wrote:
 On Thursday 29 March 2012 14:20:44 John Toomey wrote:
 On 20/03/2012 16:56, Khem Raj wrote:
  go into the uclibc build tree and like kernel or busybox it will have
  a .config and grok that. If this is disabled then enable it in
  uClibc.distro file under uclibc recipes dir and rebuild uclibc.
  ideally these are distro knobs but for tests you can try it
  file ( uclibc uses kconfig )

 I am unable to find a .config file in the uclibc build tree, can you be
 more specific about the path i might find it at?

 UCLIBC_HAS_RESOLVER_SUPPORT=y doesnt seem to be present in the
 uClibc.distro file, i added it and tried running the build again with no
 success. Is there anything else I can try?

 OK, so I just gave this build a try. You can find the configuration actually
 used in the build in TMPDIR/work/i586-poky-linux-uclibc/uclibc-0.9.32-
 r4.3/git/.config  (directory names may vary slightly depending on your build
 configuration).

 With master, when I checked my version of that file,
 UCLIBC_HAS_RESOLVER_SUPPORT=y is set, so apparently this feature is getting
 enabled by default. However, when I did the same on edison (which uses uclibc
 0.9.32 as opposed to 0.9.33) that setting is not present. Digging around I'm
 beginning to wonder if this option was perhaps added in uclibc 0.9.33, which
 if true would explain why it is not present when building uclibc in edison;
 but does that mean the underlying functionality was added in that version or
 just the option?

thats makes it clear. Its 0.9.33 feature. I was assuming thats what
you were using.


 Cheers,
 Paul

 --

 Paul Eggleton
 Intel Open Source Technology Centre
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] How to change the startup application

2012-03-29 Thread Liu, Song
I got a question about how to change the startup application with Yocto for 
images generated with Yocto. And I googled it and landed on this page: 
https://wiki.yoctoproject.org/wiki/FAQ:How_do_I_change_and_add_startup_scripts. 
Pretty good, someone was thinking about the same thing. But this page turns out 
to be empty. It seems that we need to get better than this. 

I'm wondering if someone could update this wiki page or if the information is 
somewhere else...

Thanks,
Song
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] which yocto doc explains bitbake assignment variations?

2012-03-29 Thread Robert P. J. Day

  somewhere, i'm assuming there's a decent explanation of the
different bitbake assignment variations (=, ?=, ??=), but i don't
immediately see it, and i think it's pretty important that that's
explained properly.  pointer?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] which yocto doc explains bitbake assignment variations?

2012-03-29 Thread Mark Hatle

On 3/29/12 4:47 PM, Robert P. J. Day wrote:


   somewhere, i'm assuming there's a decent explanation of the
different bitbake assignment variations (=, ?=, ??=), but i don't
immediately see it, and i think it's pretty important that that's
explained properly.  pointer?

rday



The bitbake manual has this information in it.  I don't know of a current 
version that is posted online, but you should be able to generate it from within 
bitbake itself.


(and older version: http://docs.openembedded.org/bitbake/html/)

But for the record the variations:

Immediate, overwrite existing values:
  variable = value

Conditional, only if not previously set:
  variable ?= value

Conditional, late evaluation -- i.e. at the end, only if set:
  variable ??= value

Immediate, expand variables immediately:
  variable := ${value}

Append with spaces:
  variable += value

Prepend with spaces:
  variable =+ value

Append without spaces:
  variable .= value

Prepend without spaces:
  variable =. value

Append late evaluation:
  variable_append = value

--Mark
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] which yocto doc explains bitbake assignment variations?

2012-03-29 Thread Rudolf Streif
Robert,

I don't think that the YP manuals do. That's more Bitbake. However, here is
some copied out of my docs. (List excuse the formatting. It's copied from
an HTML page.)


   -

   *Variable Setting (=)*

   Set a variable by assigning it a value using the *=* sign. Values must
   be surrounded by double quotes.

   *
   VAR = value
   *

   In this example, *VAR* is set to *value*.
   -

   *Early Default Value Assignment (?=)*

   A variable can be early-assigned a default value using the *?=* assignment
   operator:

   *
   A ?= 1
   B ?= 2
   B ?= 3
   *

   In this example *A* will contain *1* if it was not previously set. *B* will
   contain *2* because the *?=* assignment operator is immediate meaning
   that if there are multiple *?=* assignments to a single variable, the
   first one will be used.
   -

   *Late Default Value Assignment (??=)*

   A variable can be late-assigned a default value using the *??=* assignment
   operator:

   *
   A ??= 1
   B ??= 2
   B ??= 3
   *

   In this example *A* will contain *1* if it was not previously set. *B* will
   contain *3* because the *??=* assignment operator is a late or lazy
   assignment operator and assignment will not take place until the end of the
   parsing process. If there are multiple *??=* assignments to a single
   variable, the last one will be used.
   -

   *Variable Expansion*

   Bitbake supports referencing a variables content similar to shell
   scripting.

   *
   A = jumps over
   B = The quick brown fox ${A} the lazy dog.
   echo $B
   *

   This results in the the text *The quick brown fox jumps over the lazy
   dog.* printed to the console.
   -

   *Immediate Variable Expansion (:=)*

   Typically, Bitbake expands a variable when it is used. The *:=* assignment
   operator however expands the variable immediately when it is assigned.

   *
   A = 11
   B = B:${A}
   A = 22
   C := C:${A}
   echo $C $B
   *

   This results in *C:22 B:22* printed to the console since the content of *
   A* is expanded immediately on assignment to variable *C*. Variable *B* did
   not get expanded until it was actually used in the *echo*statement.
   -

   *Appending (+=) and Prepending (=+)*

   The *+=* and *=+* append and prepend variables respectively while adding
   a single space between the values.

   *
   A = 12
   A += 34
   B = 89
   B =+ 67
   *

   This results in variable *A* containing *12 34* and variable *B*
containing *67 89*.
   -

   *Appending (.=) and Prepending (=.) without Spaces*

   The *.=* and *=.* work like the above appending and prepending operators
   however without placing an additional space between the values.

   *
   A = 12
   A .= 34
   B = 89
   B =. 67
   *

   This results in variable *A* containing *1234* and variable *B*
containing *6789*.

Rudi
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] which yocto doc explains bitbake assignment variations?

2012-03-29 Thread Robert P. J. Day
On Thu, 29 Mar 2012, Mark Hatle wrote:

 On 3/29/12 4:47 PM, Robert P. J. Day wrote:
 
 somewhere, i'm assuming there's a decent explanation of the
  different bitbake assignment variations (=, ?=, ??=), but i don't
  immediately see it, and i think it's pretty important that that's
  explained properly.  pointer?
 
  rday
 

 The bitbake manual has this information in it.  I don't know of a
 current version that is posted online, but you should be able to
 generate it from within bitbake itself.

  ah, quite right, i'd forgotten that bitbake comes with the manual in
the doc/ directory.  i should have remembered that.

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 00/22] Partially prepare for python3 and fix old Packages file reuse

2012-03-29 Thread Martin Jansa
First 5 patches are taken from oe-core.

Then there are some cleanups and fixes for issues I've found while looking 
for cause of very long package-index calls.

Some patches uses compatible changes from 2to3 (tested with python2.7), but
python3 support is not 100% complete, but were closer.

And in the end I've found the cause.. printing long fields (e. g. description)
with opkg.py was producing empty lines in Packages file (which are Packages 
entry 
separators) so only first entries till first empty line were processed from old
Packages file and the rest was always extracted from control files in packaged 
.ipk.

And this also fixes Packages.filelist generation.

I don't use python very much, so please review.

And the speedup? Almost 60 times :)
before:
real20m10.484s
user18m32.335s
sys 0m11.885s

after
real0m24.492s
user0m23.748s
sys 0m0.565s

The following changes since commit 002d29bc605d7c2d02e4cf20a43c5277c15f5597:

  [opkg-utils] fix install fail problem  Thanks for khorben's patch :-)  
https://docs.openmoko.org/trac/attachment/ticket/2072/patch-opkg-utils_Makefile_install_path.diff
 (2008-11-03 03:59:59 +)

are available in the git repository at:
  git://github.com/shr-project/opkg-utils jansa/pull
  https://github.com/shr-project/opkg-utils/tree/jansa/pull

Christopher Larson (1):
  Use python via the PATH, rather than hardcoding /usr/bin/python

Enrico Scholz (1):
  opkg-make-index: convert mtime to int before comparing it

Khem Raj (1):
  opkg.py: Add knowledge about License field in ipk headers

Martin Jansa (17):
  opkg.py: use hashlib instead of old md5 module
  opkg.py, arfile.py: report which file has wrong format and use the
same test
  arfile: decode read lines as ascii string before getting fields from
it
  2to3: use subprocess instead of commands
  2to3: print fixes
  2to3: dictionary fixes
  2to3: exception handling fixes
  opkg-make-index: show OSError/IOError
  opkg.py: use string funtcions directly on string variable
  opkg.py: catch TypeError when reading control file, to show which one
is failing
  arfile: fix test
  opkg-make-index: don't use stdout for Packages output and use __str__
instead of __repr__
  opkg.py: cast lines from controlfile as string
  opkg.py: computeFileMD5 only when we have fn, otherwise fails to read
None file
  opkg.py: fix write_package when called from main test
  opkg.py: use textwrap for description writing
  opkg.py: improve test so it prints temporary control file with long
description and then reads it back

Richard Purdie (1):
  opkg-make-index: don't error out when some package disappears

Scott Anderson (1):
  arfile.py: handle six digit UIDs

 arfile.py|   55 +-
 makePackage  |2 +-
 opkg-compare-indexes |   22 
 opkg-list-fields |4 +-
 opkg-make-index  |   74 +++--
 opkg-show-deps   |   28 +--
 opkg-unbuild |4 +-
 opkg-update-index|5 +-
 opkg.py  |  125 +
 9 files changed, 186 insertions(+), 133 deletions(-)

-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 01/22] opkg-make-index: don't error out when some package disappears

2012-03-29 Thread Martin Jansa
From: Richard Purdie richard.pur...@linuxfoundation.org

* If we're building an image and some package rebuilds while this is
  happening some package can be removed/added to the ipk deploy
  directory. The image will not depend on this package so we can
  safely ignore these cases rather than error out.

Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-make-index |   25 -
 1 files changed, 24 insertions(+), 1 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index ae829e6..2f1ae17 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -96,6 +96,7 @@ if (verbose):
 files=glob(pkg_dir + '/*.opk') + glob(pkg_dir + '/*.deb') + glob(pkg_dir + 
'/*.ipk')
 files.sort()
 for filename in files:
+  try:
  basename = os.path.basename(filename)
  pkg = None
  fnameStat = os.stat(filename)
@@ -130,6 +131,12 @@ for filename in files:
to_morgue(basename)
   if opt_s:
print filename
+  except OSError:
+  sys.stderr.write(Package %s disappeared on us!\n % (filename))
+  continue
+  except IOError:
+  sys.stderr.write(Package %s disappeared on us!\n % (filename))
+  continue
 
 pkgsStampsFile = open(stamplist_filename, w)
 for f in pkgsStamps.keys():
@@ -148,6 +155,7 @@ if packages_filename:
 names = packages.packages.keys()
 names.sort()
 for name in names:
+  try:
  pkg = packages.packages[name]
  if locales_dir and pkg.depends:
  depends = string.split(pkg.depends, ',')
@@ -165,6 +173,13 @@ for name in names:
  if (verbose):
   sys.stderr.write(Writing info for package %s\n % (pkg.package,))
  print pkg
+  except OSError:
+  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  continue
+  except IOError:
+  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  continue
+
 if packages_filename:
  sys.stdout.close()
  sys.stdout = old_stdout
@@ -182,7 +197,15 @@ files = {}
 names = packages.packages.keys()
 names.sort()
 for name in names:
- for fn in packages[name].get_file_list():
+ try:
+  fnlist = packages[name].get_file_list()
+ except OSError, e:
+  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  continue
+ except IOError, e:
+  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  continue
+ for fn in fnlist:
   (h,t) = os.path.split(fn)
   if not t: continue
   if not files.has_key(t): files[t] = name+':'+fn
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 02/22] opkg-make-index: convert mtime to int before comparing it

2012-03-29 Thread Martin Jansa
From: Enrico Scholz enrico.sch...@sigma-chemnitz.de

* The st_mtime attribute (which is a float) is compared against a value
  from the timestamp database, which was stored as an integer there.

* When working on a filesystem with precise timestamps the comparision
  will fail nearly everytime hence.

* Although it might be possible to enhance the database to store the
  fractional part too, this will complicate things more than we would
  gain by this change.

Signed-off-by: Enrico Scholz enrico.sch...@sigma-chemnitz.de
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-make-index |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index 2f1ae17..dc98c63 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -101,7 +101,7 @@ for filename in files:
  pkg = None
  fnameStat = os.stat(filename)
  if old_pkg_hash.has_key(basename):
-  if pkgsStamps.has_key(basename) and fnameStat.st_mtime == 
pkgsStamps[basename]:
+  if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == 
pkgsStamps[basename]:
 if (verbose):
sys.stderr.write(Found %s in Packages\n % (filename,))
 pkg = old_pkg_hash[basename]
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 03/22] opkg.py: Add knowledge about License field in ipk headers

2012-03-29 Thread Martin Jansa
From: Khem Raj raj.k...@gmail.com

Signed-off-by: Khem Raj raj.k...@gmail.com
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg.py |8 
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/opkg.py b/opkg.py
index 3fda9b5..8ddc8b8 100644
--- a/opkg.py
+++ b/opkg.py
@@ -145,6 +145,7 @@ class Package:
 self.priority = None
 self.tags = None
 self.fn = fn
+self.license = None
 
 if fn:
 # see if it is deb format
@@ -319,6 +320,12 @@ class Package:
 def get_section(self, section):
 return self.section
 
+def set_license(self, license):
+self.license = license
+
+def get_license(self, license):
+return self.license
+
 def get_file_list(self):
 if not self.fn:
 return []
@@ -425,6 +432,7 @@ class Package:
 if self.description: out = out + Description: %s\n % 
(self.description)
 if self.oe: out = out + OE: %s\n % (self.oe)
 if self.homepage: out = out + HomePage: %s\n % (self.homepage)
+if self.license: out = out + License: %s\n % (self.license)
 if self.priority: out = out + Priority: %s\n % (self.priority)
 if self.tags: out = out + Tags: %s\n % (self.tags)
 out = out + \n
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 04/22] arfile.py: handle six digit UIDs

2012-03-29 Thread Martin Jansa
From: Scott Anderson o...@saaworld.com

* Essentially, the problem is that arfile.py is splitting the ar header with
  white-space instead of fixed-width fields, so two fields would get treated
  as a single field.  This makes things better than before as it now honors
  the fixed field widths.

Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 arfile.py |7 ++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/arfile.py b/arfile.py
index 22548af..8291a2d 100644
--- a/arfile.py
+++ b/arfile.py
@@ -75,7 +75,12 @@ class ArFile:
 l = self.f.readline()
 if not l: break
 l = l.replace('`', '')
-descriptor = l.split()
+# Field lengths from /usr/include/ar.h:
+ar_field_lens = [ 16, 12, 6, 6, 8, 10, 2 ]
+descriptor = []
+for field_len in ar_field_lens:
+descriptor.append(l[:field_len].strip())
+l = l[field_len:]
 #print descriptor
 size = int(descriptor[5])
 memberName = descriptor[0][:-1]
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 05/22] Use python via the PATH, rather than hardcoding /usr/bin/python

2012-03-29 Thread Martin Jansa
From: Christopher Larson kerg...@gmail.com

Signed-off-by: Christopher Larson kerg...@gmail.com
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-list-fields  |2 +-
 opkg-make-index   |2 +-
 opkg-show-deps|2 +-
 opkg-unbuild  |2 +-
 opkg-update-index |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/opkg-list-fields b/opkg-list-fields
index d263b90..da78d53 100755
--- a/opkg-list-fields
+++ b/opkg-list-fields
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, opkg
 
diff --git a/opkg-make-index b/opkg-make-index
index dc98c63..b65dc6e 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, posixpath
 from glob import glob
diff --git a/opkg-show-deps b/opkg-show-deps
index a6681f4..9de1aac 100755
--- a/opkg-show-deps
+++ b/opkg-show-deps
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, posixpath
 from glob import glob
diff --git a/opkg-unbuild b/opkg-unbuild
index eff604b..b5c5227 100755
--- a/opkg-unbuild
+++ b/opkg-unbuild
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/env python
 
 import sys, os, re
 
diff --git a/opkg-update-index b/opkg-update-index
index 807f8f4..3864fa5 100755
--- a/opkg-update-index
+++ b/opkg-update-index
@@ -1,4 +1,4 @@
-#!/usr/bin/env python2.1
+#!/usr/bin/env python
 
 import sys, os
 from glob import glob
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 06/22] opkg.py: use hashlib instead of old md5 module

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg.py |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/opkg.py b/opkg.py
index 8ddc8b8..56e774d 100644
--- a/opkg.py
+++ b/opkg.py
@@ -36,7 +36,7 @@ import tempfile
 import os
 import sys
 import glob
-import md5
+import hashlib
 import re
 import string
 import commands
@@ -188,8 +188,8 @@ class Package:
 def _computeFileMD5(self):
 # compute the MD5.
 f = open(self.fn, rb)
-sum = md5.new()
-while 1:
+sum = hashlib.md5()
+while True:
 data = f.read(1024)
 if not data: break
 sum.update(data)
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 07/22] opkg.py, arfile.py: report which file has wrong format and use the same test

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 arfile.py |   16 +---
 opkg.py   |   11 ++-
 2 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/arfile.py b/arfile.py
index 8291a2d..7a695c6 100644
--- a/arfile.py
+++ b/arfile.py
@@ -40,13 +40,13 @@ class FileSection:
 
 class ArFile:
 
-def __init__(self, f):
+def __init__(self, f, fn):
 self.f = f
 self.directory = {}
 self.directoryRead = False
 
 signature = self.f.readline()
-assert signature == !arch\n
+assert signature == !arch\n or signature == b!arch\n, Old ipk 
format (non-deb) is unsupported, file: %s, magic: %s, expected %s % (fn, 
signature, !arch)
 self.directoryOffset = self.f.tell()
 
 def open(self, fname):
@@ -100,9 +100,10 @@ class ArFile:
 
 if __name__ == __main__:
 if None:
-f = open(sys.argv[1], rb)
+fn = sys.argv[1]
+f = open(fn, rb)
 
-ar = ArFile(f)
+ar = ArFile(f, fn)
 tarStream = ar.open(data.tar.gz)
 print 
 tarStream = ar.open(data.tar.gz)
@@ -120,10 +121,11 @@ if __name__ == __main__:
 for f in os.listdir(dir):
 if not f.endswith(.opk) and not f.endswith(.ipk): continue
 
-print === %s === % f
-f = open(dir + / + f, rb)
+print(=== %s === % f)
+fn = %s/%s % (dir, f)
+f = open(fn, rb)
 
-ar = ArFile(f)
+ar = ArFile(f, fn)
 tarStream = ar.open(control.tar.gz)
 tarf = tarfile.open(control.tar.gz, r, tarStream)
 #tarf.list()
diff --git a/opkg.py b/opkg.py
index 56e774d..31b847c 100644
--- a/opkg.py
+++ b/opkg.py
@@ -138,7 +138,6 @@ class Package:
 #self.size = None
 self.installed_size = None
 self.filename = None
-self.isdeb = 0
 self.file_ext_opk = ipk
 self.homepage = None
 self.oe = None
@@ -150,18 +149,12 @@ class Package:
 if fn:
 # see if it is deb format
 f = open(fn, rb)
-magic = f.read(4)
-f.seek(0, 0)
-if (magic == !ar):
-self.isdeb = 1
-
 
 self.filename = os.path.basename(fn)
-assert self.isdeb == 1, Old ipk format (non-deb) is unsupported
 
 ## sys.stderr.write(  extracting control.tar.gz from %s\n% 
(fn,)) 
 
-ar = arfile.ArFile(f)
+ar = arfile.ArFile(f, fn)
 tarStream = ar.open(control.tar.gz)
 tarf = tarfile.open(control.tar.gz, r, tarStream)
 
@@ -330,7 +323,7 @@ class Package:
 if not self.fn:
 return []
 f = open(self.fn, rb)
-ar = arfile.ArFile(f)
+ar = arfile.ArFile(f, self.fn)
 tarStream = ar.open(data.tar.gz)
 tarf = tarfile.open(data.tar.gz, r, tarStream)
 self.file_list = tarf.getnames()
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 08/22] arfile: decode read lines as ascii string before getting fields from it

2012-03-29 Thread Martin Jansa
* python3 returns them as byte sequence

Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 arfile.py |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arfile.py b/arfile.py
index 7a695c6..92ffee0 100644
--- a/arfile.py
+++ b/arfile.py
@@ -74,6 +74,7 @@ class ArFile:
 if l == \n:
 l = self.f.readline()
 if not l: break
+l = l.decode('ascii')
 l = l.replace('`', '')
 # Field lengths from /usr/include/ar.h:
 ar_field_lens = [ 16, 12, 6, 6, 8, 10, 2 ]
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 11/22] 2to3: dictionary fixes

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 arfile.py|2 +-
 opkg-compare-indexes |   10 +-
 opkg-make-index  |   18 +-
 opkg-show-deps   |   12 ++--
 opkg-update-index|2 +-
 opkg.py  |8 
 6 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/arfile.py b/arfile.py
index 320c9ca..9149387 100644
--- a/arfile.py
+++ b/arfile.py
@@ -50,7 +50,7 @@ class ArFile:
 self.directoryOffset = self.f.tell()
 
 def open(self, fname):
-if self.directory.has_key(fname):
+if fname in self.directory:
 return FileSection(self.f, self.directory[fname][-1], 
int(self.directory[fname][5]))
 
 if self.directoryRead:
diff --git a/opkg-compare-indexes b/opkg-compare-indexes
index e0933ce..0c119e3 100755
--- a/opkg-compare-indexes
+++ b/opkg-compare-indexes
@@ -18,8 +18,8 @@ pkgs1.read_packages_file(pkg_dir1 + '/Packages')
 pkgs2 = opkg.Packages()
 pkgs2.read_packages_file(pkg_dir2 + '/Packages')
 
-names1 = pkgs1.packages.keys()
-names2 = pkgs2.packages.keys()
+names1 = list(pkgs1.packages.keys())
+names2 = list(pkgs2.packages.keys())
 
 ## union of the two names lists
 pkgs = {}
@@ -28,14 +28,14 @@ for name in names1:
 for name in names2:
 pkgs[name] = pkgs2.packages[name]
 
-names = pkgs.keys()
+names = list(pkgs.keys())
 names.sort() 
 for name in names:
 pkg1 = None
 pkg2 = None
-if pkgs1.packages.has_key(name):
+if name in pkgs1.packages:
 pkg1 = pkgs1.packages[name]
-if pkgs2.packages.has_key(name):
+if name in pkgs2.packages:
 pkg2 = pkgs2.packages[name]
 if pkg1 and pkg2 and pkg1.version != pkg2.version:
 print(CHANGED: %s from version %s to %s (%s) % (pkg1.package, 
pkg1.version, pkg2.version, pkg2.maintainer))
diff --git a/opkg-make-index b/opkg-make-index
index c3a292b..2fc8a69 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -79,7 +79,7 @@ if old_filename:
   sys.stderr.write(Reading package list from  + old_filename + \n)
  old_packages = opkg.Packages()
  old_packages.read_packages_file(old_filename)
- for k in old_packages.packages.keys():
+ for k in list(old_packages.packages.keys()):
   p = old_packages.packages[k]
   old_pkg_hash[p.filename] = p
  try:
@@ -100,8 +100,8 @@ for filename in files:
  basename = os.path.basename(filename)
  pkg = None
  fnameStat = os.stat(filename)
- if old_pkg_hash.has_key(basename):
-  if pkgsStamps.has_key(basename) and int(fnameStat.st_mtime) == 
pkgsStamps[basename]:
+ if basename in old_pkg_hash:
+  if basename in pkgsStamps and int(fnameStat.st_mtime) == 
pkgsStamps[basename]:
 if (verbose):
sys.stderr.write(Found %s in Packages\n % (filename,))
 pkg = old_pkg_hash[basename]
@@ -113,7 +113,7 @@ for filename in files:
sys.stderr.write(Reading info for package %s\n % (filename,))
   pkg = opkg.Package(filename)
  pkg_key = (%s:%s % (pkg.package, pkg.architecture))
- if (packages.packages.has_key(pkg_key)):
+ if (pkg_key in packages.packages):
   old_filename = packages.packages[pkg_key].filename
  else:
   old_filename = 
@@ -139,7 +139,7 @@ for filename in files:
   continue
 
 pkgsStampsFile = open(stamplist_filename, w)
-for f in pkgsStamps.keys():
+for f in list(pkgsStamps.keys()):
 pkgsStampsFile.write(%d %s\n % (pkgsStamps[f], f))
 pkgsStampsFile.close()
 
@@ -152,7 +152,7 @@ if packages_filename:
  old_stdout = sys.stdout
  tmp_packages_filename = (%s.%d % (packages_filename, os.getpid()))
  sys.stdout = open(tmp_packages_filename, w)
-names = packages.packages.keys()
+names = list(packages.packages.keys())
 names.sort()
 for name in names:
   try:
@@ -193,7 +193,7 @@ if packages_filename:
 if verbose:
  sys.stderr.write(Generate Packages.filelist file\n)
 files = {}
-names = packages.packages.keys()
+names = list(packages.packages.keys())
 names.sort()
 for name in names:
  try:
@@ -207,13 +207,13 @@ for name in names:
  for fn in fnlist:
   (h,t) = os.path.split(fn)
   if not t: continue
-  if not files.has_key(t): files[t] = name+':'+fn
+  if t not in files: files[t] = name+':'+fn
   else: files[t] = files[t] + ',' + name+':'+fn
 
 if filelist_filename:
  tmp_filelist_filename = (%s.%d % (filelist_filename, os.getpid()))
  sys.stdout = open(tmp_filelist_filename, w)
- names = files.keys()
+ names = list(files.keys())
  names.sort()
  for name in names:
   print((name,files[name]))
diff --git a/opkg-show-deps b/opkg-show-deps
index 524d247..3f5899d 100755
--- a/opkg-show-deps
+++ b/opkg-show-deps
@@ -40,21 +40,21 @@ def split_list(str):
r.append(ii)
  return r
 
-for i in packages.packages.keys():
+for i in list(packages.packages.keys()):
  p = 

[yocto] [opkg-utils][PATCH 12/22] 2to3: exception handling fixes

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 arfile.py   |4 ++--
 opkg-make-index |4 ++--
 opkg.py |2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arfile.py b/arfile.py
index 9149387..3f797a8 100644
--- a/arfile.py
+++ b/arfile.py
@@ -54,11 +54,11 @@ class ArFile:
 return FileSection(self.f, self.directory[fname][-1], 
int(self.directory[fname][5]))
 
 if self.directoryRead:
-raise IOError, (2, AR member not found:  + fname)
+raise IOError(AR member not found:  + fname)
 
 f = self._scan(fname)
 if f == None:
-raise IOError, (2, AR member not found:  + fname)
+raise IOError(AR member not found:  + fname)
 return f
 
 
diff --git a/opkg-make-index b/opkg-make-index
index 2fc8a69..997f286 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -198,10 +198,10 @@ names.sort()
 for name in names:
  try:
   fnlist = packages[name].get_file_list()
- except OSError, e:
+ except OSError as e:
   sys.stderr.write(Package %s disappeared on us!\n % (name))
   continue
- except IOError, e:
+ except IOError as e:
   sys.stderr.write(Package %s disappeared on us!\n % (name))
   continue
  for fn in fnlist:
diff --git a/opkg.py b/opkg.py
index 75ad3d3..ae31794 100644
--- a/opkg.py
+++ b/opkg.py
@@ -176,7 +176,7 @@ class Package:
 elif name == 'size':
 return self._get_file_size()
 else:
-raise AttributeError, name
+raise AttributeError(name)
 
 def _computeFileMD5(self):
 # compute the MD5.
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 13/22] opkg-make-index: show OSError/IOError

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-make-index |   20 ++--
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index 997f286..e0844a7 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -131,11 +131,11 @@ for filename in files:
to_morgue(basename)
   if opt_s:
print(filename)
-  except OSError:
-  sys.stderr.write(Package %s disappeared on us!\n % (filename))
+  except OSError as e:
+  sys.stderr.write(Package %s disappeared on us!\n(%s)\n % (filename, e))
   continue
-  except IOError:
-  sys.stderr.write(Package %s disappeared on us!\n % (filename))
+  except IOError as e:
+  sys.stderr.write(Package %s disappeared on us!\n(%s)\n % (filename, e))
   continue
 
 pkgsStampsFile = open(stamplist_filename, w)
@@ -173,11 +173,11 @@ for name in names:
  if (verbose):
   sys.stderr.write(Writing info for package %s\n % (pkg.package,))
  print(pkg)
-  except OSError:
-  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  except OSError as e:
+  sys.stderr.write(Package %s disappeared on us!\n(%s)\n % (name, e))
   continue
-  except IOError:
-  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  except IOError as e:
+  sys.stderr.write(Package %s disappeared on us!\n(%s)\n % (name, e))
   continue
 
 if packages_filename:
@@ -199,10 +199,10 @@ for name in names:
  try:
   fnlist = packages[name].get_file_list()
  except OSError as e:
-  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  sys.stderr.write(Package %s disappeared on us!\n(%s)\n % (name, e))
   continue
  except IOError as e:
-  sys.stderr.write(Package %s disappeared on us!\n % (name))
+  sys.stderr.write(Package %s disappeared on us!\n(%s)\n % (name, e))
   continue
  for fn in fnlist:
   (h,t) = os.path.split(fn)
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 14/22] opkg.py: use string funtcions directly on string variable

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-make-index |3 +--
 opkg-show-deps  |   11 +--
 opkg.py |5 ++---
 3 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index e0844a7..898a2f6 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -5,7 +5,6 @@ from glob import glob
 import subprocess
 import opkg
 import getopt
-import string
 import re
 
 verbose = 0
@@ -158,7 +157,7 @@ for name in names:
   try:
  pkg = packages.packages[name]
  if locales_dir and pkg.depends:
- depends = string.split(pkg.depends, ',')
+ depends = pkg.depends.split(',')
  locale = None
  for d in depends:
   m = re.match('.*virtual-locale-([a-zA-Z]+).*', d)
diff --git a/opkg-show-deps b/opkg-show-deps
index 3f5899d..d188aad 100755
--- a/opkg-show-deps
+++ b/opkg-show-deps
@@ -4,7 +4,6 @@ import sys, os, posixpath
 from glob import glob
 import opkg
 import getopt
-import string
 import re
 
 verbose = 0
@@ -32,11 +31,11 @@ provider_hash = {}
 
 def split_list(str):
  r = []
- l = string.split(str, ,)
+ l = str.split(,)
  for i in l:
-  ll = string.split(i, |)
+  ll = i.split(|)
   for ii in ll:
-   ii = string.strip(ii)
+   ii = ii.strip()
r.append(ii)
  return r
 
@@ -46,9 +45,9 @@ for i in list(packages.packages.keys()):
   provider_hash[p.package] = []
  provider_hash[p.package].append(p)
  if p.provides:
-  provides = string.split(p.provides, ,)
+  provides = p.provides.split(,)
   for prov in provides:
-   prov = string.strip(prov)
+   prov = prov.strip()
if prov not in provider_hash:
 provider_hash[prov] = []
provider_hash[prov].append(p)
diff --git a/opkg.py b/opkg.py
index ae31794..856e057 100644
--- a/opkg.py
+++ b/opkg.py
@@ -38,7 +38,6 @@ import sys
 import glob
 import hashlib
 import re
-import string
 import subprocess
 from stat import ST_SIZE
 import arfile
@@ -203,10 +202,10 @@ class Package:
 line = control.readline()
 while 1:
 if not line: break
-line = string.rstrip(line)
+line = line.rstrip()
 lineparts = re.match(r'([\w-]*?):\s*(.*)', line)
 if lineparts:
-name = string.lower(lineparts.group(1))
+name = lineparts.group(1).lower()
 value = lineparts.group(2)
 while 1:
 line = control.readline()
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 15/22] opkg.py: catch TypeError when reading control file, to show which one is failing

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg.py |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/opkg.py b/opkg.py
index 856e057..299e84e 100644
--- a/opkg.py
+++ b/opkg.py
@@ -161,7 +161,10 @@ class Package:
 control = tarf.extractfile(control)
 except KeyError:
 control = tarf.extractfile(./control)
-self.read_control(control)
+try:
+self.read_control(control)
+except TypeError as e:
+sys.stderr.write(Cannot read control file '%s' - %s\n % (fn, 
e))
 control.close()
 
 self.scratch_dir = None
@@ -457,9 +460,13 @@ class Packages:
 
 def read_packages_file(self, fn):
 f = open(fn, r)
-while 1:
+while True:
 pkg = Package()
-pkg.read_control(f)
+try:
+pkg.read_control(f)
+except TypeError as e:
+sys.stderr.write(Cannot read control file '%s' - %s\n % (fn, 
e))
+continue
 if pkg.get_package():
 self.add_package(pkg)
 else:
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 16/22] arfile: fix test

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 arfile.py |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arfile.py b/arfile.py
index 3f797a8..88ace46 100644
--- a/arfile.py
+++ b/arfile.py
@@ -131,5 +131,8 @@ if __name__ == __main__:
 tarf = tarfile.open(control.tar.gz, r, tarStream)
 #tarf.list()
 
-f2 = tarf.extractfile(control)
+try:
+f2 = tarf.extractfile(control)
+except KeyError:
+f2 = tarf.extractfile(./control)
 print(f2.read())
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 17/22] opkg-make-index: don't use stdout for Packages output and use __str__ instead of __repr__

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg-make-index |   17 +
 opkg.py |4 ++--
 2 files changed, 11 insertions(+), 10 deletions(-)

diff --git a/opkg-make-index b/opkg-make-index
index 898a2f6..02c425f 100755
--- a/opkg-make-index
+++ b/opkg-make-index
@@ -148,9 +148,8 @@ if opt_s:
 if verbose:
  sys.stderr.write(Generating Packages file\n)
 if packages_filename:
- old_stdout = sys.stdout
  tmp_packages_filename = (%s.%d % (packages_filename, os.getpid()))
- sys.stdout = open(tmp_packages_filename, w)
+ pkgsFile = open(tmp_packages_filename, w)
 names = list(packages.packages.keys())
 names.sort()
 for name in names:
@@ -171,7 +170,10 @@ for name in names:
   continue
  if (verbose):
   sys.stderr.write(Writing info for package %s\n % (pkg.package,))
- print(pkg)
+ if packages_filename:
+  pkgsFile.write(str(pkg))
+ else:
+  print(pkg)
   except OSError as e:
   sys.stderr.write(Package %s disappeared on us!\n(%s)\n % (name, e))
   continue
@@ -180,8 +182,7 @@ for name in names:
   continue
 
 if packages_filename:
- sys.stdout.close()
- sys.stdout = old_stdout
+ pkgsFile.close()
  gzip_filename = (%s.gz % packages_filename)
  tmp_gzip_filename = (%s.%d % (gzip_filename, os.getpid()))
  gzip_cmd = gzip -9c  %s  %s % (tmp_packages_filename, 
tmp_gzip_filename)
@@ -211,12 +212,12 @@ for name in names:
 
 if filelist_filename:
  tmp_filelist_filename = (%s.%d % (filelist_filename, os.getpid()))
- sys.stdout = open(tmp_filelist_filename, w)
+ f = open(tmp_filelist_filename, w)
  names = list(files.keys())
  names.sort()
  for name in names:
-  print((name,files[name]))
- sys.stdout.close()
+  f.write(%s %s\n % (name, files[name]))
+ f.close()
  if posixpath.exists(filelist_filename):
   os.unlink(filelist_filename)
  os.rename(tmp_filelist_filename, filelist_filename)
diff --git a/opkg.py b/opkg.py
index 299e84e..84583be 100644
--- a/opkg.py
+++ b/opkg.py
@@ -402,7 +402,7 @@ class Package:
 ref.parsed_version = parse_version(ref.version)
 return self.parsed_version.compare(ref.parsed_version)
 
-def __repr__(self):
+def __str__(self):
 out = 
 
 # XXX - Some checks need to be made, and some exceptions
@@ -506,7 +506,7 @@ if __name__ == __main__:
 package.set_description(A test of the APIs.)
 
 print()
-sys.stdout.write(package)
+sys.stdout.write(str(package))
 print()
 
 package.write_package(/tmp)
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 18/22] opkg.py: cast lines from controlfile as string

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg.py |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opkg.py b/opkg.py
index 84583be..6c39616 100644
--- a/opkg.py
+++ b/opkg.py
@@ -206,7 +206,7 @@ class Package:
 while 1:
 if not line: break
 line = line.rstrip()
-lineparts = re.match(r'([\w-]*?):\s*(.*)', line)
+lineparts = re.match(r'([\w-]*?):\s*(.*)', str(line))
 if lineparts:
 name = lineparts.group(1).lower()
 value = lineparts.group(2)
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 19/22] opkg.py: computeFileMD5 only when we have fn, otherwise fails to read None file

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg.py |   19 +++
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/opkg.py b/opkg.py
index 6c39616..9daff9e 100644
--- a/opkg.py
+++ b/opkg.py
@@ -182,14 +182,17 @@ class Package:
 
 def _computeFileMD5(self):
 # compute the MD5.
-f = open(self.fn, rb)
-sum = hashlib.md5()
-while True:
-data = f.read(1024)
-if not data: break
-sum.update(data)
-f.close()
-self.md5 = sum.hexdigest()
+if not self.fn:
+self.md5 = 'Unknown'
+else:
+f = open(self.fn, rb)
+sum = hashlib.md5()
+while True:
+   data = f.read(1024)
+   if not data: break
+   sum.update(data)
+f.close()
+self.md5 = sum.hexdigest()
 
 def _get_file_size(self):
 if not self.fn:
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 20/22] opkg.py: fix write_package when called from main test

2012-03-29 Thread Martin Jansa
* there is no self.meta_dir before self._setup_scratch_area
* control file needs to be closed before packing it with tar, otherwise it 
could be empty

Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg.py |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/opkg.py b/opkg.py
index 9daff9e..ad3a695 100644
--- a/opkg.py
+++ b/opkg.py
@@ -344,11 +344,11 @@ class Package:
 return self.file_ext_opk
 
 def write_package(self, dirname):
-buf = self.render_control()
+self._setup_scratch_area()
 file = open(%s/control % self.meta_dir, 'w')
-file.write(buf)
+file.write(str(self))
+file.close()
 
-self._setup_scratch_area()
 cmd = cd %s ; tar cvfz %s/control.tar.gz control % (self.meta_dir,
   self.scratch_dir)
 
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 21/22] opkg.py: use textwrap for description writing

2012-03-29 Thread Martin Jansa
* description field in oe-core sometimes has extra line-feeds and is long
* extra line-feeds breaks read_control, because empty line means next Package
* long descriptions should be wrapped and properly indented, so they are parsed 
back properly

Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg.py |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/opkg.py b/opkg.py
index ad3a695..2294160 100644
--- a/opkg.py
+++ b/opkg.py
@@ -42,6 +42,7 @@ import subprocess
 from stat import ST_SIZE
 import arfile
 import tarfile
+import textwrap
 
 class Version:
 A class for holding parsed package version information.
@@ -427,7 +428,9 @@ class Package:
 if self.installed_size: out = out + InstalledSize: %d\n % 
int(self.installed_size)
 if self.filename: out = out + Filename: %s\n % (self.filename)
 if self.source: out = out + Source: %s\n % (self.source)
-if self.description: out = out + Description: %s\n % 
(self.description)
+if self.description:
+printable_description = textwrap.dedent(self.description).strip()
+out = out + Description: %s\n % 
textwrap.fill(printable_description, width=74, initial_indent=' ', 
subsequent_indent=' ')
 if self.oe: out = out + OE: %s\n % (self.oe)
 if self.homepage: out = out + HomePage: %s\n % (self.homepage)
 if self.license: out = out + License: %s\n % (self.license)
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] [opkg-utils][PATCH 22/22] opkg.py: improve test so it prints temporary control file with long description and then reads it back

2012-03-29 Thread Martin Jansa
Signed-off-by: Martin Jansa martin.ja...@gmail.com
---
 opkg.py |   12 +++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/opkg.py b/opkg.py
index 2294160..27cbc2a 100644
--- a/opkg.py
+++ b/opkg.py
@@ -509,11 +509,21 @@ if __name__ == __main__:
 package.set_architecture(arm)
 package.set_maintainer(Testing testing@testing.testing)
 package.set_depends(libc)
-package.set_description(A test of the APIs.)
+package.set_description(A test of the APIs. And very long descriptions so 
often used in oe-core\nfoo\n\n\nbar)
 
 print()
 sys.stdout.write(str(package))
 print()
+f = open(/tmp/control, w)
+f.write(str(package))
+f.close()
+
+f = open(/tmp/control, r)
+package2 = Package()
+package2.read_control(f)
+print()
+sys.stdout.write(str(package2))
+print()
 
 package.write_package(/tmp)
 
-- 
1.7.8.5

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] which yocto doc explains bitbake assignment variations?

2012-03-29 Thread Robert P. J. Day

  just to be absolutely clear so i don't misunderstand:

On Thu, 29 Mar 2012, Rudolf Streif wrote:

 VAR = value

 In this example, VAR is set to value.

  so the = assignment will *always* set the variable to that value,
regardless of what combination of =, ?= or ??= has come before it,
correct?

 Early Default Value Assignment (?=)

 A variable can be early-assigned a default value using the ?= assignment 
 operator:

 A ?= 1
 B ?= 2
 B ?= 3

 In this example A will contain 1 if it was not previously set. B will 
 contain 2 because
 the ?= assignment operator is immediate meaning that if there are 
 multiple ?= assignments
 to a single variable, the first one will be used.

  and the first ?= will be processed, even if there were earlier ??=
assignments, correct?  (obviously not if there were earlier =
assignments.)

 A ??= 1
 B ??= 2
 B ??= 3

 In this example A will contain 1 if it was not previously set. B will 
 contain 3 because
 the ??= assignment operator is a late or lazy assignment operator and 
 assignment will not
 take place until the end of the parsing process. If there are 
 multiple ??= assignments to a
 single variable, the last one will be used.

  however, this weak assignment is cancelled by the appearance of
either a = or a ?= assignment at any time, yes?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] How to change the startup application

2012-03-29 Thread Autif Khan
 I got a question about how to change the startup application with Yocto for 
 images generated with Yocto.
 And I googled it and landed on this page:
 https://wiki.yoctoproject.org/wiki/FAQ:How_do_I_change_and_add_startup_scripts.
  Pretty good, someone
 was thinking about the same thing. But this page turns out to be empty. It 
 seems that we need to get
 better than this.

 I'm wondering if someone could update this wiki page or if the information is 
 somewhere else...

I do not know of if the information is elsewhere - I had to find this
information for my project

Here is my stab at it (already updated the wiki):

Q: How do I change and add startup scripts?

A: Edit meta/recipes-sato/matchbox-sato/matchbox-session-sato/session.
Of course, if you have your own meta-layer, append the
matchbox-session-sato_0.1.bb recipe.

Disable 'matchbox-desktop' and 'matchbox-panel', however, do not
disable 'exec matchbox-window-manager ...'

Don't forget to run your app as a background process

For example, the following code will start the fifteen game:

#matchbox-desktop 

# Lines containing feature-[foo] are removed at build time if the machine
# doesn't have the feature foo.

#START_APPLETS=showdesktop,windowselector
#END_APPLETS=clock,battery,systray,startup-notify,notify
#END_APPLETS=openmoko-panel-gsm,$END_APPLETS # feature-phone

#matchbox-panel --titlebar --start-applets $START_APPLETS
--end-applets $END_APPLETS 

/usr/games/fifteen 

exec matchbox-window-manager -theme Sato -use_desktop_mode decorated
-use_cursor $SHOWCURSOR $@
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


[yocto] Bugs for 1.2 release

2012-03-29 Thread Zhang, Jessica
Hi All,



As we're approaching 1.2 release, the bug triage team comes up an addendum to 
the existing process.  We're marking certain medium+normal bugs with a tag 
[1.2] in the whiteboard area.  This means these bugs are considered a desired 
to be fixed in the 1.2 release timeframe.  So for each of us that working on 
bug fixing, the working order should be:  1st. critical, high major bugs, 2nd, 
medium bugs with a [1.2] tag, 3rd. since we've already tagged RC1,  then other 
medium bugs that shouldn't introduce a too invasive/massive of a change.



Thanks,

Jessica





___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] which yocto doc explains bitbake assignment variations?

2012-03-29 Thread Rudolf Streif
1. yes, = will always override any prior ?= or ??= and any subsequent ?= or
??= will not change the setting anymore.

2. yes, a ?= following a ??= will set the variable. Only a = will be
override the setting of the ?=. Any following ?= and ??= will not change
the setting.

3. yes, a ?= or = following a ??= will set the variable.


Just try it. Put a variable (FOO) in local.conf and use bitbake -e | grep
FOO

FOO ??= bar
FOO ?= barbar

:rjs

On Thu, Mar 29, 2012 at 3:34 PM, Robert P. J. Day rpj...@crashcourse.cawrote:


  just to be absolutely clear so i don't misunderstand:

 On Thu, 29 Mar 2012, Rudolf Streif wrote:

  VAR = value
 
  In this example, VAR is set to value.

   so the = assignment will *always* set the variable to that value,
 regardless of what combination of =, ?= or ??= has come before it,
 correct?

  Early Default Value Assignment (?=)
 
  A variable can be early-assigned a default value using
 the ?= assignment operator:
 
  A ?= 1
  B ?= 2
  B ?= 3
 
  In this example A will contain 1 if it was not previously
 set. B will contain 2 because
  the ?= assignment operator is immediate meaning that if there are
 multiple ?= assignments
  to a single variable, the first one will be used.

   and the first ?= will be processed, even if there were earlier ??=
 assignments, correct?  (obviously not if there were earlier =
 assignments.)

  A ??= 1
  B ??= 2
  B ??= 3
 
  In this example A will contain 1 if it was not previously
 set. B will contain 3 because
  the ??= assignment operator is a late or lazy assignment operator
 and assignment will not
  take place until the end of the parsing process. If there are
 multiple ??= assignments to a
  single variable, the last one will be used.

   however, this weak assignment is cancelled by the appearance of
 either a = or a ?= assignment at any time, yes?

 rday

 --

 
 Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

 Twitter:   http://twitter.com/rpjday
 LinkedIn:   http://ca.linkedin.com/in/rpjday
 

___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto