From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6787079713742389248 X-Received: by 2002:aa7:8bd0:: with SMTP id s16mr20578573pfd.101.1586161850188; Mon, 06 Apr 2020 01:30:50 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a65:6455:: with SMTP id s21ls10031273pgv.9.gmail; Mon, 06 Apr 2020 01:30:49 -0700 (PDT) X-Google-Smtp-Source: APiQypIQRkaTI+Jq6RRXzgg1r0fZOmtTHQbl8mI5K429lAxNT/r1tFF3SScyiSWaEPHlUaRL0WQA X-Received: by 2002:a62:2f46:: with SMTP id v67mr21311136pfv.7.1586161849597; Mon, 06 Apr 2020 01:30:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586161849; cv=none; d=google.com; s=arc-20160816; b=OBnPbJQjPt9nHhHVAU+NU7kJtsjJ+OZaUTScOiR3mf9VVywzCQNy6GnqoQ51x2VuTp j82kT50bqrEsjbL8TPV4yrmWoKTE3SPgzStHQSOeJ86g7upTLWTpQWucWp7NQf3jInm5 KLWGybraw58p5rEPBQcHix5/NrtckY2W4vhlHw+Lfwj5/b7vaIrDHBMO7+8Kcdi0+wXY rfpvhChuuVlfKht3iw+W2w8p2mDCe+cHlFTa6a4wjmMB3Emv96xY8u1wzSo0fNWD3xpl KrSPZ1rK+NpLyGTwmS91W6AUjwPw4+UaMjVXG2tWUpQPGTH/XmY196OONUMN+0FoI6H1 8kjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=TTCgKDn296fgljRBuCkJyGTJ+2ickod4of+xakxf+WM=; b=bD7a+edboisKbcuYM0gnwh2bFvdSkWScmnC8osEZLQjBC9jTnXQ/yBt5F83uf3PGAk tWm+j4oCIJdGkc33sJMpsQCR/Mwhe/+WDv6qzJFP7enHVecC6nQZ/kExR12z05yXb/So P8kuQNltKWXRUFmfEOp15WVIkI3tOvS2DcOCVghwWhHygtCzIgqhVVC3GNLaAroV/Jr0 dzLt8b41ouR8STWpmvaA7lASbc61OwW/BS4DAnhVkAW9mr+eLkDqyXETUlMp1XUQ/MqW sMS69vNqFTLPzJPKUV/8G/vP5xR/lTzvF+MKd7ngaK3oyh6cIRbCOyYwv+GnK+H5KqGB cirQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="n/TbD6K4"; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::72a as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from mail-qk1-x72a.google.com (mail-qk1-x72a.google.com. [2607:f8b0:4864:20::72a]) by gmr-mx.google.com with ESMTPS id y1si796624pjv.2.2020.04.06.01.30.49 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 06 Apr 2020 01:30:49 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::72a as permitted sender) client-ip=2607:f8b0:4864:20::72a; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="n/TbD6K4"; spf=pass (google.com: domain of vijaikumar.kanagarajan@gmail.com designates 2607:f8b0:4864:20::72a as permitted sender) smtp.mailfrom=vijaikumar.kanagarajan@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: by mail-qk1-x72a.google.com with SMTP id l25so7254444qkk.3 for ; Mon, 06 Apr 2020 01:30:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=TTCgKDn296fgljRBuCkJyGTJ+2ickod4of+xakxf+WM=; b=n/TbD6K4GFgTuzmFgwZhVPoQrh/uZ9Jk7T1zk+hfbnh0mhyNKj1P5LlxVBxW5FNCGU qZiClXr0lrlVgGFUeMnBZkvTJQKC05BkJE09YJMI445s6v/D1ORmOYhn85HH/5PBriGw DTmf7AjeVoxenBLr5lBh1wlcXKGG1NzzsmEfVCd1QHgyXUEksbjGEOnyAXobvnffezON fP0sbwvDkyFPoAEJKtgczxykmhbupIpx51YaytYiVY/MXMGvkLsDnGZXWpHZRRdB2jre uDKQkoDcHgwNQdYrbhkuqBuBBObS4sDD8VpOVNI55ruGcMi4Ac8rQ33p2tiiNRpY3u0l uo+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=TTCgKDn296fgljRBuCkJyGTJ+2ickod4of+xakxf+WM=; b=V/EM1oSmrpkymCzBtBi5/dYfxb4wmjOCR5n/XR1tcNO24cuDBcYgM/W47UpQBQ2uuj NHppDOl+Lh+huBgkI0igiRLugmbCuefjzm74EUD1lkJ5nTidS3SSg7ZjF3Yonlh4bMiH mNyKGUNj5bwdDTtwwTtkv6F1121kmKKGvk65jE12QvA32J1oJjXhhK5DUKbIEwy5zXru dd24b+SSmK+AVNjfbYSlomThDpwwTfeXxRIGyIDgUht+GbThdOMe9r3F17Ezyvun3T8M q6Sfn8MyDlonRTEPIM4tTlp94/2a2AlqB9Ao7+CaO8oJOyG7MRVnMuZBVLPDGbgQMWmc uyaA== X-Gm-Message-State: AGi0PuaulgHlUlNYYHElXTjTBwQnzM+c2OliKQ6flDI+2lQmAQiy52+J bzA1iA639QMB6s2ez3FX6/1Fid4OwOUCOZYcSvllA0WPd4A= X-Received: by 2002:a37:9e17:: with SMTP id h23mr15296310qke.315.1586161848963; Mon, 06 Apr 2020 01:30:48 -0700 (PDT) MIME-Version: 1.0 References: <20200128193520.26504-1-Vijaikumar_Kanagarajan@mentor.com> <20200405164943.mccmlrje526qxyw3@yssyq.m.ilbers.de> In-Reply-To: <20200405164943.mccmlrje526qxyw3@yssyq.m.ilbers.de> From: vijai kumar Date: Mon, 6 Apr 2020 14:00:37 +0530 Message-ID: Subject: Re: [PATCH] Introduce SCRIPTSDIR variable To: isar-users Content-Type: text/plain; charset="UTF-8" X-TUID: o8eZsYrHZ7Ko On Sun, Apr 5, 2020 at 10:19 PM Baurzhan Ismagulov wrote: > > Hello Vijai Kumar, > > On Wed, Jan 29, 2020 at 01:05:20AM +0530, Vijai Kumar K wrote: > > ISARROOT is mostly used with wic implemetation for the scripts > > directory. Introduce SCRIPTSDIR to satisfy wic. > > > > When ISARROOT equivalent is needed, derive it from SCRIPTSDIR. > > Thanks for pursuing this annoying issue. I like the concept of having a special > variable for the directory. The advantage is that the code doesn't rely on a > specific directory structure. > > Now the patch fails to apply upon d90c2ab "wic-img: allow wic to find bitbake > binary", submitted shortly before yours. Looking at both together, I realize > that deriving the ISARROOT equivalent from SCRIPTSDIR makes it rely on the > directory structure again. Yes. Indeed. Please see comments below. > > One possibilty would be to introduce both SCRIPTSDIR and the ISARROOT > equivalent (calling it e.g. ISARDIR). What do you think? Hi Baurzhan, >>From the current ISAR next, there are atleast 4 different uses cases for ISARROOT, 1. ISARROOT to find scripts directory for wic. 2. ISARROOT to find bitbake/bin directory for wic. 3. ISARROOT used as part of chown brought in by f13b2bf71dd841eaebbbcd04f14a7fbcb2649572 to fix __pycache__ permission. 4. ISARROOT in ci-build.sh The first one could be addressed by a dedicated SCRIPTSDIR variable. Second one could also be a dedicated variable? like BITBAKEDIR?? Third one I am not sure if we could use any other location for stat. Since in my build __pycache_ is created only in scripts/lib/wic/ folder. In that case maybe we could stat LAYERDIR_core instead of ISARROOT. Fourth one can be replaced with a combination of getting LAYERDIR_{core/isar} from bitbake -e and probably a new variable for testsuite directory or any other way to get the gpg-keys path. I am just thinking if we should straight away adapt an ISARROOT equivalent (ISARDIR) and have developers use those to to derive any future paths, or should we have dedicated variables to limit developers to certain paths which are absolutely needed(SCRIPTSDIR, TESTSUITEDIR, BITBAKEDIR etc). I would opt the latter, as it would avoid unnecessary duplicate definitions for the same path. For ex. path to meta can be ${ISARROOT}/meta or could just be ${LAYERDIR_core}. Also this means that we would establish the directory relationship at setup time, easier to change or override in future without affecting large part of the codebase. Thanks, Vijai Kumar K > > With kind regards, > Baurzhan. > > -- > You received this message because you are subscribed to the Google Groups "isar-users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/isar-users/20200405164943.mccmlrje526qxyw3%40yssyq.m.ilbers.de.