public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in app-misc/lirc: ChangeLog lirc-0.8.6-r1.ebuild
@ 2009-11-03 19:53 Matthias Schwarzott (zzam)
  0 siblings, 0 replies; only message in thread
From: Matthias Schwarzott (zzam) @ 2009-11-03 19:53 UTC (permalink / raw
  To: gentoo-commits

zzam        09/11/03 19:53:29

  Modified:             ChangeLog lirc-0.8.6-r1.ebuild
  Log:
  Change ebuild, so that lirc package does no longer own lircd.conf. That way portage should not delete lircd.conf on update or unmerge.
  (Portage version: 2.1.6.13/cvs/Linux i686)

Revision  Changes    Path
1.211                app-misc/lirc/ChangeLog

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/ChangeLog?rev=1.211&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/ChangeLog?rev=1.211&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/ChangeLog?r1=1.210&r2=1.211

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v
retrieving revision 1.210
retrieving revision 1.211
diff -u -r1.210 -r1.211
--- ChangeLog	6 Oct 2009 21:15:33 -0000	1.210
+++ ChangeLog	3 Nov 2009 19:53:29 -0000	1.211
@@ -1,6 +1,14 @@
 # ChangeLog for app-misc/lirc
 # Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.210 2009/10/06 21:15:33 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/ChangeLog,v 1.211 2009/11/03 19:53:29 zzam Exp $
+
+  03 Nov 2009; Matthias Schwarzott <zzam@gentoo.org> lirc-0.8.6-r1.ebuild:
+  Change ebuild, so that lirc package does no longer own lircd.conf. That
+  way portage should not delete lircd.conf on update or unmerge.
+
+  03 Nov 2009; Matthias Schwarzott <zzam@gentoo.org> lirc-0.8.6-r1.ebuild:
+  Change ebuild, so that lirc package does no longer own lircd.conf. That
+  way portage should not delete lircd.conf on update or unmerge.
 
   06 Oct 2009; Christian Faulhammer <fauli@gentoo.org> lirc-0.8.5.ebuild:
   remove iguanaIR, because it is still in testing



1.2                  app-misc/lirc/lirc-0.8.6-r1.ebuild

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/lirc-0.8.6-r1.ebuild?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/lirc-0.8.6-r1.ebuild?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-misc/lirc/lirc-0.8.6-r1.ebuild?r1=1.1&r2=1.2

Index: lirc-0.8.6-r1.ebuild
===================================================================
RCS file: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.6-r1.ebuild,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- lirc-0.8.6-r1.ebuild	4 Oct 2009 18:48:28 -0000	1.1
+++ lirc-0.8.6-r1.ebuild	3 Nov 2009 19:53:29 -0000	1.2
@@ -1,6 +1,6 @@
 # Copyright 1999-2009 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.6-r1.ebuild,v 1.1 2009/10/04 18:48:28 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/lirc/lirc-0.8.6-r1.ebuild,v 1.2 2009/11/03 19:53:29 zzam Exp $
 
 inherit eutils linux-mod flag-o-matic autotools
 
@@ -303,7 +303,10 @@
 	insinto /usr/share/lirc/remotes
 	doins -r remotes/*
 
-	keepdir /var/run/lirc
+	keepdir /var/run/lirc /etc/lirc
+	if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+		newdoc "${D}"/etc/lirc/lircd.conf lircd.conf.example
+	fi
 }
 
 pkg_preinst() {
@@ -315,14 +318,36 @@
 		mv -f "${dir}/lirc" "${dir}/lirc.conf"
 	fi
 
-	# stop portage from deleting this file
-	if [[ -f "${ROOT}"/etc/lirc/lircd.conf && ! -f "${D}"/etc/lirc/lircd.conf ]]; then
-		cp "${ROOT}"/etc/lirc/lircd.conf "${D}"/etc/lirc/lircd.conf
+	# copy the first file that can be found
+	if [[ -f "${ROOT}"/etc/lirc/lircd.conf ]]; then
+		cp "${ROOT}"/etc/lirc/lircd.conf "${T}"/lircd.conf
+	elif [[ -f "${ROOT}"/etc/lircd.conf ]]; then
+		cp "${ROOT}"/etc/lircd.conf "${T}"/lircd.conf
+		MOVE_OLD_LIRCD_CONF=1
+	elif [[ -f "${D}"/etc/lirc/lircd.conf ]]; then
+		cp "${D}"/etc/lirc/lircd.conf "${T}"/lircd.conf
+	fi
+
+	# stop portage from touching the config file
+	if [[ -e "${D}"/etc/lirc/lircd.conf ]]; then
+		rm -f "${D}"/etc/lirc/lircd.conf
 	fi
 }
 
 pkg_postinst() {
 	linux-mod_pkg_postinst
+	
+	# copy config file to new location
+	# without portage knowing about it
+	# so it will not delete it on unmerge or ever touch it again
+	if [[ -e "${T}"/lircd.conf ]]; then
+		cp "${T}"/lircd.conf "${ROOT}"/etc/lirc/lircd.conf
+		if [[ "$MOVE_OLD_LIRCD_CONF" = "1" ]]; then
+			elog "Moved /etc/lircd.conf to /etc/lirc/lircd.conf"
+			rm -f "${ROOT}"/etc/lircd.conf
+		fi
+	fi
+
 	ewarn
 	ewarn "The lirc_gpio driver will not work with Kernels 2.6.22+"
 	ewarn "You need to switch over to /dev/input/event? if you need gpio"






^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-11-03 19:53 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-03 19:53 [gentoo-commits] gentoo-x86 commit in app-misc/lirc: ChangeLog lirc-0.8.6-r1.ebuild Matthias Schwarzott (zzam)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox