mirror of
https://gitlab.redox-os.org/redox-os/redox.git
synced 2026-07-09 21:18:41 +08:00
Fix push to mount behind podman
This commit is contained in:
parent
46f6962148
commit
4ac80cb28a
16
mk/repo.mk
16
mk/repo.mk
@ -64,21 +64,21 @@ MOUNTED_TAG=$(MOUNT_DIR)~
|
|||||||
# Push compiled package into existing image
|
# Push compiled package into existing image
|
||||||
# DO NOT RUN THIS WHILE QEMU ALIVE, THE DISK MIGHT CORRUPT IN DOING SO
|
# DO NOT RUN THIS WHILE QEMU ALIVE, THE DISK MIGHT CORRUPT IN DOING SO
|
||||||
p.%: $(FSTOOLS_TAG) FORCE
|
p.%: $(FSTOOLS_TAG) FORCE
|
||||||
|
ifeq ($(PODMAN_BUILD),1)
|
||||||
|
$(PODMAN_RUN) make $@
|
||||||
|
else
|
||||||
@rm -f $(MOUNTED_TAG)
|
@rm -f $(MOUNTED_TAG)
|
||||||
@if [ ! -d "$(MOUNT_DIR)" ]; then \
|
@if [ ! -d "$(MOUNT_DIR)" ]; then \
|
||||||
$(MAKE) mount; \
|
$(MAKE) mount; \
|
||||||
touch $(MOUNTED_TAG); \
|
touch $(MOUNTED_TAG); \
|
||||||
fi
|
fi
|
||||||
ifeq ($(PODMAN_BUILD),1)
|
|
||||||
$(PODMAN_RUN) make $@
|
|
||||||
else
|
|
||||||
$(if $(findstring nonstop,$(REPO_NONSTOP)),export COOKBOOK_NONSTOP=true && ,) cd ./cookbook && \
|
$(if $(findstring nonstop,$(REPO_NONSTOP)),export COOKBOOK_NONSTOP=true && ,) cd ./cookbook && \
|
||||||
./target/release/repo push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=../$(MOUNT_DIR)"
|
./target/release/repo push $(foreach f,$(subst $(comma), ,$*),$(f)) "--sysroot=../$(MOUNT_DIR)"
|
||||||
endif
|
|
||||||
@if [ -f $(MOUNTED_TAG) ]; then \
|
@if [ -f $(MOUNTED_TAG) ]; then \
|
||||||
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
|
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
|
||||||
else echo "Not unmounting by ourself, don't forget to do it"; \
|
else echo "Not unmounting by ourself, don't forget to do it"; \
|
||||||
fi
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
# Push compiled package with their package dependencies
|
# Push compiled package with their package dependencies
|
||||||
pp.%: $(FSTOOLS_TAG) FORCE
|
pp.%: $(FSTOOLS_TAG) FORCE
|
||||||
@ -86,20 +86,20 @@ pp.%: $(FSTOOLS_TAG) FORCE
|
|||||||
|
|
||||||
# Push all recipes specified by the filesystem config
|
# Push all recipes specified by the filesystem config
|
||||||
push: $(FSTOOLS_TAG) FORCE
|
push: $(FSTOOLS_TAG) FORCE
|
||||||
|
ifeq ($(PODMAN_BUILD),1)
|
||||||
|
$(PODMAN_RUN) make $@
|
||||||
|
else
|
||||||
@rm -f $(MOUNTED_TAG)
|
@rm -f $(MOUNTED_TAG)
|
||||||
@if [ ! -d "$(MOUNT_DIR)" ]; then \
|
@if [ ! -d "$(MOUNT_DIR)" ]; then \
|
||||||
$(MAKE) mount; \
|
$(MAKE) mount; \
|
||||||
touch $(MOUNTED_TAG); \
|
touch $(MOUNTED_TAG); \
|
||||||
fi
|
fi
|
||||||
ifeq ($(PODMAN_BUILD),1)
|
|
||||||
$(PODMAN_RUN) make $@
|
|
||||||
else
|
|
||||||
cd ./cookbook && ./target/release/repo push --with-package-deps "--filesystem=../$(FILESYSTEM_CONFIG)" "--sysroot=../$(MOUNT_DIR)"
|
cd ./cookbook && ./target/release/repo push --with-package-deps "--filesystem=../$(FILESYSTEM_CONFIG)" "--sysroot=../$(MOUNT_DIR)"
|
||||||
endif
|
|
||||||
@if [ -f $(MOUNTED_TAG) ]; then \
|
@if [ -f $(MOUNTED_TAG) ]; then \
|
||||||
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
|
$(MAKE) unmount && rm -f $(MOUNTED_TAG); \
|
||||||
else echo "Not unmounting by ourself, don't forget to do it"; \
|
else echo "Not unmounting by ourself, don't forget to do it"; \
|
||||||
fi
|
fi
|
||||||
|
endif
|
||||||
|
|
||||||
# Invoke unfetch for one or more targets separated by comma
|
# Invoke unfetch for one or more targets separated by comma
|
||||||
u.%: $(FSTOOLS_TAG) FORCE
|
u.%: $(FSTOOLS_TAG) FORCE
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user