Return-Path: Received: from bastet.se.axis.com (bastet.se.axis.com [195.60.68.11]) by mail.openembedded.org (Postfix) with ESMTP id 2EF0874813 for ; Wed, 9 Jan 2019 11:14:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 9D93618136; Wed, 9 Jan 2019 12:14:31 +0100 (CET) X-Axis-User: NO X-Axis-NonUser: YES X-Virus-Scanned: Debian amavisd-new at bastet.se.axis.com Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id OBszfVizlQ4l; Wed, 9 Jan 2019 12:14:29 +0100 (CET) Received: from boulder02.se.axis.com (boulder02.se.axis.com [10.0.8.16]) by bastet.se.axis.com (Postfix) with ESMTPS id E14DE182D7; Wed, 9 Jan 2019 12:14:29 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D14401A072; Wed, 9 Jan 2019 12:14:29 +0100 (CET) Received: from boulder02.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C61051A06F; Wed, 9 Jan 2019 12:14:29 +0100 (CET) Received: from seth.se.axis.com (unknown [10.0.2.172]) by boulder02.se.axis.com (Postfix) with ESMTP; Wed, 9 Jan 2019 12:14:29 +0100 (CET) Received: from XBOX04.axis.com (xbox04.axis.com [10.0.5.18]) by seth.se.axis.com (Postfix) with ESMTP id BA716380; Wed, 9 Jan 2019 12:14:29 +0100 (CET) Received: from xbox12.axis.com (10.0.5.26) by XBOX04.axis.com (10.0.5.18) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Wed, 9 Jan 2019 12:14:29 +0100 Received: from XBOX04.axis.com (10.0.5.18) by xbox12.axis.com (10.0.5.26) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Wed, 9 Jan 2019 12:14:29 +0100 Received: from XBOX04.axis.com ([fe80::210a:724b:68cb:a917]) by XBOX04.axis.com ([fe80::210a:724b:68cb:a917%22]) with mapi id 15.00.1365.000; Wed, 9 Jan 2019 12:14:29 +0100 From: Peter Kjellerstedt To: "liu.ming50@gmail.com" , "openembedded-core@lists.openembedded.org" Thread-Topic: [OE-core] [PATCH V2] meta: handle IMAGE_ROOTFS/IMGDEPLOYDIR by task varflags Thread-Index: AQHUpd06sAUnZGg0fE6SPJ8dbHjlaKWmtn5w Date: Wed, 9 Jan 2019 11:14:29 +0000 Message-ID: <2aa2b4c983f94e7399a1620dad482189@XBOX04.axis.com> References: <1546792257-4686-1-git-send-email-liu.ming50@gmail.com> In-Reply-To: <1546792257-4686-1-git-send-email-liu.ming50@gmail.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.0.5.60] MIME-Version: 1.0 X-TM-AS-GCONF: 00 Subject: Re: [PATCH V2] meta: handle IMAGE_ROOTFS/IMGDEPLOYDIR by task varflags X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Jan 2019 11:14:31 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable > -----Original Message----- > From: openembedded-core-bounces@lists.openembedded.org core-bounces@lists.openembedded.org> On Behalf Of liu.ming50@gmail.com > Sent: den 6 januari 2019 17:31 > To: openembedded-core@lists.openembedded.org > Cc: Ming Liu > Subject: [OE-core] [PATCH V2] meta: handle IMAGE_ROOTFS/IMGDEPLOYDIR by > task varflags >=20 > From: Ming Liu >=20 > I found a issue that sometimes there are leftovers in IMAGE_ROOTFS > that are generated by the previous builds. I think this is caused by > IMAGE_ROOTFS is not in do_rootfs[cleandirs], so add it in provided that > INC_RPM_IMAGE_GEN is not set. >=20 > IMGDEPLOYDIR could be added to do_rootfs[dirs] as well, hence some code > in rootfs.py to generate the IMAGE_ROOTFS/IMGDEPLOYDIR directories > could be removed. >=20 > Signed-off-by: Ming Liu > --- > meta/classes/image.bbclass | 4 ++-- > meta/lib/oe/rootfs.py | 5 ----- > 2 files changed, 2 insertions(+), 7 deletions(-) >=20 > diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass > index 11927f3..b6bf97a 100644 > --- a/meta/classes/image.bbclass > +++ b/meta/classes/image.bbclass > @@ -251,8 +251,8 @@ fakeroot python do_rootfs () { >=20 > progress_reporter.finish() > } > -do_rootfs[dirs] =3D "${TOPDIR}" > -do_rootfs[cleandirs] +=3D "${S} ${IMGDEPLOYDIR}" > +do_rootfs[dirs] =3D "${IMAGE_ROOTFS} ${IMGDEPLOYDIR} ${TOPDIR}" > +do_rootfs[cleandirs] +=3D "${S} ${IMGDEPLOYDIR} ${@["${IMAGE_ROOTFS}", "= "][(d.getVar('INC_RPM_IMAGE_GEN') =3D=3D '1')]}" A bit more readable: do_rootfs[cleandirs] +=3D "${S} ${IMGDEPLOYDIR} ${@'${IMAGE_ROOTFS}' if d.g= etVar('INC_RPM_IMAGE_GEN') !=3D '1' else ''}" > do_rootfs[umask] =3D "022" > do_rootfs[file-checksums] +=3D "${POSTINST_INTERCEPT_CHECKSUMS}" > addtask rootfs after do_prepare_recipe_sysroot > diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py > index 4273891..945c769 100644 > --- a/meta/lib/oe/rootfs.py > +++ b/meta/lib/oe/rootfs.py > @@ -19,7 +19,6 @@ class Rootfs(object, metaclass=3DABCMeta): > self.d =3D d > self.pm =3D None > self.image_rootfs =3D self.d.getVar('IMAGE_ROOTFS') > - self.deploydir =3D self.d.getVar('IMGDEPLOYDIR') > self.progress_reporter =3D progress_reporter > self.logcatcher =3D logcatcher >=20 > @@ -188,10 +187,6 @@ class Rootfs(object, metaclass=3DABCMeta): > post_process_cmds =3D self.d.getVar("ROOTFS_POSTPROCESS_COMMAND"= ) > rootfs_post_install_cmds =3D self.d.getVar('ROOTFS_POSTINSTALL_C= OMMAND') >=20 > - bb.utils.mkdirhier(self.image_rootfs) > - > - bb.utils.mkdirhier(self.deploydir) > - > execute_pre_post_process(self.d, pre_process_cmds) >=20 > if self.progress_reporter: > -- > 2.7.4 //Peter