Commit 8a7a360d authored by Ruslan Kuprieiev's avatar Ruslan Kuprieiev Committed by Pavel Emelyanov

uninstall: use --record with setup.py, v2

--record option allows us to keep track of files that are being
installed by writing them to specified file. We can than use that
file to do proper cleanup on uninstall.

v2, drop -r, as we shouldn't really care about dirs, because
    setup.py doesn't report them to us.
Signed-off-by: 's avatarRuslan Kuprieiev <kupruser@gmail.com>
Reviewed-by: 's avatarDmitry Safonov <dsafonov@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 851290bf
...@@ -33,3 +33,4 @@ criu/pie/piegen/piegen ...@@ -33,3 +33,4 @@ criu/pie/piegen/piegen
criu/pie/pie.lds.S criu/pie/pie.lds.S
criu/protobuf-desc-gen.h criu/protobuf-desc-gen.h
scripts/build/qemu-user-static/* scripts/build/qemu-user-static/*
lib/.crit-setup.files
...@@ -4,6 +4,10 @@ include $(__nmk_dir)/macro.mk ...@@ -4,6 +4,10 @@ include $(__nmk_dir)/macro.mk
CRIU_SO := libcriu.so CRIU_SO := libcriu.so
UAPI_HEADERS := c/criu.h ../images/rpc.proto UAPI_HEADERS := c/criu.h ../images/rpc.proto
#
# File to keep track of files installed by setup.py
CRIT_SETUP_FILES := .crit-setup.files
# #
# C language bindings. # C language bindings.
c/%: ../Makefile.versions c/%: ../Makefile.versions
...@@ -52,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in ...@@ -52,7 +56,7 @@ install: lib-c lib-py ../crit/crit c/criu.pc.in
$(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc $(Q) sed -e 's,@version@,$(CRIU_VERSION),' -e 's,@libdir@,$(LIBDIR),' -e 's,@includedir@,$(dir $(INCLUDEDIR)),' c/criu.pc.in > c/criu.pc
$(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig $(Q) install -m 644 c/criu.pc $(DESTDIR)$(LIBDIR)/pkgconfig
$(E) " INSTALL " crit $(E) " INSTALL " crit
$(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX) --record $(CRIT_SETUP_FILES)
.PHONY: install .PHONY: install
uninstall: uninstall:
...@@ -64,10 +68,5 @@ uninstall: ...@@ -64,10 +68,5 @@ uninstall:
$(E) " UNINSTALL" pkgconfig/criu.pc $(E) " UNINSTALL" pkgconfig/criu.pc
$(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/pkgconfig/,criu.pc) $(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/pkgconfig/,criu.pc)
$(E) " UNINSTALL" crit $(E) " UNINSTALL" crit
# $(Q) while read -r file; do $(RM) "$(DESTDIR)$$file"; done < $(CRIT_SETUP_FILES)
# FIXME How to deal with python setup properly?
$(Q) $(RM) $(addprefix $(DESTDIR)$(BINDIR)/,crit)
$(Q) $(RM) -r $(addprefix $(DESTDIR)$(LIBDIR)/python2.7/site-packages/,pycriu)
$(Q) $(RM) $(addprefix $(DESTDIR)$(LIBDIR)/python2.7/site-packages/,crit-0.0.1-py2.7.egg-info)
# $(Q) python ../scripts/crit-setup.py install --root=$(DESTDIR) --prefix=$(PREFIX)
.PHONY: uninstall .PHONY: uninstall
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment