public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "Maxim Yu. Osipov" <mosipov@ilbers.de>
To: Henning Schild <henning.schild@siemens.com>,
	isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH] dpkg: warn when S equals WORKDIR
Date: Tue, 14 May 2019 14:42:23 +0200	[thread overview]
Message-ID: <46a03a33-186e-b106-653e-813f1701f728@ilbers.de> (raw)
In-Reply-To: <20190429110658.16212-1-henning.schild@siemens.com>

On 4/29/19 1:06 PM, Henning Schild wrote:
> From: Henning Schild <henning.schild@siemens.com>
> 
> This patch does not change any logic, it just introduces a warning. If S
> is not a directory inside WORKDIR do_deploy_deb and repo_clean will not
> actually find any "*.deb" because they remain inside buildchroot.
> Finding debs relative to BUILDROOT instead of S would require mounting
> and locking. Intead of doing all of that document the small
> limitation/assumption with a warning.

Applied to the 'next'.

Thanks,
Maxim.

> Signed-off-by: Henning Schild <henning.schild@siemens.com>
> ---
>   meta/classes/dpkg-base.bbclass | 9 ++++++---
>   1 file changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
> index 742b8ad..e31dd8d 100644
> --- a/meta/classes/dpkg-base.bbclass
> +++ b/meta/classes/dpkg-base.bbclass
> @@ -45,9 +45,12 @@ do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
>   do_apt_fetch[stamp-extra-info] = "${DISTRO}-${DISTRO_ARCH}"
>   
>   def get_package_srcdir(d):
> -    s = d.getVar("S", True)
> -    workdir = d.getVar("WORKDIR", True)
> -    if s.startswith(workdir):
> +    s = os.path.abspath(d.getVar("S", True))
> +    workdir = os.path.abspath(d.getVar("WORKDIR", True))
> +    if os.path.commonpath([s, workdir]) == workdir:
> +        if s == workdir:
> +            bb.warn('S is not a subdir of WORKDIR debian package operations' +
> +                    ' will not work for this recipe.')
>           return s[len(workdir)+1:]
>       bb.warn('S does not start with WORKDIR')
>       return s
> 


-- 
Maxim Osipov
ilbers GmbH
Maria-Merian-Str. 8
85521 Ottobrunn
Germany
+49 (151) 6517 6917
mosipov@ilbers.de
http://ilbers.de/
Commercial register Munich, HRB 214197
General Manager: Baurzhan Ismagulov

      reply	other threads:[~2019-05-14 12:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-29 11:06 Henning Schild
2019-05-14 12:42 ` Maxim Yu. Osipov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46a03a33-186e-b106-653e-813f1701f728@ilbers.de \
    --to=mosipov@ilbers.de \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox