local git config rewritten

78 views
Skip to first unread message

Belisko Marek

unread,
Feb 28, 2022, 2:44:31 AM2/28/22
to kas-devel
Hello,

I'm using kas v 2.4 and I started experiencing some strange behavior.

When clone clean repo with yml configs for building + repo contains
custom meta-layer and start kas build <path to yml> during cloning of
poky, meta-openembedded etc it seems that something overwrite config
in .git/config to one of repos which are listed in yml config. Any
idea what can cause this? Many thanks.

BR,

marek


--
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

Jan Kiszka

unread,
Feb 28, 2022, 8:48:26 AM2/28/22
to Belisko Marek, kas-devel
Hi Marek,

On 28.02.22 08:44, Belisko Marek wrote:
> Hello,
>
> I'm using kas v 2.4 and I started experiencing some strange behavior.
>
> When clone clean repo with yml configs for building + repo contains
> custom meta-layer and start kas build <path to yml> during cloning of
> poky, meta-openembedded etc it seems that something overwrite config
> in .git/config to one of repos which are listed in yml config. Any
> idea what can cause this? Many thanks.
>

I'm not yet sure I fully understand your scenario. Can you provide the
steps you did in more details and a exemplary kas config to reproduce
the issue?

Also note that kas is not touching the git repos directly but only uses
the git command for that. Make sure you also check / specify which git
version you are using.

Jan

--
Siemens AG, Technology
Competence Center Embedded Linux

Belisko Marek

unread,
Apr 11, 2022, 3:59:58 AM4/11/22
to Jan Kiszka, kas-devel
Hi,

Yes here are details:

flow:
1. clone my custom layer (in directory sources) -> git remote show
origin point to my remote
2. yml looks like:
header:
version: 8
machine: orange-pi-zero
distro: poky
target: core-image-monimal
repos:
poky:
url: "https://git.yoctoproject.org/git/poky"
refspec: dunfell
path: sources
layers:
meta:
meta-poky:
meta-yocto-bsp:

meta-oe:
url: "https://github.com/openembedded/meta-openembedded.git"
refspec: dunfell
path: sources
layers:
meta-oe:
meta-python:
meta-networking:
meta-multimedia:
meta-webserver:

meta-sunxi:
url: "https://github.com/linux-sunxi/meta-sunxi.git"
refspec: dunfell
path: sources

meta-mender:
url: "https://github.com/mendersoftware/meta-mender.git"
refspec: dunfell
path: sources
layers:
meta-mender-core:

mender-community:
url: "https://github.com/mendersoftware/meta-mender-community.git"
refspec: dunfell
path: sources
layers:
meta-mender-sunxi:

meta-qt5:
url: "https://github.com/meta-qt5/meta-qt5.git"
refspec: dunfell
path: sources

meta-python2:
url: "git://git.openembedded.org/meta-python2"
refspec: dunfell
path: sources

meta-a33:
path: sources
layers:
meta-a33:

bblayers_conf_header:
standard: |
POKY_BBLAYERS_CONF_VERSION = "2"
BBPATH = "${TOPDIR}"
BBFILES ?= ""

local_conf_header:
custom: |
IMAGE_FEATURES += "debug-tweaks"
PREFERRED_PROVIDER_virtual/kernel = "linux-mainline"

systemd: |
DISTRO_FEATURES_append = " systemd"
VIRTUAL-RUNTIME_init_manager = "systemd"
DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
VIRTUAL-RUNTIME_initscripts = ""

lima: |
MACHINEOVERRIDES .= ":use-mailine-graphics"

2. run kas -d build

