FDS/OS 1.0 fixes
This commit is contained in:
+13
-1
@@ -79,7 +79,13 @@ def check_pin():
|
||||
if pin != actual:
|
||||
raise ValueError('Void checkout differs from its pin')
|
||||
run('git', '-C', void, 'diff', '--exit-code', 'HEAD', '--')
|
||||
return void, pin
|
||||
build = project / '.host/void-packages'
|
||||
if subprocess.check_output(['git', '-C', str(build), 'rev-parse', 'HEAD'], text=True).strip() != pin:
|
||||
raise ValueError('Void build checkout differs from its pin')
|
||||
run('git', '-C', build, 'diff', '--exit-code', 'HEAD', '--')
|
||||
if subprocess.check_output(['git', '-C', str(void), 'status', '--porcelain', '--untracked-files=all'], text=True).strip():
|
||||
raise ValueError('Void upstream submodule is dirty')
|
||||
return build, pin
|
||||
|
||||
|
||||
def add_package(source, destination):
|
||||
@@ -245,6 +251,12 @@ def restore(source, destination):
|
||||
epoch = int(subprocess.check_output(['git', '-C', str(void), 'show', '-s', '--format=%ct', 'HEAD']))
|
||||
if epoch != lock['source_epoch']:
|
||||
raise ValueError('Restored Void commit timestamp differs from the snapshot')
|
||||
# Older frozen projects expect caches under vendor; their saved sources and
|
||||
# release inputs remain unchanged. New projects use the separate workspace.
|
||||
prepare = destination / 'tools/prepare-void-workspace'
|
||||
if prepare.is_file():
|
||||
run(sys.executable, prepare)
|
||||
void = destination / '.host/void-packages'
|
||||
copy(source / 'masterdir', void / 'masterdir-x86_64')
|
||||
copy(source / 'sources', void / 'hostdir/sources')
|
||||
copy(source / 'repositories/build', void / 'hostdir/frozen-repository')
|
||||
|
||||
Reference in New Issue
Block a user