tools: [SQUASH] Brinup new improved roomservice.py

commit 4adfca1bb3cf7cc85408b1dbd83c95cae89639d5
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Thu Apr 30 12:19:58 2020 -0300

    vendor: Cleanup roomservice

    Change-Id: Ia7766aa65e89131625484745c55f90d24d6625b1

commit 30126b3370d2724c1327e6f4ed74ed475ac3f983
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Sun Apr 5 13:00:15 2020 -0300

    vendor: Improve roomservice fallback branch

    Change-Id: I5c7f263fd10a0a8a0f7a7469e7ce610547b1be83

commit 156a4ac252cc6310df5988889ee7569ad088e185
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Wed Mar 4 12:18:29 2020 -0300

    vendor: roomservice: Allow defining custom clone depth

    Save bandwith

    Change-Id: I07d0c9904ae38482a5bee29814812a28372c68bb

commit 5b23bb8dcfcb5143476c2a14e3ac4fea55aa2106
Author: Tom Powell <tom@powell.io>
Date:   Tue Feb 25 20:45:43 2020 -0800

    roomservice: support new manifest formats.

    .repo/manifest.xml is no longer a symlink becuase apparently windows
    developers need to use repo and windows needs admin for symlinks.

    https: //gerrit.googlesource.com/git-repo/+/a269b1cb9dc21dfd598bfea3766206b606ad4589
    Change-Id: I88ea0295133959136d7214f13a76b66d89dc88d4

commit 2054d11bda5ca1d13b241ace63a6fa608abe58be
Author: Giacomo Mazzamuto <g.mazzamuto@gmail.com>
Date:   Fri Feb 28 22:34:21 2020 +0100

    roomservice: fix inconsistent spacing

    fixes "TabError: inconsistent use of tabs and spaces in indentation"
    with Python 3

    Change-Id: I09324172c30b1b122deae065907d3e19640c53dd

commit 6ce8636228f501452b57fe3168a936183e71f4ac
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Tue Nov 5 20:18:29 2019 +0000

    vendor: roomservice: Add support for custom branch

    Change-Id: Iacb7b2eeb49c5809952e070755418cff9ef0a9e6

commit 8f9cb495d51c2e59c76911e4de15cfb09c61247c
Author: jhenrique09 <jhenrique09.mcz@hotmail.com>
Date:   Fri Sep 6 13:00:01 2019 -0300

    Initial changes for Android 10

    Change-Id: Ia68d3380e749531cbec7b06a8a6987de16d480e3

commit e893c687b7efb57c11656e94f8334c0f35fffa73
Author: Harsh Shandilya <harsh@prjkt.io>
Date:   Thu Jun 7 22:23:54 2018 +0530

    tools: Fix spelling in roomservice

    `Trying dependencies-only mode on anon-existing device tree?`
    is wrong and annoying.

    Change-Id: I269fdf47234bb83d18c1ddf4e344dd6b9b70b736
    Signed-off-by: Harsh Shandilya <harsh@prjkt.io>

commit 6d454f95a5c4f6734de556be3c9eb7c6d872aecf
Author: LuK1337 <priv.luk@gmail.com>
Date:   Fri Jan 26 15:00:52 2018 +0100

    roomservice: Change 'bailing out' message to something more friendly

    Change-Id: Iee519ea5cbfa92b6bb26e33d2bac3d2335c770a8

