Skip to content

Commit

Permalink
Don't add comments to .netrc
Browse files Browse the repository at this point in the history
A recent change to OE core causes bitbake to fallback to netrc when
BB_HASHSERVE_USERNAME or BB_HASHSERVE_PASSWORD are not set.

This exposes us to an error when running in GitLab because kas has been
inserting a comment into ~/.netrc.

netrc.NetrcParseError: bad toplevel token 'appended'

Remove the comment from .netrc as it relies on undocumented behaviour.

Signed-off-by: Adam Johnston <[email protected]>
Signed-off-by: Jan Kiszka <[email protected]>
  • Loading branch information
adamjohnstonarm authored and jan-kiszka committed Mar 25, 2024
1 parent dd44256 commit e700729
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion kas/libcmds.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ def _setup_netrc(self):
if os.environ.get('CI_SERVER_HOST', False) \
and os.environ.get('CI_JOB_TOKEN', False):
with open(self.tmpdirname + '/.netrc', 'a') as fds:
fds.write('\n# appended by kas, you have gitlab CI env\n')
fds.write('machine ' + os.environ['CI_SERVER_HOST'] + '\n'
'login gitlab-ci-token\n'
'password ' + os.environ['CI_JOB_TOKEN'] + '\n')
Expand Down

0 comments on commit e700729

Please sign in to comment.