mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 13:43:04 -05:00
Revert "fix bootstrap-without-vcs.patch for latest firefox"
This reverts commit 8e719aebb7
.
This commit is contained in:
parent
8e719aebb7
commit
d1ca5248bc
3 changed files with 82 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
||||||
patches/allow-ubo-private-mode.patch
|
patches/allow-ubo-private-mode.patch
|
||||||
patches/bootstrap-without-vcs.patch
|
patches/bootstrap-without-vcs2.patch
|
||||||
patches/context-menu.patch
|
patches/context-menu.patch
|
||||||
patches/custom-ubo-assets-bootstrap-location.patch
|
patches/custom-ubo-assets-bootstrap-location.patch
|
||||||
patches/disable-data-reporting-at-compile-time.patch
|
patches/disable-data-reporting-at-compile-time.patch
|
||||||
|
|
|
@ -1,22 +1,20 @@
|
||||||
--- a/python/mozboot/mozboot/bootstrap.py
|
--- a/python/mozboot/mozboot/bootstrap.py
|
||||||
+++ b/python/mozboot/mozboot/bootstrap.py
|
+++ b/python/mozboot/mozboot/bootstrap.py
|
||||||
@@ -548,11 +548,9 @@ def current_firefox_checkout(env, hg: Optional[Path] = None):
|
@@ -542,10 +542,7 @@ def current_firefox_checkout(env, hg=None):
|
||||||
|
if child == "":
|
||||||
if not len(path.parents):
|
|
||||||
break
|
break
|
||||||
+ path = path.parent
|
|
||||||
|
|
||||||
- raise UserError(
|
- raise UserError(
|
||||||
- "Could not identify the root directory of your checkout! "
|
- "Could not identify the root directory of your checkout! "
|
||||||
- "Are you running `mach bootstrap` in an hg or git clone?"
|
- "Are you running `mach bootstrap` in an hg or git clone?"
|
||||||
- )
|
- )
|
||||||
+ return ("local", Path.cwd())
|
+ return ("local", os.getcwd())
|
||||||
|
|
||||||
|
|
||||||
def update_git_tools(git: Optional[Path], root_state_dir: Path):
|
def update_git_tools(git, root_state_dir):
|
||||||
--- a/python/mozversioncontrol/mozversioncontrol/__init__.py
|
--- a/python/mozversioncontrol/mozversioncontrol/__init__.py
|
||||||
+++ b/python/mozversioncontrol/mozversioncontrol/__init__.py
|
+++ b/python/mozversioncontrol/mozversioncontrol/__init__.py
|
||||||
@@ -684,6 +684,29 @@ class GitRepository(Repository):
|
@@ -672,6 +672,27 @@ class GitRepository(Repository):
|
||||||
self._run("config", name, value)
|
self._run("config", name, value)
|
||||||
|
|
||||||
|
|
||||||
|
@ -41,24 +39,22 @@
|
||||||
+ return FileListFinder(files)
|
+ return FileListFinder(files)
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
+
|
def get_repository_object(path, hg="hg", git="git"):
|
||||||
+
|
|
||||||
def get_repository_object(path: Optional[Union[str, Path]], hg="hg", git="git"):
|
|
||||||
"""Get a repository object for the repository at `path`.
|
"""Get a repository object for the repository at `path`.
|
||||||
If `path` is not a known VCS repository, raise an exception.
|
If `path` is not a known VCS repository, raise an exception.
|
||||||
@@ -697,7 +720,7 @@ def get_repository_object(path: Optional[Union[str, Path]], hg="hg", git="git"):
|
@@ -681,7 +696,7 @@ def get_repository_object(path, hg="hg", git="git"):
|
||||||
elif (path / ".git").exists():
|
elif os.path.exists(os.path.join(path, ".git")):
|
||||||
return GitRepository(path, git=git)
|
return GitRepository(path, git=git)
|
||||||
else:
|
else:
|
||||||
- raise InvalidRepoPath(f"Unknown VCS, or not a source checkout: {path}")
|
- raise InvalidRepoPath("Unknown VCS, or not a source checkout: %s" % path)
|
||||||
+ return LocalRepository(path)
|
+ return LocalRepository(path)
|
||||||
|
|
||||||
|
|
||||||
def get_repository_from_build_config(config):
|
def get_repository_from_build_config(config):
|
||||||
@@ -721,6 +744,8 @@ def get_repository_from_build_config(config):
|
@@ -705,6 +720,8 @@ def get_repository_from_build_config(config):
|
||||||
return HgRepository(Path(config.topsrcdir), hg=config.substs["HG"])
|
return HgRepository(config.topsrcdir, hg=config.substs["HG"])
|
||||||
elif flavor == "git":
|
elif flavor == "git":
|
||||||
return GitRepository(Path(config.topsrcdir), git=config.substs["GIT"])
|
return GitRepository(config.topsrcdir, git=config.substs["GIT"])
|
||||||
+ elif flavor == "local":
|
+ elif flavor == "local":
|
||||||
+ return LocalRepository(config.topsrcdir)
|
+ return LocalRepository(config.topsrcdir)
|
||||||
else:
|
else:
|
||||||
|
|
69
patches/bootstrap-without-vcs2.patch
Normal file
69
patches/bootstrap-without-vcs2.patch
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
diff --git a/python/mozboot/mozboot/bootstrap.py b/python/mozboot/mozboot/bootstrap.py
|
||||||
|
index b0d6965..8ea2e15 100644
|
||||||
|
--- a/python/mozboot/mozboot/bootstrap.py
|
||||||
|
+++ b/python/mozboot/mozboot/bootstrap.py
|
||||||
|
@@ -549,10 +549,8 @@ def current_firefox_checkout(env, hg: Optional[Path] = None):
|
||||||
|
if not len(path.parents):
|
||||||
|
break
|
||||||
|
|
||||||
|
- raise UserError(
|
||||||
|
- "Could not identify the root directory of your checkout! "
|
||||||
|
- "Are you running `mach bootstrap` in an hg or git clone?"
|
||||||
|
- )
|
||||||
|
+ return ("local", os.getcwd())
|
||||||
|
+
|
||||||
|
|
||||||
|
|
||||||
|
def update_git_tools(git: Optional[Path], root_state_dir: Path):
|
||||||
|
diff --git a/python/mozversioncontrol/mozversioncontrol/__init__.py b/python/mozversioncontrol/mozversioncontrol/__init__.py
|
||||||
|
index dd31f53..6f0087a 100644
|
||||||
|
--- a/python/mozversioncontrol/mozversioncontrol/__init__.py
|
||||||
|
+++ b/python/mozversioncontrol/mozversioncontrol/__init__.py
|
||||||
|
@@ -684,6 +684,29 @@ class GitRepository(Repository):
|
||||||
|
self._run("config", name, value)
|
||||||
|
|
||||||
|
|
||||||
|
+class LocalRepository(Repository):
|
||||||
|
+
|
||||||
|
+ def __init__(self, path):
|
||||||
|
+ super(LocalRepository, self).__init__(path, tool="true")
|
||||||
|
+
|
||||||
|
+ @property
|
||||||
|
+ def head_ref(self):
|
||||||
|
+ return ""
|
||||||
|
+
|
||||||
|
+ def get_outgoing_files(self):
|
||||||
|
+ return []
|
||||||
|
+
|
||||||
|
+ def get_changed_files(self):
|
||||||
|
+ return []
|
||||||
|
+
|
||||||
|
+ def get_tracked_files_finder(self):
|
||||||
|
+ files = [os.path.relpath(os.path.join(dp, f), self.path).replace("\\","/") for dp, dn, fn in os.walk(self.path) for f in fn]
|
||||||
|
+ files.sort()
|
||||||
|
+ return FileListFinder(files)
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
+
|
||||||
|
def get_repository_object(path: Optional[Union[str, Path]], hg="hg", git="git"):
|
||||||
|
"""Get a repository object for the repository at `path`.
|
||||||
|
If `path` is not a known VCS repository, raise an exception.
|
||||||
|
@@ -697,7 +720,7 @@ def get_repository_object(path: Optional[Union[str, Path]], hg="hg", git="git"):
|
||||||
|
elif (path / ".git").exists():
|
||||||
|
return GitRepository(path, git=git)
|
||||||
|
else:
|
||||||
|
- raise InvalidRepoPath(f"Unknown VCS, or not a source checkout: {path}")
|
||||||
|
+ return LocalRepository(path)
|
||||||
|
|
||||||
|
|
||||||
|
def get_repository_from_build_config(config):
|
||||||
|
@@ -721,6 +744,8 @@ def get_repository_from_build_config(config):
|
||||||
|
return HgRepository(Path(config.topsrcdir), hg=config.substs["HG"])
|
||||||
|
elif flavor == "git":
|
||||||
|
return GitRepository(Path(config.topsrcdir), git=config.substs["GIT"])
|
||||||
|
+ elif flavor == "local":
|
||||||
|
+ return LocalRepository(config.topsrcdir)
|
||||||
|
else:
|
||||||
|
raise MissingVCSInfo("unknown VCS_CHECKOUT_TYPE value: %s" % flavor)
|
||||||
|
|
Loading…
Reference in a new issue