commit 0be09dd36fcbd921064376cead0b38468aec6b21
Author: Akhil Narang <akhilnarang.1999@gmail.com>
Date:   Mon May 29 16:56:48 2017 +0200

    roomservice: tell user in the case of a dependency already in manifest

    Change-Id: I4177a4d36775dc22c6430c5bff1878967e1f5856
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit ffe2ee51c165d3a8213371de15cecffd02805197
Author: Akhil Narang <akhilnarang.1999@gmail.com>
Date:   Sat Apr 29 09:56:45 2017 +0200

    roomservice: fix a weird error

      * Only way I could replicate it was if I delete local manifest after having my trees synced and try to lunch
      * Unofficial builders seemed to be facing it quite a bit
      * The default manifest will never have device trees, only local manifest will

    Traceback (most recent call last):
      File "build/tools/roomservice.py", line 365, in <module>
        main()
      File "build/tools/roomservice.py", line 307, in main
        repo_path = get_from_manifest(device)
      File "build/tools/roomservice.py", line 144, in get_from_manifest
        lp = local_path.get("path").strip('/')
    AttributeError: 'NoneType' object has no attribute 'strip'

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

    Change-Id: Iabc41d344320b3bec96d2c3c4e5b11878811a04f
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 7c121208df0c039bcb529b985547dcc9fa0db686
Author: Akhil Narang <akhilnarang.1999@gmail.com>
Date:   Mon Jan 23 20:10:34 2017 +0530

    roomservice: give us some more info about what we're about to sync

      * repo_target -> repo_path

    Change-Id: Ib974593a596e6a4fd724b8516b279c73110ad6d2
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 2587c9d1baf91b810027936cd96236d3765b42cb
Author: Akhil Narang <akhilnarang.1999@gmail.com>
Date:   Sat Jan 14 15:58:49 2017 -0500

    roomservice: rewrite some logic

      * Never experimented about properly with old.
      * If repo_name didn't have a '/', and remote wasn't devices, everything would
        break.
      * Now if remote isn't specified, add it dynamically based on 2 conditions.
      * If the repo_name has a '/', default to "github" remote.
      * If it dosen't have a '/', default to our devices organization.
      * Also add in support for setting a custom clone-depth for any dependency.
      * Useful for stuff like prebuilt kernels from AOSP.

    Change-Id: Iebda1645cfbf6ad51f4670a7d5e49d553b5a0e2d
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 8764407caca2d842285df03b98243fd6878fc282
Author: Akhil Narang <akhilnarang.1999@gmail.com>
Date:   Sat Dec 31 16:49:33 2016 +0100

    roomservice: bringup for BlissRoms

    Change-Id: Id6f1f8fbf37e5539fc75abeeac1f8552ba9322b5
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit a72b866762144f2c636d68e312b35fb7f5e796a6
Author: Brint E. Kriebel <bekit@cyngn.com>
Date:   Wed Aug 12 14:05:03 2015 -0700

    roomservice: use force-sync when adding projects with roomservice

    This works around the error
    GitError: --force-sync not enabled; cannot overwrite a local work tree
    when using roomservice.

    Since this should only trigger when the device repos haven't been
    checked out yet, we can use force-sync to overwrite any roomservice
    device paths in the .repo directory.

    Change-Id: Iac54a8a2f2913f82f8ca6497b8785a9d5769640b
    Ticket: CYNGNOS-735
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 921d6f33b22524011bddb983efd7440d9ff49f5b
Author: Josue Rivera <prbassplayer@gmail.com>
Date:   Tue Oct 6 21:05:30 2015 +0200

    Update roomservice fallback branch

    Change-Id: I284e6370f19ab979569bfc70ddc1dd850640d339
    Signed-off-by: Josue Rivera <prbassplayer@gmail.com>
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit db1a1301064e6f8d01d4b1b430be555155742fd7
Author: Anthony King <anthonydking@slimroms.net>
Date:   Thu Apr 30 23:29:25 2015 +0100

    roomservice: add debug method

    also don't chatter about Dependencies file not found if
    not in debug mode

    Change-Id: I7677b396d0c62862d7852b9da7e2fa73f44e0bf5
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit c6835249894dd197fe102cfc0d21fff7be33b580
Author: Anthony King <anthonydking@slimroms.net>
Date:   Wed Apr 29 21:29:17 2015 +0100

    roomservice: touchup revision assignment

    don't assign the revision if the calculated one is the
    same as the default one.

    fallback to the custom_default_revision if can't calculate
    a revision in deps only mode

    Change-Id: I5f180ecf766b95eb41a716234d4e42d7d4e4a942
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit ad443c528f462bad516afea29a38169f93a3654b
Author: Anthony King <anthonydking@slimroms.net>
Date:   Wed Apr 29 21:08:33 2015 +0100

    roomservice: add branch to deps if not provided

    this matches the behaviour (more or less) as if they were
    added in normal mode

    Change-Id: I1fcef29c8c34d2f74eb8e184a272610e02220ad8
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 8eb85a3239102eb0fe3f4b6f6c5405de44cabfa2
Author: Anthony King <anthonydking@slimroms.net>
Date:   Wed Apr 29 16:35:36 2015 +0100

    roomservice: check against the path, not name

    For a while now, it's projects have been allowed to fetch from
    the same location. The only reliable way to check is with the
    target path, so we use this now.

    Change-Id: Ia88bd3a5a56d5de2110f1c0d3ce332060732f716
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 9cdc6e7c662397d338122060ddf6e25360f17b7e
Author: Anthony King <anthonydking@slimroms.net>
Date:   Fri Jan 9 18:04:22 2015 +0000

    Overhaul roomservice for sanity and cleanliness

    I wish anyone porting this over to other versions of roomservice luck

    Change-Id: I372d254469f5b3306e0a5e370d26d22ed6e49eaa
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 55a7d044ef2a6e877398ea493f785e189a02bec8
Author: Anthony King <anthonydking@slimroms.net>
Date:   Wed Apr 29 15:06:31 2015 +0100

    roomservice: hack the calculated revision in to shape

    Change-Id: Ibccc93a6d899e7c7f2dad2f493a3ca1fc0a2815a
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit ba1174497a947d3d4b8c96bf3851a7f5a53494f4
Author: Nicholas Flintham <nick@flinny.org>
Date:   Wed Apr 1 14:16:24 2015 +0100

    Fixup roomservice

    Change-Id: Ibc77861c068edefc35d6925d21f320c187bacd0b
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 1c1f728cbb4ab61cd0f91f2a3aefbd8884d665a3
Author: Anthony King <anthonydking@slimroms.net>
Date:   Thu Jan 8 11:39:12 2015 -0600

    roomservice: Improve error handling on search

    Use the relevant forms of 'except' for urllib and parsing instead of a
    general except which was performed too late anyways.

    Change-Id: Ia1fc89dd5a8a703fc0175aef7b6dd013a44a2c8e
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit d1edbaa72926d0d15e1425f9047b61d02b333ade
Author: Matt Mower <mowerm@gmail.com>
Date:   Fri Jan 2 00:08:48 2015 -0600

    roomservice: Fix search of devices forked to Bliss

    Commit "roomservice: Improve new device retrieval" introduced a
    regression where repositories that were forked to Bliss were omitted from
    search results. This fixes that issue.

    Change-Id: I7bf54129b5da1749abe5b2b9a492cb93e6ee41a6
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit d78104689434d951c71c06b2a1d7cf16d45d668d
Author: Matt Mower <mowerm@gmail.com>
Date:   Fri Oct 31 21:02:37 2014 -0500

    roomservice: Improve new device retrieval

    Without credentials, GitHub's search API limits requests to 60/hr.
    The existing method to add a new device is to fetch JSON-formatted info
    for ALL CM repositories and then search for the device. In doing so,
    more than 10 pages of results are returned (i.e. more than 10 requests
    per device). This is clumsy, slow, and limits use of roomservice to
    only ~5 devices per hour.

    Instead, only return search results for repositories that have the
    device name in the repository name. Then, one device = one request.
    It's faster and allows closer to 60 device setups / hr.

    Additional bailouts are included to stop the script earlier than later
    if a device is not found.

    Change-Id: I7f914d7ede82da0f100d9fd6cf8b603177962e48
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit 1e303dd9b807aad6438df6eb6f1386d8646009ec
Author: Chirayu Desai <cdesai@cyanogenmod.org>
Date:   Tue Apr 30 17:08:17 2013 +0530

    roomservice: python3 support

    Change-Id: I7621818ba7ed997676728fe865f37a25b3a5b8b5
    Signed-off-by: Chirayu Desai <cdesai@cyanogenmod.org>
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit a22ecf4a2f5db13a90ed2a4f8d94dbf4ccd04c2d
Author: Diogo Ferreira <defer@cyanogenmod.com>
Date:   Sun Mar 18 21:18:29 2012 +0000

    roomservice: Add lightweight dependencies to repositories

    Roomservice can already fetch your slim_<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
    slim.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 slim.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.

    Change-Id: I9cc847adfc717a06439bc6094213ed6492343158

    roomservice: Add branch support to slim.dependencies

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

    Change-Id: I35b51920d296afa329411af6172c7bd9aeef4af8

    roomservice: Fill in dependencies for already-deployed repositories

    Change-Id: I01fd408c9c4bfa78097c7f848b2556d2b2b180f3

    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

    Change-Id: I9663f283617f237428b4eaa0cd60b5de2b86a7b9

    make compatible with github v3 api

    Change-Id: Iff6f1f9099cdc5d2b49e04000b5fe3d04aa5d7e4

    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
    ============================================

    Change-Id: Ib513705aba9a7a52a971ab64102ecbe9fddfb97a

    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.

    Change-Id: Ie733feaa0414cbfebb7efcfc1e24d94e1e466d1b

    roomservice: Add support for netrc

    Change-Id: I1f5e11e40125abd0c4e4c8d8294d4fc09bfdc30a

    roomservice: Handle missing netrc file

    Change-Id: If981fe79dc3e2191434301239b0cd585be8b4730

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

    Change-Id: I3c2b1d79fc185c1f1e1d658e5ca4f78e688780e2

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

    Change-Id: Ifb42a023cae5f62ac8f9cf7832125b91b431169c

    roomservice: Allow following up tag references

    This is now needed for release builds

    Change-Id: I8c5f87341059b3b15ee853312b71df73790ad0d8

    build: local_manifest.xml deprecated, use local_manifests

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

    Change-Id: I3d8a6ef3907b92808662cbba912cea5ed38d0bde

    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

    Change-Id: I73a11af1500bd04e346f08ec3f83454502f3a169

    roomservice: Fix wrong assumption about path of active manifest

    Change-Id: Id740ff4b848e6ccbfd658be4846197b8ca519237

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

    Change-Id: If680536484074b473458723d93e783d074d7f669

    roomservice: Bump devices per page to 200

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

    Change-Id: I2f3b9705e07e1e47b86857aeb383cf7c99fcdbdc
    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

    Change-Id: Ia175dd317f508e99b275b56e9c83bd4729a75ddb

    roomservice: Add recursive dependencies

    Dependency repositories can now have dependencies themselves

    Change-Id: I33a28709170da52bc98f4a62387927e3a11b2450
    Signed-off-by: Akhil Narang <akhilnarang.1999@gmail.com>

