Build - roomservice: Add lightweight dependencies to repositories

Roomservice can already fetch your cm_<device> without the need for a
manifest entry.

However, when working with common repositories, there is no way of
actually fetching them without adding to the manifest. This patch
introduces a lightweight dependency system. Each repository can have a
cm.dependencies in the following json format:

[
{
    "repository": "repository_name_on_cm_organization"
    "target_path": "target/path"
},
...
]

For instance, for cm_anzu I need android_device_semc_msm7x30-common and
android_device_semc_mogami-common. I would add both to cm.dependencies
as follows:

[
{
    "repository": "android_device_semc_msm7x30-common",
    "target_path": "device/semc/msm7x30-common"
},
{
    "repository": "android_device_semc_mogami-common",
    "target_path": "device/semc/mogami-common"
}
]

Roomservice would then fetch the anzu repository, parse the dependency
files and add/fetch/sync these additional repositories if they don't
exist already.

This also adds pretty printing to the output xml.

roomservice: Add branch support to cm.dependencies

Allow the cm.dependencies entries to provide an optional "branch" for
the repository dependencies. Added to fully support
http://wiki.cyanogenmod.com/wiki/Integrated_kernel_building

roomservice: Fill in dependencies for already-deployed repositories

roomservice: Extend dependency-checks to devices in main manifest

CM currently keeps devices inherited from AOSP in the main manifest,
so take that into account as well when checking device paths

make compatible with github v3 api

Fixed build for full-eng

Previously
Traceback (most recent call last):
File "build/tools/roomservice.py", line 153, in <module>
    repo_path = get_from_manifest(device)
NameError: name 'device' is not defined

** Don't have a product spec for: 'full'
** Do you have the right repo manifest?

Now
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.4
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=IMM76L
============================================

roomservice: Bump github request per_page to 100

Change the number of repos per page from the default 30
to 100.

We seem to be hitting the rate limit on the jenkins server.

roomservice: Add support for netrc

roomservice: Handle missing netrc file

roomservice.py: Verbose error when a branch is missing.
Also add ROOMSERVICE_BRANCHES environment variable to use fallback
branches.

roomservice.py: Fixups around fallback branches not being used by
dependencies when ROOMSERVICE_BRANCHES is defined.

roomservice: Allow following up tag references

This is now needed for release builds

build: local_manifest.xml deprecated, use local_manifests

Patch Set 2:- Use roomservice.xml instead of cm.xml.

Fix fallback branch search in roomservice

If you provided a fallback branch to roomservice via the
ROOMSERVICE_BRANCHES environment var the branch search would fail
if the device repo had any tags.

Fixed this by appending the tag search results to the branch
search results instead of overwriting them

roomservice: Fix wrong assumption about path of active manifest

roomservice: When validating the presence of a repo, check main manifest
too

roomservice: Bump devices per page to 200

Limit was reached again when attempting to
lunch various projects, such as steelhead.

Signed-off-by: William Roberts <bill.c.roberts@gmail.com>

roomservice: Fix assumptions about the branch naming

We can't just split from the last slash anymore, since we're using
those to distinguish the stabilization branches

roomservice: Add recursive dependencies

Dependency repositories can now have dependencies themselves

Change-Id: Ifeac8237324b9bdabb49ed9fc0c5560fdf5aeb5d
Signed-off-by: STELIX <ssspinni@gmail.com>