Re: generalized mergemaster(8)
Am Freitag, 21. März 2003 20:27 schrieb Garance A Drosihn: /var/tmp/temproot/etc/rc.d/ and /etc/rc.d/ have 17 differing files. (I)nstall, (D)elete, or (R)ecursively examine? [R] Then I could hit 'I' and update all of /etc/rc.d at once. At times I've asked Doug about some kind of pattern-support in ~/.mergemasterrc, where the user could specify filename-patterns of files where they want the default action to be install instead of leave for later. There are pros and cons with that idea, but that's what I was thinking of for the directories you describe. Doug has suggested that people could maybe do things with the MM_PRE_COMPARE_SCRIPT, for special processing like this. I have a small patch for pattern-support in ~/.mergemasterrc and already sent my ideas to Doug, but he said It could/should be done with MM_PRE_COMPARE_SCRIPT to me. Regards -- /\/\ichael Ranner [EMAIL PROTECTED] - [EMAIL PROTECTED] - [EMAIL PROTECTED] -- JAWA Management Software GmbH - http://www.jawa.at/ Liebenauer Hauptstrasse 2oo - A-8041 Graz Tel +43 316 403274 21 - Fax +43 316 403274 10 -- Mariazell Online - http://www.mariazell.at/ -- -BEGIN GEEK CODE BLOCK- GIT/CS/AT dx(-) s+:(++:) a- C++ UBLVS$ P+$ L-(+)$ E--- W+++$ N+(++) o-- K- w--()$ O-(--) M@ V-(--) PS+++ PE(-) Y+ PGP(-) t+ 5+ X+++() R* tv++ b+(++) DI++ D-(--) G- e h--(*) r++ y? --END GEEK CODE BLOCK-- *** mergemaster.orig Wed Mar 5 16:35:54 2003 --- mergemaster Thu Mar 6 15:47:38 2003 *** *** 106,115 diff_loop () { HANDLE_COMPFILE=v while [ ${HANDLE_COMPFILE} = v -o ${HANDLE_COMPFILE} = V -o \ ${HANDLE_COMPFILE} = NOT V ]; do ! if [ -f ${DESTDIR}${COMPFILE#.} -a -f ${COMPFILE} ]; then if [ ${HANDLE_COMPFILE} = v -o ${HANDLE_COMPFILE} = V ]; then echo '' echo ' == ' --- 106,133 diff_loop () { HANDLE_COMPFILE=v + AUTO_INSTALL_FILE=n + + case ${AUTO_INSTALL} in + [Yy][Ee][Ss]) + set -f + for each in $AUTO_INSTALL_FILES + do + if expr $COMPFILE : .$each\$ /dev/null; then + AUTO_INSTALL_FILE=y + break + fi + done + set +f + ;; + *) + ;; + esac while [ ${HANDLE_COMPFILE} = v -o ${HANDLE_COMPFILE} = V -o \ ${HANDLE_COMPFILE} = NOT V ]; do ! if [ -f ${DESTDIR}${COMPFILE#.} -a -f ${COMPFILE} -a \ ! $AUTO_INSTALL_FILE = n ]; then if [ ${HANDLE_COMPFILE} = v -o ${HANDLE_COMPFILE} = V ]; then echo '' echo ' == ' *** *** 124,130 fi else echo '' ! echo *** There is no installed version of ${COMPFILE} echo '' case ${AUTO_INSTALL} in [Yy][Ee][Ss]) --- 142,152 fi else echo '' ! if [ $AUTO_INSTALL_FILE = y ]; then ! echo *** Automatic installation of ${COMPFILE} ! else ! echo *** There is no installed version of ${COMPFILE} ! fi echo '' case ${AUTO_INSTALL} in [Yy][Ee][Ss]) AUTO_INSTALL_FILES=/etc/periodic/.*
Re: generalized mergemaster(8)
On Thu, Mar 20, 2003 at 10:15:48PM -0600, Brandon D. Valentine wrote: I have encountered a situation in which it would be extremely handy to have a generalized version of mergemaster(8) which is less specific to the task of merging /etc. I need to recursively merge two directories of source files in which I wish to preserve some original files, install some replacement files outright, and only actually go to the trouble of sdiff(1)ing those files that from the preview udiff look like they are need of a merge. Have you considered emacs ediff-directories? It might be better suited than mergemaster for handling arbitrary directories. Peter To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: generalized mergemaster(8)
[ This email edited in vim. ] On Fri, Mar 21, 2003 at 07:21:08PM +1100, Peter Jeremy wrote: Have you considered emacs ediff-directories? It might be better suited than mergemaster for handling arbitrary directories. No, I have not considered it. ;-) As for mergemaster, it just about works for arbitrary directories. I've been playing around with it locally and there's not much effort needed to generalize it. The only challenge is maintaining POLA wrt people using mergemaster for its intended purpose, updating /etc post-installworld, without having the general functionality seem like a hack. I've got it working well enough for what I needed it for, but if there is interest I will cleanup the patches so they're POLA-safe and post them here. Brandon D. Valentine -- [EMAIL PROTECTED] http://www.geekpunk.net Pseudo-Random Googlism: valentine is the most precocious foal i have ever met To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: generalized mergemaster(8)
What we need is a way to mark some package files as customizeable files, or configuration files. The same way that some files are marked DOC, but a bit better: it would need to be carried to the installed package database. This is again re-inventing the wheel since it is exactly how Debian's apt-get system deals with configuration files. /etc files are part of a package that, when upgraded, are checked for modification and the user is offered the choice similar to mergemaster to install, merge, or just delete. We still need to write a generic tool to diff and merge. It's not so hard to write. It would basically be a stripped down version of mergemaster -s. I think such a tool would be really useful. A. On Thu Mar 20, 2003 at 10:15:48PM -0600, Brandon D. Valentine wrote: I have encountered a situation in which it would be extremely handy to have a generalized version of mergemaster(8) which is less specific to the task of merging /etc. I need to recursively merge two directories of source files in which I wish to preserve some original files, install some replacement files outright, and only actually go to the trouble of sdiff(1)ing those files that from the preview udiff look like they are need of a merge. Has anyone already done the work of generalizing mergemaster to this more general task? And if not, is there interest in this? If nobody has done it I'm probably about to. My inclination is to extend the existing mergemaster script to support this general functionality while maintaining support for the specific case of an /etc merge. mergemaster(8) is already fairly applicable to this task but it currently makes some assumptions about what your $Id$ looks like and that you will in fact be running make(1) somewhere to generate your temproot. Thoughts? Brandon D. Valentine -- [EMAIL PROTECTED] http://www.geekpunk.net Pseudo-Random Googlism: valentine is her husband To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message -- Advertisers, not governments, are the primary censors of media content in the United States today. - C. Edwin Baker http://www.ad-mad.co.uk/quotes/freespeech.htm pgp0.pgp Description: PGP signature
Re: generalized mergemaster(8)
At 10:15 AM -0800 3/21/03, Tim Kientzle wrote: On Thu Mar 20, 2003, Brandon D. Valentine wrote: I need to recursively merge two directories of source files in which I wish to preserve some original files, install some replacement files outright, and only actually go to the trouble of sdiff(1)ing those files that from the preview udiff look like they are need of a merge. One feature I've long wanted to see in mergemaster is the ability to install an entire directory at a pop, without having to manually inspect every single entry in that directory. A good example is /etc/rc.d/ . I would really like to be told /var/tmp/temproot/etc/rc.d/ and /etc/rc.d/ have 17 differing files. (I)nstall, (D)elete, or (R)ecursively examine? [R] Then I could hit 'I' and update all of /etc/rc.d at once. At times I've asked Doug about some kind of pattern-support in ~/.mergemasterrc, where the user could specify filename-patterns of files where they want the default action to be install instead of leave for later. There are pros and cons with that idea, but that's what I was thinking of for the directories you describe. Doug has suggested that people could maybe do things with the MM_PRE_COMPARE_SCRIPT, for special processing like this. -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
generalized mergemaster(8)
I have encountered a situation in which it would be extremely handy to have a generalized version of mergemaster(8) which is less specific to the task of merging /etc. I need to recursively merge two directories of source files in which I wish to preserve some original files, install some replacement files outright, and only actually go to the trouble of sdiff(1)ing those files that from the preview udiff look like they are need of a merge. Has anyone already done the work of generalizing mergemaster to this more general task? And if not, is there interest in this? If nobody has done it I'm probably about to. My inclination is to extend the existing mergemaster script to support this general functionality while maintaining support for the specific case of an /etc merge. mergemaster(8) is already fairly applicable to this task but it currently makes some assumptions about what your $Id$ looks like and that you will in fact be running make(1) somewhere to generate your temproot. Thoughts? Brandon D. Valentine -- [EMAIL PROTECTED] http://www.geekpunk.net Pseudo-Random Googlism: valentine is her husband To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message
Re: generalized mergemaster(8)
[ I meant to Cc dougb, not 'doubg' on this. Doh. ] On Thu, Mar 20, 2003 at 10:15:48PM -0600, Brandon D. Valentine wrote: I have encountered a situation in which it would be extremely handy to have a generalized version of mergemaster(8) which is less specific to the task of merging /etc. I need to recursively merge two directories of source files in which I wish to preserve some original files, install some replacement files outright, and only actually go to the trouble of sdiff(1)ing those files that from the preview udiff look like they are need of a merge. Has anyone already done the work of generalizing mergemaster to this more general task? And if not, is there interest in this? If nobody has done it I'm probably about to. My inclination is to extend the existing mergemaster script to support this general functionality while maintaining support for the specific case of an /etc merge. mergemaster(8) is already fairly applicable to this task but it currently makes some assumptions about what your $Id$ looks like and that you will in fact be running make(1) somewhere to generate your temproot. Thoughts? Brandon D. Valentine -- [EMAIL PROTECTED] http://www.geekpunk.net Pseudo-Random Googlism: valentine is her husband To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message Brandon D. Valentine -- [EMAIL PROTECTED] http://www.geekpunk.net Pseudo-Random Googlism: brandon is a rare football player with great hands and speed To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-hackers in the body of the message