mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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.
This commit is contained in:
parent
96b1f51bde
commit
944264f68a
@ -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.')
|
||||||
|
Loading…
Reference in New Issue
Block a user