brizental pushed to branch tor-browser-140.2.0esr-15.0-1 at The Tor Project / 
Applications / Tor Browser


Commits:
6b3510e9 by Beatriz Rizental at 2025-08-21T18:32:02+02:00
fixup! BB 43564: Modify ./mach bootstrap for Base Browser

- - - - -
7b6cea75 by Beatriz Rizental at 2025-08-21T18:32:02+02:00
fixup! TB 43564: Modify ./mach bootstrap for Tor Browser

- - - - -


1 changed file:

- python/mozbuild/mozbuild/backend/base.py


Changes:

=====================================
python/mozbuild/mozbuild/backend/base.py
=====================================
@@ -246,7 +246,7 @@ class BuildBackend(LoggingMixin):
         app = config.substs["MOZ_BUILD_APP"]
 
         noscript_target_filename = "{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
-        noscript_location = Path(config.substs["NOSCRIPT"])
+        noscript_location = config.substs.get("NOSCRIPT")
 
         def _infallible_symlink(src, dst):
             try:
@@ -280,30 +280,30 @@ class BuildBackend(LoggingMixin):
                     "fonts": tbdir / "fonts",
                 }
 
-            fonts_location = Path(config.substs["TOR_BROWSER_FONTS"])
-            if fonts_location.is_dir():
+            fonts_location = config.substs.get("TOR_BROWSER_FONTS")
+            if fonts_location:
                 self.log(
                     logging.INFO,
                     "_setup_tor_browser_environment",
                     {
-                        "fonts_location": str(fonts_location),
+                        "fonts_location": fonts_location,
                         "fonts_target": str(paths["fonts"]),
                     },
                     "Creating symlink for fonts files from {fonts_location} to 
{fonts_target}",
                 )
 
-                for file in fonts_location.iterdir():
+                for file in Path(fonts_location).iterdir():
                     target = paths["fonts"] / file.name
                     _infallible_symlink(file, target)
 
             # Set up NoScript extension
-            if noscript_location.is_file():
+            if noscript_location:
                 noscript_target = paths["exts"] / noscript_target_filename
                 self.log(
                     logging.INFO,
                     "_setup_tor_browser_environment",
                     {
-                        "noscript_location": str(noscript_location),
+                        "noscript_location": noscript_location,
                         "noscript_target": str(noscript_target),
                     },
                     "Creating symlink for NoScript from {noscript_location} to 
{noscript_target}",
@@ -312,8 +312,12 @@ class BuildBackend(LoggingMixin):
                 paths["exts"].mkdir(parents=True, exist_ok=True)
                 _infallible_symlink(noscript_location, noscript_target)
 
-            expert_bundle_location = Path(config.substs["TOR_EXPERT_BUNDLE"])
-            if expert_bundle_location.is_dir():
+            expert_bundle_location = config.substs.get("TOR_EXPERT_BUNDLE")
+            if expert_bundle_location:
+                expert_bundle_location = Path(expert_bundle_location)
+                if not expert_bundle_location.is_dir():
+                    return
+
                 self.log(
                     logging.INFO,
                     "_setup_tor_browser_environment",
@@ -353,9 +357,10 @@ class BuildBackend(LoggingMixin):
                         _infallible_symlink(file, target)
 
                 # Setup Tor binary
-                for item in (expert_bundle_location / "tor").iterdir():
+                for item in Path(expert_bundle_location / "tor").iterdir():
                     target = paths["tor_bin"] / item.name
-                    if target.is_file():
+
+                    if item.is_file():
                         _infallible_symlink(item, target)
 
                 # Set up licenses



View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c1827fba852ac331b5dfad6308931659cdce2724...7b6cea759c31637ab117f34a2b5b4a61b4fd9a9c

-- 
View it on GitLab: 
https://gitlab.torproject.org/tpo/applications/tor-browser/-/compare/c1827fba852ac331b5dfad6308931659cdce2724...7b6cea759c31637ab117f34a2b5b4a61b4fd9a9c
You're receiving this email because of your account on gitlab.torproject.org.


_______________________________________________
tbb-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to