From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f176.google.com (mail-wi0-f176.google.com [209.85.212.176]) by mail.openembedded.org (Postfix) with ESMTP id CC6177404E; Thu, 24 Sep 2015 05:54:30 +0000 (UTC) Received: by wicgb1 with SMTP id gb1so234443736wic.1; Wed, 23 Sep 2015 22:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=DX4SfVqiu3MMuAH8XuuZ1QoJI/xxqzt8RoqQlk20LK4=; b=iufxCYKeSms3SWhT3uk6guR2pmuJa6+OL5tNlvJFiOVhQed4Ws5D5EsMp/I0be4+lq CLIp5w6fIA8MRVdA5YC18Fl58SytXgjVoXrviyrRa/bodBL5s7sFvhkxUdBxuUL+K9h4 4GzkkjLz7A8U6j70OdxjOLFfzGSojc833fe8wp6VzLzLNET3or+6izckzUb8em/brt1f qVH3aZlKPIdc0kRDm2j5f0teCjPNTR3gp0clh4c6Eaixmn+ayYaV/K1RZqRk5AyuL1n1 Rt7soiVCX24CCz/iSG41EuS4R3JSWW6Hm7rnXz+KrhucbKp4ZonypOmQ36249sI58dT1 Ekmw== X-Received: by 10.194.174.201 with SMTP id bu9mr46567190wjc.73.1443074070553; Wed, 23 Sep 2015 22:54:30 -0700 (PDT) Received: from localhost (ip-86-49-34-37.net.upcbroadband.cz. [86.49.34.37]) by smtp.gmail.com with ESMTPSA id fu5sm1500859wic.0.2015.09.23.22.54.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 23 Sep 2015 22:54:29 -0700 (PDT) From: Martin Jansa X-Google-Original-From: Martin Jansa Date: Thu, 24 Sep 2015 07:54:44 +0200 To: openembedded-devel@lists.openembedded.org Message-ID: <20150924055444.GA2404@jama> References: <20150923211259.12BA050583@opal.openembedded.org> MIME-Version: 1.0 In-Reply-To: <20150923211259.12BA050583@opal.openembedded.org> User-Agent: Mutt/1.5.24 (2015-08-30) Cc: openembedded-commits@lists.openembedded.org Subject: Re: [oe-commits] Robert Yang : insane.bbclass: make package_qa_clean_path return a relative path X-BeenThere: openembedded-devel@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: openembedded-devel@lists.openembedded.org List-Id: Using the OpenEmbedded metadata to build Distributions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Sep 2015 05:54:33 -0000 X-Groupsio-MsgNum: 57532 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Sep 23, 2015 at 09:12:59PM +0000, git@git.openembedded.org wrote: > Module: openembedded-core.git > Branch: master-next > Commit: 67a1e4b087a39db04370685616d5b439b0f2b505 > URL: http://git.openembedded.org/?p=3Dopenembedded-core.git&a=3Dcommit= ;h=3D67a1e4b087a39db04370685616d5b439b0f2b505 >=20 > Author: Robert Yang > Date: Tue Sep 15 19:28:48 2015 -0700 >=20 > insane.bbclass: make package_qa_clean_path return a relative path >=20 > Make package_qa_clean_path() return something like "work/path/to/file" > rather than "/work/path/to/file", the relative path is a little clear. >=20 > Signed-off-by: Robert Yang > Signed-off-by: Richard Purdie >=20 > --- >=20 > meta/classes/insane.bbclass | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass > index 72120f5..05e31a7 100644 > --- a/meta/classes/insane.bbclass > +++ b/meta/classes/insane.bbclass > @@ -167,7 +167,7 @@ def package_qa_get_machine_dict(): > =20 > def package_qa_clean_path(path,d): > """ Remove the common prefix from the path. In this case it is the T= MPDIR""" > - return path.replace(d.getVar('TMPDIR',True),"") > + return path.replace(d.getVar("TMPDIR", True) + "/", "") Isn't path[len(d.getVar("TMPDIR", True))+1:] a bit faster and safer in cases where the TMPDIR path is included multiple times? Or is this function meant to be used also for path which doesn't start with TMPDIR? Then I agree it should stay replace, but maybe with maxreplace parameter set to 1. Same problem with "absolute" path is other QA check I was recently changing (and I've kept leading / after seeing it somewhere else :)). Regards, > =20 > def package_qa_write_error(type, error, d): > logfile =3D d.getVar('QA_LOGFILE', True) >=20 > --=20 > _______________________________________________ > Openembedded-commits mailing list > Openembedded-commits@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-commits --=20 Martin 'JaMa' Jansa jabber: Martin.Jansa@gmail.com --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlYDkCQACgkQN1Ujt2V2gBzjrACgj1CjmITEWs26JTY4B5XQF4kj +M8AoKMhjBZHzD8Bhe0n35d96XSxGni9 =P3o+ -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn--