public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Uladzimir Bely <ubely@ilbers.de>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [RFC 1/2] dpkg-base: Add new git alternates record instead of replace old one
Date: Thu, 12 Aug 2021 02:18:36 -0700 (PDT)	[thread overview]
Message-ID: <81c0fa46-a359-47bd-bed7-866671649c96n@googlegroups.com> (raw)
In-Reply-To: <a63c3042-3025-a97b-c2fe-37e33d7bad10@siemens.com>


[-- Attachment #1.1: Type: text/plain, Size: 1982 bytes --]

Yes, git still shows the message a currently invalid alternate (one of two 
records), but it's able to work further (reset --hard, etc).

But I can agree that this way could be unacceptable due this error message.

четверг, 12 августа 2021 г. в 12:00:58 UTC+3, Jan Kiszka: 

> On 12.08.21 10:10, Uladzimir Bely wrote:
> > Task adjust_git modifies git alternates by replacing DL_DIR to 
> /downloads.
> > New path is used inside buildchroot, so that working git repo
> > becomes broken outside buildchroot.
> > 
> > This causes problems with rebuilding such packages as cowsay if something
> > has changed in bitbake environment since previous build:
> > 
> > ERROR:
> > mc:qemuarm64-buster:cowsay-git-r0 do_patch: Command Error: 'sh -c 'git
> > --work-tree=/path/build/tmp/work/debian-buster-arm64/cowsay/git-r0/git
> > reset --hard HEAD'' exited with 0
> > 
> > The solution is to add new path to git alternates so that original path
> > will work outside buildchroot, and new one will work in buildchroot.
> > 
> > Signed-off-by: Uladzimir Bely <ub...@ilbers.de>
> > ---
> > meta/classes/dpkg-base.bbclass | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/meta/classes/dpkg-base.bbclass 
> b/meta/classes/dpkg-base.bbclass
> > index ec8fbc1..4b9b782 100644
> > --- a/meta/classes/dpkg-base.bbclass
> > +++ b/meta/classes/dpkg-base.bbclass
> > @@ -46,7 +46,7 @@ python do_adjust_git() {
> > 
> > if os.path.exists(alternates):
> > cmd = ["sed", "-i", alternates, "-e",
> > - "s|{}|/downloads|".format(d.getVar("DL_DIR"))]
> > + "s|\({}\(.*\)\)|\\1\\n/downloads\\2|".format(d.getVar("DL_DIR"))]
> > bb.note(' '.join(cmd))
> > if subprocess.call(cmd) != 0:
> > bb.fatal("git alternates adjustment failed")
> > 
>
> This doesn'tt work, already tried: git fails if just one record is not
> working.
>
> Jan
>
> -- 
> Siemens AG, T RDA IOT
> Corporate Competence Center Embedded Linux
>

[-- Attachment #1.2: Type: text/html, Size: 2744 bytes --]

  reply	other threads:[~2021-08-12  9:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  8:10 [RFC 0/2] Fixes for dpkg-gdb packages rebuild Uladzimir Bely
2021-08-12  8:10 ` [RFC 1/2] dpkg-base: Add new git alternates record instead of replace old one Uladzimir Bely
2021-08-12  9:00   ` Jan Kiszka
2021-08-12  9:18     ` Uladzimir Bely [this message]
2021-08-12  9:24       ` Jan Kiszka
2021-08-12  8:10 ` [RFC 2/2] dpkg-gdb: Reset git to SRCREV revision before patching Uladzimir Bely
2021-08-12  9:01 ` [RFC 0/2] Fixes for dpkg-gdb packages rebuild Jan Kiszka

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=81c0fa46-a359-47bd-bed7-866671649c96n@googlegroups.com \
    --to=ubely@ilbers.de \
    --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