Skip to content

Commit

Permalink
Do not use full path with moulin in the build.ninja
Browse files Browse the repository at this point in the history
Now we have full path to the moulin used inside build.ninja.
Like this:
```
rule regenerate
  command = /home/rsm/.local/bin/moulin ...
...
rule yocto_build
  command = bash -c "/home/rsm/.local/bin/moulin ...
```
and this prefix dosn't look aligned with other tools used
inside `build.ninja`.

So, this commit removes path before moulin script.
As result we have
```
rule regenerate
  command = moulin ...
...
rule yocto_build
  command = bash -c "moulin ...
```

Signed-off-by: Ruslan Shymkevych <[email protected]>
Reviewed-by: Volodymyr Babchuk <[email protected]>
  • Loading branch information
rshym authored and lorc committed Feb 28, 2024
1 parent 8a983b0 commit 6fb1737
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion moulin/build_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def generate_fetcher_dyndep(conf: MoulinConfiguration, component: str):


def _gen_regenerate(conf_file_name, generator: ninja_syntax.Writer):
this_script = os.path.abspath(sys.argv[0])
this_script = os.path.basename(sys.argv[0])
args = " ".join(sys.argv[1:])
generator.rule("regenerate", command=f"{this_script} {args}", generator=1)
generator.newline()
Expand Down
2 changes: 1 addition & 1 deletion moulin/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def create_stamp_name(*args):

def construct_fetcher_dep_cmd() -> str:
"Generate command line to generate fetcher dependency file"
this_script = os.path.abspath(sys.argv[0])
this_script = os.path.basename(sys.argv[0])
args = " ".join(sys.argv[1:])
return f"{this_script} {args} --fetcherdep $name"

Expand Down

0 comments on commit 6fb1737

Please sign in to comment.