This occurs with lircd-0.8.2-r2. When I change LIRC_DEVICES from imon_pad to imon_pad2keys using emerge -N, I had a great deal of difficulty, until I finally figured out that lircd.conf is not replaced, nor is this noted during the install. The files are not necessarily compatible. I see the following line, when lircd.conf already exists during the install: >>> /etc/lircd.conf If lircd.conf does not exist, I see: --- replaced obj /etc/lircd.conf Despite this, if the file already exists, the old file is kept. The only way to get the new lircd.conf from the install is to first delete /etc/lircd.conf. Since this is a potentially a user altered configuration file, I believe that the new lircd.conf from the package should be called ._cfg*
Learn to use etc-update or dispatch-conf.. This is basic knowledge of Gentoo administration.
I do not understand your response. etc-update only finds work to do if there is a file of the form: /etc/.../._cfg* etc-update will do no good in this case, since the file is never created. As I have said, /etc/lircd.conf is preserved, and the lircd.conf file does ***NOT*** get installed as ._cfg????_lircd.conf. This means the original lircd.conf file from the package is lost. The only way to get lircd.conf from the package is to delete the configuration file, which is not normal for Gentoo configuration files. The only thing that happens if the file already exists is the date and time of the file are updated. Here is an example: tvscribe etc # etc-update Scanning Configuration files... Exiting: Nothing left to do; exiting. :) tvscribe etc # md5sum lircd.conf 703258f3c7a35352c1512586e978a60b lircd.conf tvscribe etc # LIRC_DEVICES=imon_pad2keys emerge -v lirc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-misc/lirc-0.8.2-r2 USE="X -debug -doc -hardware-carrier -transmitter" LIRC_DEVICES="imon_pad2keys* -accent -act200l -act220l -adaptec -all -alsa_usb -animax -asusdh -atilibusb -atiusb -audio -audio_alsa -avermedia -avermedia98 -avermedia_vdomate -bestbuy -bestbuy2 -breakoutbox -bte -bw6130 -caraca -chronos -cmdir -cph06x -creative -creative_infracd -devinput -digimatrix -dsp -dvico -ea65 -exaudio -flyvideo -gvbctv5pci -hauppauge -hauppauge_dvb -hercules_smarttv_stereo -igorplugusb -imon -imon_pad* -imon_rsc -inputlirc -irdeo -irdeo_remote -irman -irreal -it87 -knc_one -kworld -leadtek_0007 -leadtek_0010 -leadtek_pvr2000 -livedrive_midi -livedrive_seq -logitech -macmini -mceusb -mceusb2 -mediafocusI -mouseremote -mouseremote_ps2 -mp3anywhere -nslu2 -packard_bell -parallel -pcmak -pcmak_usb -pctv -pixelview_bt878 -pixelview_pak -pixelview_pro -provideo -realmagic -remote_wonder_plus -remotemaster -sa1100 -sasem -sb0540 -serial -serial_igor_cesko -silitek -sir -slinke -streamzap -tekram -tekram_bt829 -tira -ttusbir -tuxbox -tvbox -udp -uirt2 -uirt2_raw -usb_uirt_raw -usbirboy -usbx -userspace -xboxusb" 0 kB Total: 1 package (1 reinstall), Size of downloads: 0 kB >>> Verifying ebuild Manifests... >>> Emerging (1 of 1) app-misc/lirc-0.8.2-r2 to / ... >>> /etc/lircd.conf ... --- replaced obj /etc/lircd.conf tvscribe etc # md5sum lircd.conf 703258f3c7a35352c1512586e978a60b lircd.conf tvscribe etc # etc-update Scanning Configuration files... Exiting: Nothing left to do; exiting. :) tvscribe etc # tvscribe etc # ls -ld lircd.conf -rw-r--r-- 1 root root 4134 2008-04-24 21:51 lircd.conf tvscribe etc # LIRC_DEVICES=imon_pad emerge -v lirc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-misc/lirc-0.8.2-r2 USE="X -debug -doc -hardware-carrier -transmitter" LIRC_DEVICES="imon_pad* -accent -act200l -act220l -adaptec -all -alsa_usb -animax -asusdh -atilibusb -atiusb -audio -audio_alsa -avermedia -avermedia98 -avermedia_vdomate -bestbuy -bestbuy2 -breakoutbox -bte -bw6130 -caraca -chronos -cmdir -cph06x -creative -creative_infracd -devinput -digimatrix -dsp -dvico -ea65 -exaudio -flyvideo -gvbctv5pci -hauppauge -hauppauge_dvb -hercules_smarttv_stereo -igorplugusb -imon -imon_pad2keys* -imon_rsc -inputlirc -irdeo -irdeo_remote -irman -irreal -it87 -knc_one -kworld -leadtek_0007 -leadtek_0010 -leadtek_pvr2000 -livedrive_midi -livedrive_seq -logitech -macmini -mceusb -mceusb2 -mediafocusI -mouseremote -mouseremote_ps2 -mp3anywhere -nslu2 -packard_bell -parallel -pcmak -pcmak_usb -pctv -pixelview_bt878 -pixelview_pak -pixelview_pro -provideo -realmagic -remote_wonder_plus -remotemaster -sa1100 -sasem -sb0540 -serial -serial_igor_cesko -silitek -sir -slinke -streamzap -tekram -tekram_bt829 -tira -ttusbir -tuxbox -tvbox -udp -uirt2 -uirt2_raw -usb_uirt_raw -usbirboy -usbx -userspace -xboxusb" 0 kB ... >>> /etc/lircd.conf ... --- replaced obj /etc/lircd.conf ... tvscribe etc # ls -ld lircd.conf -rw-r--r-- 1 root root 4134 2008-04-24 21:59 lircd.conf tvscribe etc # md5sum lircd.conf 703258f3c7a35352c1512586e978a60b lircd.conf tvscribe etc # tvscribe etc # etc-update Scanning Configuration files... Exiting: Nothing left to do; exiting. :)
I found the trouble: pkg_preinst() { linux-mod_pkg_preinst [[ -f ${ROOT}/etc/lircd.conf ]] && cp "${ROOT}"/etc/lircd.conf "${D}"/etc/ } If you copy that file into the image, then merge the image, you end up with an /etc/lircd.conf and its "replacement" being exactly equal. I have no idea what this third line of code is intended to do, so let's ask media-tv@...
It's designed to leave your configured /etc/lircd.conf in place and not provide you with an etc-update. Since providing everyone with a "new" lircd.conf each time is undesirable. lircd.conf's are custom per remote and per receiver and there are utils provided to generate this file properly for each user. Some remotes have a default suggested files but you should still edit this file for your own uses.
This is rather an unfortunate decision. When one makes a bad install of lirc for the wrong device, you withhold an important file, when the install is corrected. For instance, it is impossible to come up with the correct file for imon_pad2key with irrecord (the suggested file for creating lirc.conf). One key press becomes two, and they cannot be set back to one without intimate knowledge of the hardware, or the original lirc.conf that comes with imon_pad2key, which was withheld.
Do not handle as invalid.
lirc-0.8.3: Now using normal config-protect from lircd.conf. The ebuild installs all config-files to /usr/share/lirc/remotes to choose one.