diff --git a/build/envsetup.sh b/build/envsetup.sh
index 4f668b1..f923cd1 100644
--- a/build/envsetup.sh
+++ b/build/envsetup.sh
@@ -59,11 +59,16 @@
             # A buildtype was specified, assume a full device name
             lunch $target
         else
-            # This is probably just the CM model name
+            # This is probably just the Lineage model name
             if [ -z "$variant" ]; then
                 variant="userdebug"
             fi
-            lunch cm_$target-$variant
+            lunch lineage_$target-$variant
+            if [ $? -ne 0 ]; then
+                # try CM
+                echo "** Warning: '$target' is using CM-based makefiles. This will be deprecated in the next major release."
+                lunch cm_$target-$variant
+            fi
         fi
     fi
     return $?
diff --git a/build/tools/roomservice.py b/build/tools/roomservice.py
index 2c1c813..771d586 100755
--- a/build/tools/roomservice.py
+++ b/build/tools/roomservice.py
@@ -203,29 +203,34 @@
 
 def fetch_dependencies(repo_path, fallback_branch = None):
     print('Looking for dependencies in %s' % repo_path)
-    dependencies_path = repo_path + '/cm.dependencies'
+    dependencies_paths = [repo_path + '/lineage.dependencies', repo_path + '/cm.dependencies']
+    found_dependencies = False
     syncable_repos = []
     verify_repos = []
 
-    if os.path.exists(dependencies_path):
-        dependencies_file = open(dependencies_path, 'r')
-        dependencies = json.loads(dependencies_file.read())
-        fetch_list = []
+    for dependencies_path in dependencies_paths:
+        if os.path.exists(dependencies_path):
+            dependencies_file = open(dependencies_path, 'r')
+            dependencies = json.loads(dependencies_file.read())
+            fetch_list = []
 
-        for dependency in dependencies:
-            if not is_in_manifest(dependency['target_path']):
-                fetch_list.append(dependency)
-                syncable_repos.append(dependency['target_path'])
-                verify_repos.append(dependency['target_path'])
-            elif re.search("android_device_.*_.*$", dependency['repository']):
-                verify_repos.append(dependency['target_path'])
+            for dependency in dependencies:
+                if not is_in_manifest(dependency['target_path']):
+                    fetch_list.append(dependency)
+                    syncable_repos.append(dependency['target_path'])
+                    verify_repos.append(dependency['target_path'])
+                elif re.search("android_device_.*_.*$", dependency['repository']):
+                    verify_repos.append(dependency['target_path'])
 
-        dependencies_file.close()
+            dependencies_file.close()
+            found_dependencies = True
 
-        if len(fetch_list) > 0:
-            print('Adding dependencies to manifest')
-            add_to_manifest(fetch_list, fallback_branch)
-    else:
+            if len(fetch_list) > 0:
+                print('Adding dependencies to manifest')
+                add_to_manifest(fetch_list, fallback_branch)
+            break
+
+    if not found_dependencies:
         print('Dependencies file not found, bailing out.')
 
     if len(syncable_repos) > 0:
