Android/Cyanogenmod building: remove-project from roomservice.xml

大兔子大兔子 提交于 2019-12-14 02:18:27

问题


I want to remove a device-related project from the roomservice.xml generated by brunching in CM and add a different repo myself. Theoretically (in my localmanifest, called mint.xml), I should just need to <remove-project name="Cyanogenmod/.... But repo sync tells me that

remove-project element specifies non-existant project

Is that because my local manifest is sourced before the roomservice.xml?

The question is a bit related to this one: trouble-with-cyanogenmod-local-manifest

Additional sources: CM Wiki about removing projects

Do you know how to source the own manifest after the roomservice.xml or somehow achieve the same?

Thanks for any answers.


回答1:


As seen in Repo's manifest_xml.py,

LOCAL_MANIFESTS_DIR_NAME = 'local_manifests'
...
class XmlManifest(object):
  ...
  def _Load(self):
      ...
      local_dir = os.path.abspath(os.path.join(self.repodir, LOCAL_MANIFESTS_DIR_NAME))
      try:
        for local_file in sorted(os.listdir(local_dir)):
          if local_file.endswith('.xml'):
            local = os.path.join(local_dir, local_file)
            nodes.append(self._ParseManifestXml(local, self.repodir))
      except OSError:
        pass

local manifest files are read in alphabetical order. Your file mint.xml is therefore loaded before roomservice.xml, so at the time you try to remove the project that's defined in roomservice.xml it doesn't actually exist. Rename your file to something that sorts after roomservice.xml.



来源:https://stackoverflow.com/questions/28374949/android-cyanogenmod-building-remove-project-from-roomservice-xml

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!