brizental pushed to branch tor-browser-147.0a1-16.0-2 at The Tor Project / Applications / Tor Browser

Commits:

1 changed file:

Changes:

  • python/mozbuild/mozbuild/backend/base.py
    ... ... @@ -282,23 +282,12 @@ class BuildBackend(LoggingMixin):
    282 282
             if app == "mobile/android":
    
    283 283
                 # Set up NoScript extension
    
    284 284
                 # We put it in the srcdir... It will be moved to the APK in the gradle build.
    
    285
    -            if noscript_location:
    
    286
    -                noscript_target = (
    
    287
    -                    Path(config.topsrcdir)
    
    288
    -                    / "mobile/android/fenix/app/src/main/assets/extensions"
    
    289
    -                    / noscript_target_filename
    
    290
    -                )
    
    291
    -                self.log(
    
    292
    -                    logging.INFO,
    
    293
    -                    "_setup_tor_browser_environment",
    
    294
    -                    {
    
    295
    -                        "noscript_location": noscript_location,
    
    296
    -                        "noscript_target": str(noscript_target),
    
    297
    -                    },
    
    298
    -                    "Creating symlink for NoScript from {noscript_location} to {noscript_target}",
    
    299
    -                )
    
    300
    -
    
    301
    -                _infallible_symlink(noscript_location, noscript_target)
    
    285
    +            self._setup_extension_symlink(
    
    286
    +                noscript_location,
    
    287
    +                noscript_target_filename,
    
    288
    +                Path(config.topsrcdir)
    
    289
    +                / "mobile/android/fenix/app/src/main/assets/extensions",
    
    290
    +            )
    
    302 291
     
    
    303 292
             if app == "browser":
    
    304 293
                 tbdir = Path(config.topobjdir) / "dist" / "bin"
    
    ... ... @@ -362,13 +351,15 @@ class BuildBackend(LoggingMixin):
    362 351
                     paths["tor_config"].mkdir(parents=True, exist_ok=True)
    
    363 352
                     for file in ["geoip", "geoip6", "torrc-defaults"]:
    
    364 353
                         target = paths["tor_config"] / file
    
    365
    -                    _infallible_symlink(expert_bundle_location / "data" / file, target)
    
    354
    +                    self._create_or_replace_symlink(
    
    355
    +                        expert_bundle_location / "data" / file, target
    
    356
    +                    )
    
    366 357
     
    
    367 358
                     # Set up Conjure documentation
    
    368 359
                     conjust_docs_location = paths["docs"] / "conjure"
    
    369 360
                     conjust_docs_location.mkdir(parents=True, exist_ok=True)
    
    370 361
                     conjure_readme = conjust_docs_location / "README.CONJURE.md"
    
    371
    -                _infallible_symlink(
    
    362
    +                self._create_or_replace_symlink(
    
    372 363
                         expert_bundle_location
    
    373 364
                         / "tor/pluggable_transports/README.CONJURE.md",
    
    374 365
                         conjure_readme,
    
    ... ... @@ -385,21 +376,21 @@ class BuildBackend(LoggingMixin):
    385 376
                         # We only want the PT executables.
    
    386 377
                         if os.access(file, os.X_OK) or file.suffix.lower() == ".exe":
    
    387 378
                             target = pluggable_transports_target / file.name
    
    388
    -                        _infallible_symlink(file, target)
    
    379
    +                        self._create_or_replace_symlink(file, target)
    
    389 380
     
    
    390 381
                     # Setup Tor binary
    
    391 382
                     for item in Path(expert_bundle_location / "tor").iterdir():
    
    392 383
                         target = paths["tor_bin"] / item.name
    
    393 384
     
    
    394 385
                         if item.is_file():
    
    395
    -                        _infallible_symlink(item, target)
    
    386
    +                        self._create_or_replace_symlink(item, target)
    
    396 387
     
    
    397 388
                     # Set up licenses
    
    398 389
                     licenses_location = paths["docs"] / "Licenses"
    
    399 390
                     licenses_location.mkdir(parents=True, exist_ok=True)
    
    400 391
                     for item in (expert_bundle_location / "docs").iterdir():
    
    401 392
                         target = licenses_location / item.name
    
    402
    -                    _infallible_symlink(item, target)
    
    393
    +                    self._create_or_replace_symlink(item, target)
    
    403 394
     
    
    404 395
         def post_build(self, config, output, jobs, verbose, status):
    
    405 396
             """Called late during 'mach build' execution, after `build(...)` has finished.