commit e631736dd66046d382cd24bf5e2acc9910db4bcb
Author: Koushik Dutta <koushd@gmail.com>
Date:   Sat Nov 26 18:51:42 2011 -0800

    roomservice delivers you lunch combos from the github.

    fix roomservice formatting

    support product names with _ in them

    fix roomservice to handle pagination

    Change-Id: I4923c2f768094dbad8e06a72d9f27d46414030ab

Co-authored-by: Tom Powell <tom@powell.io>
Co-authored-by: jhenrique09 <jhenrique09.mcz@hotmail.com>
Co-authored-by: Giacomo Mazzamuto <g.mazzamuto@gmail.com>
Co-authored-by: Harsh Shandilya <harsh@prjkt.io>
Co-authored-by: LuK1337 <priv.luk@gmail.com>
Co-authored-by: Akhil Narang <akhilnarang.1999@gmail.com>
Co-authored-by: Brint E. Kriebel <bekit@cyngn.com>
Co-authored-by: Josue Rivera <prbassplayer@gmail.com>
Co-authored-by: Matt Mower <mowerm@gmail.com>
Co-authored-by: Chirayu Desai <cdesai@cyanogenmod.org>
Co-authored-by: Diogo Ferreira <defer@cyanogenmod.com>
Co-authored-by: Koushik Dutta <koushd@gmail.com>
Change-Id: I60609aa898373842f6399ec829225f81319793f9
Signed-off-by: Jackeagle <jackeagle102@gmail.com>
1 file changed