зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1216817 - Part 3: Add files from artifacts to $OBJDIR/_build_manifests/install/dist_bin. r=glandium
This allows to run |mach artifact install| immediately after |mach configure| and not have a subsequent |mach build| delete the files that |mach artifact install| copied into dist/bin. --HG-- extra : commitid : DUlkhNNPeFt extra : rebase_source : 0bebba8f16f5496fda762f2ec5402d9c5ea83448
This commit is contained in:
Родитель
d9a97523e3
Коммит
77de883dd7
|
@ -10,6 +10,10 @@ import os
|
||||||
|
|
||||||
import mozpack.path as mozpath
|
import mozpack.path as mozpath
|
||||||
|
|
||||||
|
from mozpack.manifests import (
|
||||||
|
InstallManifest,
|
||||||
|
)
|
||||||
|
|
||||||
from mozbuild.base import (
|
from mozbuild.base import (
|
||||||
MachCommandBase,
|
MachCommandBase,
|
||||||
MachCommandConditions as conditions,
|
MachCommandConditions as conditions,
|
||||||
|
@ -168,7 +172,20 @@ class PackageFrontend(MachCommandBase):
|
||||||
self._set_log_level(verbose)
|
self._set_log_level(verbose)
|
||||||
tree, job = self._compute_defaults(tree, job)
|
tree, job = self._compute_defaults(tree, job)
|
||||||
artifacts = self._make_artifacts(tree=tree, job=job)
|
artifacts = self._make_artifacts(tree=tree, job=job)
|
||||||
return artifacts.install_from(source, self.bindir)
|
|
||||||
|
manifest_path = mozpath.join(self.topobjdir, '_build_manifests', 'install', 'dist_bin')
|
||||||
|
manifest = InstallManifest(manifest_path)
|
||||||
|
|
||||||
|
def install_callback(path, file_existed, file_updated):
|
||||||
|
if path not in manifest:
|
||||||
|
manifest.add_optional_exists(path)
|
||||||
|
|
||||||
|
retcode = artifacts.install_from(source, self.bindir, install_callback=install_callback)
|
||||||
|
|
||||||
|
if retcode == 0:
|
||||||
|
manifest.write(manifest_path)
|
||||||
|
|
||||||
|
return retcode
|
||||||
|
|
||||||
@ArtifactSubCommand('artifact', 'last',
|
@ArtifactSubCommand('artifact', 'last',
|
||||||
'Print the last pre-built artifact installed.')
|
'Print the last pre-built artifact installed.')
|
||||||
|
|
Загрузка…
Ссылка в новой задаче