public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] ubifs-img: Correct function name
@ 2019-07-17 11:32 Quirin Gylstorff
  2019-07-17 11:53 ` Henning Schild
  2019-07-17 12:31 ` [PATCH v2] " Quirin Gylstorff
  0 siblings, 2 replies; 6+ messages in thread
From: Quirin Gylstorff @ 2019-07-17 11:32 UTC (permalink / raw)
  To: isar-users; +Cc: Quirin Gylstorff, Henning Schild

Fix python exception:

ERROR: /work/isar-siemens/recipes-core/images/ubi-fit-swu-demo-image.bb: Error executing a python functi
on in <code>:

The stack trace of python calls that resulted in this exception/failure was:
File: '<code>', lineno: 5, function: <module>
     0001:__anon_125__work_isar_meta_classes_base_bbclass(d)
     0002:__anon_144__work_isar_meta_classes_base_bbclass(d)
     0003:__anon_34__work_isar_meta_classes_image_bbclass(d)
     0004:__anon_20__work_isar_meta_classes_buildchroot_bbclass(d)
 *** 0005:__anon_9__work_isar_meta_classes_ubifs_img_bbclass(d)
     0006:__anon_9__work_isar_meta_classes_ubi_img_bbclass(d)
File: '/work/isar/meta/classes/ubifs-img.bbclass', lineno: 8, function: __anon_9__work_isar_meta_classes
_ubifs_img_bbclass
     0004:# SPDX-License-Identifier: MIT
     0005:
     0006:python() {
     0007:    if not d.getVar("MKUBIFS_ARGS"):
 *** 0008:        raise bb.parse.skiprecipe("mkubifs_args must be set")
     0009:}
     0010:
     0011:UBIFS_IMAGE_FILE ?= "${IMAGE_FULLNAME}.ubifs.img"
     0012:
Exception: AttributeError: module 'bb.parse' has no attribute 'skiprecipe'
---
 meta/classes/ubifs-img.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/ubifs-img.bbclass b/meta/classes/ubifs-img.bbclass
index aeb986c..78926f6 100644
--- a/meta/classes/ubifs-img.bbclass
+++ b/meta/classes/ubifs-img.bbclass
@@ -5,7 +5,7 @@
 
 python() {
     if not d.getVar("MKUBIFS_ARGS"):
-        raise bb.parse.skiprecipe("mkubifs_args must be set")
+        raise bb.parse.SkipRecipe("mkubifs_args must be set")
 }
 
 UBIFS_IMAGE_FILE ?= "${IMAGE_FULLNAME}.ubifs.img"
-- 
2.20.1


