<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><span class="timestamp">Some of you may be seeing error from the
        'repo' tool ...</span></p>
    <p><span class="timestamp"></span></p>
    <pre class="console-output"><span class="timestamp"><b>
e.g.</b></span>
<span class="timestamp"><b><span class="timestamp"><b>00:30:01</b> </span>repo init -u '<a href="https://opendev.org/starlingx/manifest">https://opendev.org/starlingx/manifest</a>' -b 'master'
00:30:01</b> </span>Traceback (most recent call last):
<span class="timestamp"><b>00:30:01</b> </span>  File "/var/lib/jenkins/stx-repo/master/.repo/repo/main.py", line 56, in <module>
<span class="timestamp"><b>00:30:01</b> </span>    from subcmds.version import Version
<span class="timestamp"><b>00:30:01</b> </span>  File "/var/lib/jenkins/stx-repo/master/.repo/repo/subcmds/__init__.py", line 38, in <module>
<span class="timestamp"><b>00:30:01</b> </span>    ['%s' % name])
<span class="timestamp"><b>00:30:01</b> </span>  File "/var/lib/jenkins/stx-repo/master/.repo/repo/subcmds/upload.py", line 27, in <module>
<span class="timestamp"><b>00:30:01</b> </span>    from hooks import RepoHook
<span class="timestamp"><b>00:30:01</b> </span>  File "/var/lib/jenkins/stx-repo/master/.repo/repo/hooks.py", line 472
<span class="timestamp"><b>00:30:01</b> </span>    file=sys.stderr)
<span class="timestamp"><b>00:30:01</b> </span>        ^
<span class="timestamp"><b>00:30:01</b> </span>SyntaxError: invalid syntax

</pre>
    <p>repo put out an update that has broken python 2 compatibility. To
      get it working again, you may need to install python3 on your
      system.</p>
    <p>If you still encounter errors, It may be because repo uses ...
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">
      #!/usr/bin/env python</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">Which
      means that it will use the first 'python' it finds in your PATH,</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">and there
      are various ways that 'python' might map to python2 or <br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">python3
      depending on your system. If your system is defaulting to <br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">python2
      and it otherwise is working for you, I'm reluctant to recommend</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">making
      python3 the default.</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">It might
      be safer to edit 'repo' and force it to use python3.</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">REPO=$(which
      repo)</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">PY3=$(which
      python3)</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">echo "
      $REPO $PY3"<br>
      /usr/local/bin/repo /usr/bin/python3</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"># If
      everything looks sane ...<br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">sudo cp
      ${REPO} ${REPO}.original</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">sudo sed
      "s%#\!/usr/bin/env python%#\!${PY3}%" -i ${REPO}</p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"><br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;"># Did it
      work ?<br>
    </p>
    <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
      margin-right:0px; -qt-block-indent:0; text-indent:0px;">head -n1
      $REPO<br>
          #!/usr/bin/python3<br>
    </p>
    <br>
    <p class="console-output">I'll be testing our build container, and
      if required posting an update to our Dockerfile.<br>
    </p>
    Scott<br>
  </body>
</html>