kas debug log:
2022-04-11 09:49:55 - INFO - kas 3.0.2 started
2022-04-11 09:49:55 - DEBUG - Using selector: EpollSelector
2022-04-11 09:49:55 - INFO - /data/projects/test/test-yocto$ git
rev-parse --show-toplevel
2022-04-11 09:49:55 - INFO - /data/projects/test/test-yocto$ git
rev-parse --show-toplevel
2022-04-11 09:49:55 - DEBUG - execute setup_dir
2022-04-11 09:49:55 - DEBUG - execute setup_home
2022-04-11 09:49:55 - DEBUG - execute init_setup_repos
2022-04-11 09:49:55 - DEBUG - execute repo_setup_loop
2022-04-11 09:49:55 - DEBUG - Loop repo_setup_loop: execute setup_repos_step
2022-04-11 09:49:55 - DEBUG - execute finish_setup_repos
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git remote set-url origin
https://git.yoctoproject.org/git/poky
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git remote set-url origin
https://github.com/openembedded/meta-openembedded.git
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git remote set-url origin
https://github.com/linux-sunxi/meta-sunxi.git
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git remote set-url origin
https://github.com/mendersoftware/meta-mender.git
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git remote set-url origin
https://github.com/mendersoftware/meta-mender-community.git
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git remote set-url origin
https://github.com/meta-qt5/meta-qt5.git
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git remote set-url origin
git://git.openembedded.org/meta-python2
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git cat-file -t dunfell
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git cat-file -t dunfell
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git cat-file -t dunfell
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git cat-file -t dunfell
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git cat-file -t dunfell
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git cat-file -t dunfell
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git cat-file -t dunfell
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git fetch -q
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git fetch -q
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git fetch -q
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git fetch -q
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git fetch -q
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git fetch -q
2022-04-11 09:49:55 - INFO -
/data/projects/test/test-yocto/sources$ git fetch -q
2022-04-11 09:49:56 - INFO - Repository meta-qt5 updated
2022-04-11 09:49:56 - INFO - Repository meta-sunxi updated
2022-04-11 09:49:56 - INFO - Repository meta-mender updated
2022-04-11 09:49:56 - INFO - Repository meta-python2 updated
2022-04-11 09:49:56 - INFO - Repository mender-community updated
2022-04-11 09:49:56 - INFO - Repository poky updated
2022-04-11 09:49:56 - INFO - Repository meta-oe updated
2022-04-11 09:49:56 - INFO -
/data/projects/test/test-yocto/sources$ git status -s
2022-04-11 09:49:56 - INFO - M ../build_yocto.sh
2022-04-11 09:49:56 - INFO - M ../poky-dunfell-opi-mender.yml
2022-04-11 09:49:56 - WARNING - Repo poky is dirty - no checkout
2022-04-11 09:49:56 - INFO -
/data/projects/test/test-yocto/sources$ git status -s
2022-04-11 09:49:56 - INFO - M ../build_yocto.sh
2022-04-11 09:49:56 - INFO - M ../poky-dunfell-opi-mender.yml
2022-04-11 09:49:56 - WARNING - Repo meta-oe is dirty - no checkout
2022-04-11 09:49:56 - INFO -
/data/projects/test/test-yocto/sources$ git status -s
2022-04-11 09:49:56 - INFO - M ../build_yocto.sh
2022-04-11 09:49:56 - INFO - M ../poky-dunfell-opi-mender.yml
2022-04-11 09:49:56 - WARNING - Repo meta-sunxi is dirty - no checkout
2022-04-11 09:49:56 - INFO -
/data/projects/test/test-yocto/sources$ git status -s
2022-04-11 09:49:56 - INFO - M ../build_yocto.sh
2022-04-11 09:49:56 - INFO - M ../poky-dunfell-opi-mender.yml
2022-04-11 09:49:56 - WARNING - Repo meta-mender is dirty - no checkout
2022-04-11 09:49:56 - INFO -
/data/projects/test/test-yocto/sources$ git status -s
2022-04-11 09:49:56 - INFO - M ../build_yocto.sh
2022-04-11 09:49:56 - INFO - M ../poky-dunfell-opi-mender.yml
2022-04-11 09:49:56 - WARNING - Repo mender-community is dirty - no checkout
2022-04-11 09:49:56 - INFO -
/data/projects/test/test-yocto/sources$ git status -s
2022-04-11 09:49:56 - INFO - M ../build_yocto.sh
2022-04-11 09:49:56 - INFO - M ../poky-dunfell-opi-mender.yml
2022-04-11 09:49:56 - WARNING - Repo meta-qt5 is dirty - no checkout
2022-04-11 09:49:56 - INFO -
/data/projects/test/test-yocto/sources$ git status -s
2022-04-11 09:49:56 - INFO - M ../build_yocto.sh
2022-04-11 09:49:56 - INFO - M ../poky-dunfell-opi-mender.yml
2022-04-11 09:49:56 - WARNING - Repo meta-python2 is dirty - no checkout
2022-04-11 09:49:56 - DEBUG - Configuration from config file:
{'bblayers_conf_header': {'standard': 'POKY_BBLAYERS_CONF_VERSION = "2"\n'
'BBPATH = "${TOPDIR}"\n'
'BBFILES ?= ""\n'},
'distro': 'poky',
'header': {'version': 8},
'local_conf_header': {'commerial': 'LICENSE_FLAGS_WHITELIST = '
'"commercial_mplayer2 commercial_ffmpeg '
'commercial_faad2 commercial_x264"\n',
'custom': 'IMAGE_FEATURES += "debug-tweaks"\n'
'PREFERRED_PROVIDER_virtual/kernel = '
'"linux-mainline"\n'
\n',
'lima': 'MACHINEOVERRIDES .= ":use-mailine-graphics"\n',

'systemd': 'DISTRO_FEATURES_append = " systemd"\n'
'VIRTUAL-RUNTIME_init_manager = "systemd"\n'
'DISTRO_FEATURES_BACKFILL_CONSIDERED = '
'"sysvinit"\n'
'VIRTUAL-RUNTIME_initscripts = ""\n'},
'machine': 'oprange-pi-zero',
'repos': {'mender-community': {'layers': {'meta-mender-sunxi': None},
'path': 'sources',
'refspec': 'dunfell',
'url':
'https://github.com/mendersoftware/meta-mender-community.git'},
'meta-a33': {'layers': {'meta-a33': None}, 'path': 'sources'},
'meta-mender': {'layers': {'meta-mender-core': None},
'path': 'sources',
'refspec': 'dunfell',
'url':
'https://github.com/mendersoftware/meta-mender.git'},
'meta-oe': {'layers': {'meta-multimedia': None,
'meta-networking': None,
'meta-oe': None,
'meta-python': None,
'meta-webserver': None},
'path': 'sources',
'refspec': 'dunfell',
'url':
'https://github.com/openembedded/meta-openembedded.git'},
'meta-python2': {'path': 'sources',
'refspec': 'dunfell',
'url': 'git://git.openembedded.org/meta-python2'},
'meta-qt5': {'path': 'sources',
'refspec': 'dunfell',
'url': 'https://github.com/meta-qt5/meta-qt5.git'},
'meta-sunxi': {'path': 'sources',
'refspec': 'dunfell',
'url':
'https://github.com/linux-sunxi/meta-sunxi.git'},
'poky': {'layers': {'meta': None,
'meta-poky': None,
'meta-yocto-bsp': None},
'path': 'sources',
'refspec': 'dunfell',
'url': 'https://git.yoctoproject.org/git/poky'}},
3. check git remote show origin and it shows instead of my repo:
git remote show origin
* remote origin
Fetch URL: git://git.openembedded.org/meta-python2
Push URL: git://git.openembedded.org/meta-python2
HEAD branch: master
Remote branches:
dizzy tracked
...

which breaks completely git setup. I'm on Ubuntu 20.04 LTS.
Any ideas what can be wrong?

BR,

marek

Henning Schild

unread,
Apr 11, 2022, 4:31:32 AM4/11/22
to Belisko Marek, Jan Kiszka, kas-devel
Am Mon, 11 Apr 2022 09:59:36 +0200
schrieb Belisko Marek <marek....@gmail.com>:

> Hi,
>
> Yes here are details:
>
> flow:
> 1. clone my custom layer (in directory sources) -> git remote show
> origin point to my remote
> 2. yml looks like:
> header:
> version: 8
> machine: orange-pi-zero
> distro: poky
> target: core-image-monimal
> repos:

You seem to be missing an entry for the "local" repo.

Maybe try this:

repos:
my-repo:
poky:
url: ...

https://kas.readthedocs.io/en/latest/userguide.html#project-configuration

regards,
Henning

Belisko Marek

unread,
Apr 11, 2022, 4:52:20 AM4/11/22
to Henning Schild, Jan Kiszka, kas-devel
Hi,

On Mon, Apr 11, 2022 at 10:31 AM Henning Schild
<henning...@siemens.com> wrote:
>
> Am Mon, 11 Apr 2022 09:59:36 +0200
> schrieb Belisko Marek <marek....@gmail.com>:
>
> > Hi,
> >
> > Yes here are details:
> >
> > flow:
> > 1. clone my custom layer (in directory sources) -> git remote show
> > origin point to my remote
> > 2. yml looks like:
> > header:
> > version: 8
> > machine: orange-pi-zero
> > distro: poky
> > target: core-image-monimal
> > repos:
>
> You seem to be missing an entry for the "local" repo.
>
> Maybe try this:
>
I have meta-a33 in list of repos like:
meta-a33:
path: sources
layers:
meta-a33:

or you mean something else? Thanks.
marek

Henning Schild

unread,
Apr 11, 2022, 5:24:19 AM4/11/22
to Belisko Marek, Jan Kiszka, kas-devel
Am Mon, 11 Apr 2022 10:52:08 +0200
Your very first "repo" should be really just a name, no url/path ...
maybe layers. This root repo will not be managed by kas version
control.

If meta-a33 is your repo, you want to remove that "path" and move the
name up to become the first entry.

regards,
Henning
Reply all
Reply to author
Forward
0 new messages