[pdm-devel] [PATCH datacenter-manager 1/1] buildsys: initialize pwt-assets as submodule automatically

Fiona Ebner f.ebner at proxmox.com
Wed Oct 29 15:14:03 CET 2025


When the submodule is not initialized there would be some errors at
the beginning of the build like:
> Error: Can't find stylesheet to import.
but then cargo would continue and compile everything only for the
build to fail at the very end.

Copied from Stoiko's equivalent patch for PMG [0].

[0]: https://lore.proxmox.com/pmg-devel/20251028163628.79739-2-s.ivanov@proxmox.com/

Co-developed-by: Stoiko Ivanov <s.ivanov at proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---

By chance, I stumbled upon Stoiko's patch for PMG after running into
the issue myself in PDM :)

 ui/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ui/Makefile b/ui/Makefile
index 61e5c77..49ae8ee 100644
--- a/ui/Makefile
+++ b/ui/Makefile
@@ -75,8 +75,11 @@ install: $(COMPILED_OUTPUT) index.hbs
 	install -m0644 dist/material-yew-style.css $(DESTDIR)$(UIDIR)
 	install -m0644 dist/desktop-yew-style.css $(DESTDIR)$(UIDIR)
 
+.PHONY: submodule
+submodule:
+	test -f "pwt-assets/README.md" || git submodule update --init
 
-$(BUILDDIR):
+$(BUILDDIR): submodule
 	rm -rf $@ $@.tmp
 	mkdir -p $@.tmp/ui
 	cp -a debian/ src/ pwt-assets/ images/ css/ index.hbs Makefile Cargo.toml $@.tmp/ui
-- 
2.47.3





More information about the pdm-devel mailing list