^ permalink raw reply	[flat|nested] 6+ messages in thread
* Re: [PATCH 2/3] meta-isar: Add example for user settings
@ 2019-07-23 12:00 Quirin Gylstorff
  2019-07-23 12:06 ` [PATCH 0/3] Add skeleton dir option Quirin Gylstorff
  0 siblings, 1 reply; 6+ messages in thread
From: Quirin Gylstorff @ 2019-07-23 12:00 UTC (permalink / raw)
  To: isar-users

On 7/23/19 10:08 AM, Henning Schild wrote:
> Am Fri, 19 Jul 2019 14:38:22 +0200
> schrieb Quirin Gylstorff <quirin.gylstorff@siemens.com>:
> 
>> Add a new image which creates two user. One with default skel from
>> /etc/skel the other from /etc/extra-skel
>>
>> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
>> ---
>>   .../example-user-skel_0.1.bb                  | 20 ++++++++++++
>>   .../recipes-core/images/isar-image-user.bb    | 31
>> +++++++++++++++++++ 2 files changed, 51 insertions(+)
>>   create mode 100644
>> meta-isar/recipes-app/example-user-skel/example-user-skel_0.1.bb
>> create mode 100644 meta-isar/recipes-core/images/isar-image-user.bb
>>
>> diff --git
>> a/meta-isar/recipes-app/example-user-skel/example-user-skel_0.1.bb
>> b/meta-isar/recipes-app/example-user-skel/example-user-skel_0.1.bb
>> new file mode 100644 index 0000000..c53d7f6 --- /dev/null
>> +++ b/meta-isar/recipes-app/example-user-skel/example-user-skel_0.1.bb
>> @@ -0,0 +1,20 @@
>> +# Sample Skel modifiction for ISAR
>> +#
>> +# This software is a part of ISAR.
>> +# Copyright (C) Siemens AG, 2019
>> +#
>> +# SPDX-License-Identifier: MIT
>> +
>> +DESCRIPTION = "Sample Skel modifiction for ISAR"
>> +MAINTAINER = "Your name here <you@domain.com>"
>> +DEBIAN_DEPENDS = "apt (>= 0.4.2), passwd, bash"
> 
> This looks wrong and copied from an outdated example-raw. My guess is
> this one can be empty.
> 
My mistake, I will remove the dependencies.
>> +
>> +inherit dpkg-raw
>> +
>> +do_install() {
>> +	bbnote "Create a fake extra skel"
>> +	echo "# empty config file" > ${WORKDIR}/${PN}.conf
>> +	install -v -d ${D}/etc/extra-skel
>> +	install -v -m 644 ${WORKDIR}/${PN}.conf
>> ${D}/etc/extra-skel/${PN}.conf +}
>> \ No newline at end of file
>> diff --git a/meta-isar/recipes-core/images/isar-image-user.bb
>> b/meta-isar/recipes-core/images/isar-image-user.bb new file mode
>> 100644 index 0000000..f8464f0
>> --- /dev/null
>> +++ b/meta-isar/recipes-core/images/isar-image-user.bb
>> @@ -0,0 +1,31 @@
>> +# User image recipe
>> +#
>> +# This software is a part of ISAR.
>> +# Copyright (C) Siemens AG, 2019
>> +#
>> +# SPDX-License-Identifier: MIT
>> +
>> +DESCRIPTION = "User Isar image"
>> +
>> +LICENSE = "gpl-2.0"
>> +LIC_FILES_CHKSUM =
>> "file://${LAYERDIR_core}/licenses/COPYING.GPLv2;md5=751419260aa954499f7abaabaa882bbe"
>> + +inherit image
>> +
>> +IMAGE_INSTALL += "example-user-skel"
>> +
>> +# create a user isar with no password and default home
>> +USERS += "isar"
>> +USER_isar[password] = ""
>> +USER_isar[uid] = "1000"
>> +USER_isar[groups] = "audio video "
>> +USER_isar[shell] = "/bin/bash"
>> +USER_isar[flags] = "allow-empty-password create-home"
>> +# create a user isarskel with no password and home generated
>> from /etc/extra-skel +USERS += "isarskel"
>> +USER_isarskel[password] = ""
>> +USER_isarskel[uid] = "2000"
>> +USER_isarskel[groups] = "audio video "
>> +USER_isarskel[shell] = "/bin/bash"
>> +USER_isarskel[skel] = "/etc/extra-skel"
>> +USER_isarskel[flags] = "allow-empty-password create-home"
> 
> I am not sure an extra image type makes a whole lot of sense here.
> Either isar-image-base or nothing i guess. Some sort of test would be
> nice but an extra image is too much.
> 
> Have a look at meta-isar/conf/local.conf.sample, that is the root of
> running raw isar and it is used for CI testing.
> 
> Henning
> 

OK thanks for the hint,  I will move the user settings to the base image.

Quirin

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

end of thread, other threads:[~2019-07-29 11:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 11:32 [PATCH] ubifs-img: Correct function name Quirin Gylstorff
2019-07-17 11:53 ` Henning Schild
2019-07-17 12:31 ` [PATCH v2] " Quirin Gylstorff
2019-07-24  7:49   ` Henning Schild
2019-07-29 11:39   ` Baurzhan Ismagulov
2019-07-23 12:00 [PATCH 2/3] meta-isar: Add example for user settings Quirin Gylstorff
2019-07-23 12:06 ` [PATCH 0/3] Add skeleton dir option Quirin Gylstorff
2019-07-23 12:06   ` [PATCH v2] ubifs-img: Correct function name Quirin Gylstorff

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox