Gentoo Logo
Gentoo Spaceship

Installation:
Gentoo Handbook
Installation Docs

Documentation:
Home
Listing
About Gentoo
Philosophy
Social Contract

Resources:
Bug Tracker
Developer List
Discussion Forums
Gentoo BitTorrents
Gentoo Linux Enhancement Proposals
IRC Channels
Mailing Lists
Mirrors
Name and Logo Guidelines
Online Package Database
Security Announcements
Staffing Needs
Supporting Vendors
View our CVS

Graphics:
Logos and themes
Icons
ScreenShots

Miscellaneous Resources:
Gentoo Linux Store
Gentoo-hosted projects
IBM dW/Intel article archive




List Archive: gentoo-commits
Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-commits@g.o
From: "Matthias Schwarzott (zzam)" <zzam@g.o>
Subject: gentoo-x86 commit in app-misc/lirc: ChangeLog lirc-0.8.6-r1.ebuild
Date: Tue, 03 Nov 2009 19:53:29 +0000
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@g.o> 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@g.o> 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@g.o> 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"





Navigation:
Lists: gentoo-commits: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
gentoo-x86 commit in games-puzzle/pipepanic/files: - New directory
Next by thread:
gentoo-x86 commit in sys-kernel/tuxonice-sources: tuxonice-sources-2.6.30-r6.ebuild ChangeLog tuxonice-sources-2.6.29-r4.ebuild
Previous by date:
gentoo-x86 commit in games-puzzle/pipepanic/files: - New directory
Next by date:
gentoo-x86 commit in sys-kernel/tuxonice-sources: tuxonice-sources-2.6.30-r6.ebuild ChangeLog tuxonice-sources-2.6.29-r4.ebuild


Updated Nov 25, 2009

Donate to support our development efforts.

Gentoo Centric Hosting: vr.org

VR Hosted

Tek Alchemy

Tek Alchemy

SevenL.net

SevenL.net

php|architect

php|architect

Copyright 2001-2007 Gentoo Foundation, Inc. Questions, Comments? Email www@gentoo.org.