GNOME Bugzilla – Bug 150331
[build] uninstall of Gstreamer fails on Solaris due to non-gnu rmdir command in Makefile
Last modified: 2008-12-01 09:01:06 UTC
1. try to uninstall Gstreamer 2. uninstallation fails, because rmdir on Solaris does NOT have option --ignore-fail-on-non-empty -- Uninstalling /opt/BGSgnome-2.6.2/share/gtk-doc/html/gstreamer-0.8/index.sgml if test -d /opt/BGSgnome-2.6.2/share/gtk-doc/html/gstreamer-0.8; then rmdir -p --ignor e-fail-on-non-empty /opt/BGSgnome-2.6.2/share/gtk-doc/html/gstreamer-0.8; fi rmdir: illegal option -- - rmdir: illegal option -- i rmdir: illegal option -- g rmdir: illegal option -- n rmdir: illegal option -- o rmdir: illegal option -- r rmdir: illegal option -- e rmdir: illegal option -- - rmdir: illegal option -- f rmdir: illegal option -- a rmdir: illegal option -- i rmdir: illegal option -- l rmdir: illegal option -- - rmdir: illegal option -- o rmdir: illegal option -- n rmdir: illegal option -- - rmdir: illegal option -- n rmdir: illegal option -- o rmdir: illegal option -- n rmdir: illegal option -- - rmdir: illegal option -- e rmdir: illegal option -- m rmdir: illegal option -- t rmdir: illegal option -- y Usage: rmdir [-ps] dirname ... make[2]: *** [uninstall-local] Error 2 make[2]: Leaving directory `/net/poseidon/export/BGSgnome/garnome-2.6.2_bgs/desktop/gs treamer/work/main.d/gstreamer-0.8.4/docs/gst' make[1]: *** [uninstall-recursive] Error 1 make[1]: Leaving directory `/net/poseidon/export/BGSgnome/garnome-2.6.2_bgs/desktop/gs root@athena /net/poseidon/export/BGSgnome/garnome-2.6.2_bgs/desktop/gstreamer/work/main.d/gstreamer-0.8.4# On Solaris, you can use "grmdir", which is not part of standard Solaris distribution and must be installed separately (Solaris Software companion CD or www.sunfreeware.com) Is that argument really needed anyway?
Fixed.
if someone put in a 20 character option it probably wasn't a mistake but quite intentional. This needs a proper fix that doesn't break make distcheck - like any build fix.
This is still the same behaviour, in 0.8.6.
a patch that works on solaris and doesn't break on linux would be accepted.
That command is still in HEAD. Assigning to thomas. Brian you know anything about this? If not can you get someone to look at it?
[20:52] <yippi> ___tim, sorry, I don't really know what to do about this... aside from implement a script to do it instead So, anything new here? What to do? - WONTFIX? - use a fake 'rmdir' script? - just use 'rm -f' instead?
any updates? is this still an issue?
Yes, this is an issue. Since we don't typically "make uninstall" when we do our builds, we just don't hit this problem. It's more of a problem for people who want to build from source and who want to uninstall it.
This is because of our own gtk-doc.mak this is gtkdoc's offical uninstall-local: rm -f $(DESTDIR)$(TARGET_DIR)/* this is gstreamer's uninstall-local: (installfiles=`echo ./html/*.html`; \ if test "$$installfiles" = './html/*.html'; \ then echo '-- Nothing to uninstall' ; \ else \ for i in $$installfiles; do \ rmfile=`basename $$i` ; \ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \ rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \ done; \ pngfiles=`echo ./html/*.png`; \ if test "$$pngfiles" != './html/*.png'; then \ for i in $$pngfiles; do \ rmfile=`basename $$i` ; \ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/'$$rmfile ; \ rm -f $(DESTDIR)$(TARGET_DIR)/$$rmfile; \ done; \ fi; \ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE).devhelp' ; \ rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp; \ if test -e $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; then \ rm -f $(DESTDIR)$(TARGET_DIR)/$(DOC_MODULE)-@GST_MAJORMINOR@.devhelp2; \ fi; \ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/index.sgml' ; \ rm -f $(DESTDIR)$(TARGET_DIR)/index.sgml; \ if test -e $(DESTDIR)$(TARGET_DIR)/style.css; then \ echo '-- Uninstalling $(DESTDIR)$(TARGET_DIR)/style.css' ; \ rm -f $(DESTDIR)$(TARGET_DIR)/style.css; \ fi; \ fi) if test -d $(DESTDIR)$(TARGET_DIR); then rmdir -p --ignore-fail-on-non-empty $(DESTDIR)$(TARGET_DIR) 2>/dev/null; fi; true
Could someone on solaris then perhaps test if everything works fine with uninstall-local: rm -f $(DESTDIR)$(TARGET_DIR)/* I have no idea why that target ever was forked as such.
Wouldn't you want to do "rmdir -fR" to make sure that any subdirs in the /opt/BGSgnome-2.6.2/share/gtk-doc/html/gstreamer-0.8/ directory also get deleted? I think the main advantage of "rmdir -p" is that it also removes empty parent directories, so that if "gstreamer-0.8" is the only subdirectory in "share/gtk-doc/html", then it will delete the "html" directory, and up the stack. However, I'm not sure this is really that useful since many modules install gtk-docs, and users would typically install GStreamer to a directory where there would be other docs and the "-p" wouldn't be useful. In other words, this "-p" provides some benefit to users who install/uninstall GStreamer to odd directories like /opt. However, people who do things like this are probably not novices and are clever enough to clean up after "make uninstall" if it doesn't clean away common directories.
I'm very sorry but I'm not maintaining that GNOME build on Solaris (the one I was reporting the bug for). And currently I can't even test "rm" commands on Solaris :-(
2008-12-01 Stefan Kost <ensonic@users.sf.net> * gtk-doc-plugins.mak: * gtk-doc.mak: Simplily uninstall rule. Its closer to upstream and fixes #150331.