Can not install linux soure

I’m trying to install the linux source for FX30-CATM (Release R11.0.0.007 + Legato 18.09.4) on Ubuntu 20.04 using the command: leaf getsrc swi-linux the install fails because the source references two packages that are no longer available: python-git and repo, so the install fails with:

Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://dl.google.com/linux/chrome/deb stable InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease
Hit:5 http://security.ubuntu.com/ubuntu focal-security InRelease                                  
Hit:6 https://downloads.sierrawireless.com/tools/debian release/ InRelease                        
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev'
Note, selecting 'git' instead of 'git-core'
Package python-git is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python-git-doc

E: Package 'python-git' has no installation candidate
E: Unable to locate package repo
ERROR:
  Profile provisioning interrupted
CAUSED BY:
  Error while installing required packages (Error during sync step for swi-verify-aptdeps_1.6.191122 (command returned 100))

How can I install the linux source

how about getting the yocto source directly from here?
https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-16-components/#sthash.uALQ8N9h.dpbs

Unfortunately I have a WP77 based Cat-M FX30, all the software for that device on SW’s site seem to be already compiled (*.CWE) files. I need to be able to recompile the linux distro to enable some specific functionality. I was able to do this using leaf with the previous R9.x version but now I need some GPIO fixes in the R11 version.

You can get the WP77 R11 yocto source here:
https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-release-11-components/#sthash.xB8xFhoC.dpbs

here shows on fixing the repo:
https://www.xspdf.com/resolution/20120067.html

@jyijyi Thanks for the help, but I don’t think I can use the source you linked as it doesn’t have the meta-columbia-x recipes that are needed for the FX-30 device I’m using. I also couldn’t figure out how to make the repo fixes via the link you provided.

I decided to go back to the same version of linux that I had successfully built the R9 sources on: Ubuntu 16.04. I now get further but get a different error when I use the leaf getsrc command:

Run sync steps for fx30-catm-linux-src_R11.0.0.007

Ready to sync in /home/<mylinuxuser>/myWorkspace/swi-linux-src directory:
repo init -u ssh://<myusername>@gerrit.legato.io:29418/manifest -m mdm9x06/tags/SWI9X06Y_02.22.12.00/linux.xml -g default,-cache ; repo sync

Proceed? (Y/n)
Y
Checking credentials...
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
remote: Counting objects: 2, done
remote: Finding sources: 100% (64/64)
remote: Total 64 (delta 25), reused 64 (delta 25)
Unpacking objects: 100% (64/64), done.
From https://gerrit.googlesource.com/git-repo
   2a2da80..21dce3d  main       -> origin/main
 * [new tag]         v2.12.1    -> v2.12.1
 * [new tag]         v2.12.2    -> v2.12.2
  File "/home/<mylinuxuser>/myWorkspace/swi-linux-src/.repo/repo/main.py", line 79
    file=sys.stderr)
        ^
SyntaxError: invalid syntax
ERROR:
  Something went wrong with `repo` command

I’m also posting this on Sierra Wireless Forums as I’m not sure which is the best audience for this issue.

Seems there is some problem on your python version, I am using the following on Ubuntu 16.04 and I can download the yocto source of swi-fx30-catm_2.0.0 by Leaf:

python3 --version
Python 3.6.12

I’ve tried that python version and still no success although the errors received are different. Also have tried Ubuntu 18.04 and received the same errors.

seems some problem on your ubuntu PC with repo or python…

Finally got this to work! In case anyone’s interested here was my solution:

Set python symbolic link to point to python 3:
sudo rm /usr/bin/python
sudo ln -s /usr/bin/python3 /usr/bin/python

Back-up copy of /usr/bin/repo:
sudo cp /usr/bin/repo /usr/bin/repo.bak

Download copy of repo from https://storage.googleapis.com/git-repo-downloads/repo to /usr/bin/repo replacing original /usr/bin/repo

Ran leaf getsrc swi-linux and got this error:

Downloading manifest from ssh://david.churchill@thingtech.com@gerrit.legato.io:29418/manifest
Traceback (most recent call last):
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 627, in <module>
    _Main(sys.argv[1:])
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 601, in _Main
    result = run()
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 594, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 260, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 519, in Execute
    self._SyncManifest(opt)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 220, in _SyncManifest
    default_branch = m.ResolveRemoteHead()
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 1914, in ResolveRemoteHead
    output = self.bare_git.ls_remote('-q', '--symref', '--exit-code', name, 'HEAD')
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 3034, in runner
    (self._project.name, name, p.stderr))
error.GitError: manifests ls-remote: usage: git ls-remote [--heads] [--tags]  [--upload-pack=<exec>]
                     [-q | --quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]

Opened /home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py and put the following line in at line #3026: print("Name: {} args: {}".format(name, args))

Re-ran leaf getsrc swi-linux and got this error:

Name: var args: ('GIT_COMMITTER_IDENT',)
Traceback (most recent call last):
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 627, in <module>
    _Main(sys.argv[1:])
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 601, in _Main
    result = run()
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 594, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/main.py", line 260, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 524, in Execute
    self._ConfigureUser(opt)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/subcmds/init.py", line 380, in _ConfigureUser
    name = self._Prompt('Your Name', mp.UserName)
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 613, in UserName
    self._LoadUserIdentity()
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 626, in _LoadUserIdentity
    u = self.bare_git.var('GIT_COMMITTER_IDENT')
  File "/home/dcchurchill/myWorkspace/swi-linux-src/.repo/repo/project.py", line 3035, in runner
    (self._project.name, name, p.stderr))
error.GitError: manifests var: 
*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'dcchurchill@ubuntu.(none)')

Ran (with my actual e-mail and name):
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

Ran leaf getsrc swi-linux one more time and it worked!