From 2737e9a8b5ee396f4a8dbe35a52c80764ff384d8 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 23 May 2007 20:52:25 +0000 Subject: Add a 'ignore-previously-merged' config option which gives similar behavior to the --noconfmem emerge option. (trunk r6591:6592) svn path=/main/branches/2.1.2/; revision=6608 --- bin/dispatch-conf | 8 ++++++++ cnf/dispatch-conf.conf | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 348274802..779610996 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -141,6 +141,14 @@ class dispatch: else: newconf = conf['new'] + if newconf == mrgconf and \ + self.options.get('ignore-previously-merged') != 'yes' and \ + len(commands.getoutput(DIFF_CONTENTS % (conf['current'], mrgconf))) == 0: + # The current update is identical to the archived .dist + # version that has previously been merged. + os.unlink(mrgconf) + newconf = conf['new'] + mystatus, myoutput = commands.getstatusoutput( DIFF_CONTENTS % (conf ['current'], newconf)) same_file = 0 == len(myoutput) diff --git a/cnf/dispatch-conf.conf b/cnf/dispatch-conf.conf index b1ece73bb..d4caa9557 100644 --- a/cnf/dispatch-conf.conf +++ b/cnf/dispatch-conf.conf @@ -32,6 +32,11 @@ replace-wscomments=no # (yes or no) replace-unmodified=no +# Ignore a version that is identical to the previously merged version, +# even though it is different from the current user modified version +# (yes or no) +ignore-previously-merged=yes + # Per-session log file of changes made to configuration files #log-file=/var/log/dispatch-conf.log -- cgit v1.2.3-1-g7c22