@@ -285,10 +285,7 @@ def set_env_var(name, value):
285285 if not absolute_file_path and filename == app_name :
286286 absolute_file_path = os .path .join (root , filename )
287287 app_directory = os .path .dirname (absolute_file_path )
288-
289- # We don't want to change the state of system binaries.
290- if not environment .get_value ('SYSTEM_BINARY_DIR' ):
291- os .chmod (absolute_file_path , 0o750 )
288+ os .chmod (absolute_file_path , 0o750 )
292289
293290 set_env_var (app_path , absolute_file_path )
294291 set_env_var ('APP_DIR' , app_directory )
@@ -895,27 +892,6 @@ def setup(self):
895892 return True
896893
897894
898- class SystemBuild (Build ):
899- """System binary."""
900-
901- def __init__ (self , system_binary_directory ):
902- super ().__init__ (None , 1 )
903- self ._build_dir = system_binary_directory
904-
905- @property
906- def build_dir (self ):
907- return self ._build_dir
908-
909- def setup (self ):
910- """Set up a build that we assume is already installed on the system."""
911- self ._pre_setup ()
912- self ._setup_application_path ()
913- return True
914-
915- def delete (self ):
916- raise BuildManagerError ('Cannot delete system build.' )
917-
918-
919895def _sort_build_urls_by_revision (build_urls , bucket_path , reverse ):
920896 """Return a sorted list of build url by revision."""
921897 base_url = os .path .dirname (bucket_path )
@@ -1315,28 +1291,13 @@ def setup_custom_binary(target_weights=None):
13151291 return None
13161292
13171293
1318- def setup_system_binary ():
1319- """Set up a build that we assume is already installed on the system."""
1320- system_binary_directory = environment .get_value ('SYSTEM_BINARY_DIR' , '' )
1321- build = SystemBuild (system_binary_directory )
1322- if build .setup ():
1323- return build
1324-
1325- return None
1326-
1327-
13281294def setup_build (revision = 0 , target_weights = None ):
13291295 """Set up a custom or regular build based on revision."""
13301296 # For custom binaries we always use the latest version. Revision is ignored.
13311297 custom_binary = environment .get_value ('CUSTOM_BINARY' )
13321298 if custom_binary :
13331299 return setup_custom_binary (target_weights = target_weights )
13341300
1335- # In this case, we assume the build is already installed on the system.
1336- system_binary = environment .get_value ('SYSTEM_BINARY_DIR' )
1337- if system_binary :
1338- return setup_system_binary ()
1339-
13401301 fuzz_target_build_bucket_path = get_bucket_path (
13411302 'FUZZ_TARGET_BUILD_BUCKET_PATH' )
13421303
@@ -1366,10 +1327,8 @@ def setup_build(revision=0, target_weights=None):
13661327
13671328
13681329def is_custom_binary ():
1369- """Determine if this is a custom or preinstalled system binary."""
1370- return bool (
1371- environment .get_value ('CUSTOM_BINARY' ) or
1372- environment .get_value ('SYSTEM_BINARY_DIR' ))
1330+ """Determine if this is a custom binary."""
1331+ return bool (environment .get_value ('CUSTOM_BINARY' ))
13731332
13741333
13751334def has_symbolized_builds ():
0 commit comments