当使用repo工具包含其他清单文件时,它会失败。
不幸的是,从日志中看,它在解析文件时似乎有问题。
任何想法都将不胜感激。
我曾尝试单独初始化每个manifest.xml,但一旦使用include语句合并它们,就失败了。
我尝试显式地指向清单文件,结果却是一样的。
repo init -u https://github.com/example/Manifest -b master repo init -u https://github.com/example/Manifest -b master -m default.xml
文件结构为:
- default.xml
- /scripts/filea.xml
- /scripts/fileb.xmldefault.xml
<?xml version="1.0" encoding="UTF-8" ?>
<manifest>
<remote fetch="https://github.com/example" name="origin"/>
<default sync-j="4" revision="refs/heads/master" remote="origin"/>
<remote fetch="https://git.yoctoproject.org/git" name="yocto"/>
<remote fetch="https://github.com/mendersoftware" name="mender"/>
<remote fetch="https://github.com/openembedded" name="oe"/>
<project remote="yocto" revision="thud" name="poky" path="sources/poky"/>
<!-- <project remote="oe" revision="thud" name="meta-openembedded" path="sources/meta-openembedded"/> -->
<include name="scripts/filea.xml"/>
<include name="scripts/fileb.xml"/>
</manifest>filea.xml
<?xml version="1.0" encoding="UTF-8" ?>
<manifest>
<default sync-j="4" revision="refs/heads/master"/>
<remote fetch="https://github.com/example" name="origin"/>
<project name="meta-kernel" remote="origin" revision="master" path="sources/meta-kernel"/>
</manifest>fileb.xml
<?xml version="1.0" encoding="UTF-8" ?>
<manifest>
<default sync-j="4" revision="refs/heads/master"/>
<remote fetch="https://github.com/mendersoftware" name="mender"/>
<remote fetch="https://github.com/example" name="origin"/>
<project name="meta-mender" remote="mender" revision="thud" path="sources/meta-mender"/>
<project name="meta-mender-community" remote="mender" revision="thud" path="sources/meta-mender-community"/>
<project name="meta-mender-production" remote="origin" revision="master" path="sources/meta-mender-production"/>
</manifest>下面是错误输出的一个片段。从外观上看,在解析default.xml时出现了一些问题,但我正在努力找出原因。
From https://github.com/example/Manifest
* [new branch] master -> origin/master
Traceback (most recent call last):
File "/home/yocto/build/.repo/repo/main.py", line 572, in <module>
_Main(sys.argv[1:])
File "/home/yocto/build/.repo/repo/main.py", line 547, in _Main
result = run()
File "/home/yocto/build/.repo/repo/main.py", line 540, in <lambda>
run = lambda: repo._Run(name, gopts, argv) or 0
File "/home/yocto/build/.repo/repo/main.py", line 201, in _Run
result = cmd.Execute(copts, cargs)
File "/home/yocto/build/.repo/repo/subcmds/init.py", line 452, in Execute
self._LinkManifest(opt.manifest_name)
File "/home/yocto/build/.repo/repo/subcmds/init.py", line 309, in _LinkManifest
self.manifest.Link(name)
File "/home/yocto/build/.repo/repo/manifest_xml.py", line 180, in Link
self.Override(name)
File "/home/yocto/build/.repo/repo/manifest_xml.py", line 173, in Override
self._Load()
File "/home/yocto/build/.repo/repo/manifest_xml.py", line 479, in _Load
self._ParseManifest(nodes)
File "/home/yocto/build/.repo/repo/manifest_xml.py", line 546, in _ParseManifest
elif new_default != self._default:
File "/home/yocto/build/.repo/repo/manifest_xml.py", line 74, in __ne__
return self.__dict__ != other.__dict__
File "/home/yocto/build/.repo/repo/manifest_xml.py", line 95, in __eq__
return self.__dict__ == other.__dict__
AttributeError: 'NoneType' object has no attribute '__dict__'发布于 2019-09-02 17:24:20
从包含的文件(filea.xml和fileb.xml)中删除<default ... />。最多只能指定一个默认元素。
来自repo文档
$ repo help manifest
[...]
Element default
At most one default element may be specified. Its remote and revision
attributes are used when a project element does not specify its own
remote or revision attribute.https://stackoverflow.com/questions/57752490
复制相似问题