After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 150331 - [build] uninstall of Gstreamer fails on Solaris due to non-gnu rmdir command in Makefile
[build] uninstall of Gstreamer fails on Solaris due to non-gnu rmdir command ...
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Solaris
: Normal minor
: NONE
Assigned To: Thomas Vander Stichele
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-08-17 07:12 UTC by Ivan Noris
Modified: 2008-12-01 09:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10



Description Ivan Noris 2004-08-17 07:12:22 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?
Comment 1 David Schleef 2004-08-18 21:46:57 UTC
Fixed.
Comment 2 Thomas Vander Stichele 2004-08-24 09:31:58 UTC
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.
Comment 3 Ivan Noris 2004-10-07 15:54:07 UTC
This is still the same behaviour, in 0.8.6.
Comment 4 Thomas Vander Stichele 2005-09-17 15:22:46 UTC
a patch that works on solaris and doesn't break on linux would be accepted.
Comment 5 Andy Wingo 2006-01-12 10:01:46 UTC
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?
Comment 6 Tim-Philipp Müller 2006-05-05 08:25:04 UTC
[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?
Comment 7 André Klapper 2007-06-20 21:51:49 UTC
any updates? is this still an issue?
Comment 8 Brian Cameron 2007-06-21 02:05:46 UTC
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.
Comment 9 Stefan Sauer (gstreamer, gtkdoc dev) 2007-10-15 11:35:42 UTC
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

Comment 10 Stefan Sauer (gstreamer, gtkdoc dev) 2008-11-16 18:00:55 UTC
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.
Comment 11 Brian Cameron 2008-11-17 17:22:46 UTC
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.
Comment 12 Ivan Noris 2008-11-17 22:25:16 UTC
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 :-(
Comment 13 Stefan Sauer (gstreamer, gtkdoc dev) 2008-12-01 09:00:24 UTC
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.