From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Larson Date: Wed, 03 Mar 2004 18:46:08 +0000 Subject: Re: [patch] automatically install correct initscript Message-Id: <20040303184608.GE12971@rikers.org> MIME-Version: 1 Content-Type: multipart/mixed; boundary="FL5UXtIhxfXey3p5" List-Id: References: <1078188416.10733.44.camel@localhost> In-Reply-To: <1078188416.10733.44.camel@localhost> To: linux-hotplug@vger.kernel.org --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Robert Love (rml@ximian.com) wrote: > On Mon, 2004-03-01 at 20:08, Robert Love wrote: > > > Ack, I did not even see that! Thanks. > > > > Let's rip that out, and always use the new built-in logic to determine > > what initscript to install. > > Hm, looks like we do not need the %{lsb} and USE_LSB logic at all, > anymore. > > Here is the patch, updated, removing both completely. [snip] > + @if [ -f /etc/redhat-release ]; then \ > + $(INSTALL_DATA) etc/init.d/udev $(etcdir)/init.d/udev; \ > + elif [ -f /etc/SuSE-release ]; then \ > + $(INSTALL_DATA) etc/init.d/udev.init.LSB $(etcdir)/init.d/udev; \ > + elif [ -f /etc/debian_version ]; then \ > + $(INSTALL_DATA) etc/init.d/udev.debian $(etcdir)/init.d/udev; \ > + fi [snip] Speaking as a package and distribution maintainer and all around CM and build guy, there are two problems I feel the need to point out. First, you're installing into $(etcdir) directly. Bad, Bad, Bad. -always- obey DESTDIR. -always-. Second, the distro I'm installing into isn't necessarily the distro I'm building on. Any opposition to making the tests obey DESTDIR as well? -- Chris Larson - kergoth at handhelds dot org Embedded Linux Developer - clarson at ti dot com OpenZaurus Project Maintainer - http://openzaurus.org/ --FL5UXtIhxfXey3p5 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="fix-initscriptinstall-destdir.patch" # # Patch managed by http://www.mn-logistik.de/unsupported/pxa250/patcher # --- udev-019/Makefile~fix-initscriptinstall-destdir 2004-03-03 03:41:41.000000000 -0500 +++ udev-019/Makefile 2004-03-03 03:43:16.000000000 -0500 @@ -342,12 +342,12 @@ endif install-initscript: etc/init.d/udev etc/init.d/udev.debian etc/init.d/udev.init.LSB - @if [ -f /etc/redhat-release ]; then \ - $(INSTALL_DATA) etc/init.d/udev $(etcdir)/init.d/udev; \ - elif [ -f /etc/SuSE-release ]; then \ - $(INSTALL_DATA) etc/init.d/udev.init.LSB $(etcdir)/init.d/udev; \ - elif [ -f /etc/debian_version ]; then \ - $(INSTALL_DATA) etc/init.d/udev.debian $(etcdir)/init.d/udev; \ + @if [ -f $(DESTDIR)/etc/redhat-release ]; then \ + $(INSTALL_DATA) etc/init.d/udev $(DESTDIR)$(etcdir)/init.d/udev; \ + elif [ -f $(DESTDIR)/etc/SuSE-release ]; then \ + $(INSTALL_DATA) etc/init.d/udev.init.LSB $(DESTDIR)$(etcdir)/init.d/udev; \ + elif [ -f $(DESTDIR)/etc/debian_version ]; then \ + $(INSTALL_DATA) etc/init.d/udev.debian $(DESTDIR)$(etcdir)/init.d/udev; \ fi install-config: $(GEN_CONFIGS) --FL5UXtIhxfXey3p5-- ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel