1

I have a repo manifest file default.xml . However, when I execute

repo init -u <MYREPOURL> -b branch1

I get this error

fatal: manifest 'default.xml' not available

fatal: duplicate path . in <CURRENTDIR>/.repo/manifests/default.xml

what could be the issue. I tried a lot of things but it did not help. Below is manifest with actual name of repos and folders changed.

<?xml version="1.0" encoding="UTF-8"?>
<manifest>
  <remote name="repo1" fetch="git://git.repo1.com" />
  <remote name="repo2" fetch="git://git.repo2.com"/>
  <remote name="repo3" fetch="git://git.repo3.com"/>
  <remote name="repo4" fetch="git://git.repo4.com"/>
  <project name="folder1/folder2" path="meta-group1" groups="group1" remote="repo1" revision="branch1"/>
  <project name="folder1/folder3" path="meta-group12" groups="group1" remote="repo1" revision="branch1"/>
  <project name="folder1/folder4" path="folder5/folder6" groups="group1" remote="repo1" revision="branch1"/>
  <project name="folder1/folder8" path="meta-projectx" groups="group1" remote="repo1" revision="branch1"/>
  <project name="folder9" path="." groups="group2" remote="repo2" revision="branch1"/>
  <project name="meta-abc" path="." groups="group2" remote="repo3" revision="branch1"/>
  <project name="meta-pqr" path="." groups="group2" remote="repo3" revision="branch1"/>
  <project name="meta-xyz" path="." groups="group3" remote="repo4" revision="branch1"/>
</manifest>
msgboardpana
  • 59
  • 1
  • 6

1 Answers1

0

We typically run into this issue when reusing an AOSP checkout directory to switch to a different branch or version of the code base. Existing files from the previous build and pre-build steps can interfere with the repo init and repo sync commands.

fatal: manifest 'default.xml' not available

The above error is thrown by the Sync method of class Project under .repo/repo/project.py, if it encounters a ManifestParseError while parsing the manifest xml which has the default name of default.xml. Because the code was not able to parse the xml, it reports that the manifest default.xml is not available, which can be a little misleading for the user of the repo command.

The more relevant error for debugging is the second one, which prints the specific ManifestParseError. In case of this question it is

fatal: duplicate path . in /.repo/manifests/default.xml

The parse operation includes some of the other manifests under .repo/local_manifests. These are typically populated during the pre-build steps like breakfast. Paths in one of these manifest files could be conflicting with the ones in default.xml.

So one could try the following options

  1. Check the files under .repo/local_manifests and identify the bad one and comment out the bad line and try the repo init command again
  2. Move all the manifest files under .repo/local_manifests out of the checkout tree and try the repo init command again

In my case my bad line was in .repo/local_manifests/roomservice.xml so I moved the file out of the tree and repo init worked.

Here is another related answer which might help.

Dhwani Katagade
  • 939
  • 11
  • 22