IIUC, setting replace-wscomments=yes in dispatch-conf.conf should automatically merge any config-protected file if the diff consists solely of whitespace or comment changes. If so, it doesn't seem to work. dirtyepic@tundra ~ $ cat /etc/commenttest # # test1 # dirtyepic@tundra ~ $ cat /etc/._cfg0000_commenttest # # test2 # dirtyepic@tundra ~ $ cat /etc/wstest foo bar baz dirtyepic@tundra ~ $ cat /etc/._cfg0000_wstest foo bar baz dirtyepic@tundra ~ $ sudo dispatch-conf --- /etc/commenttest 2011-07-18 22:39:23.803901562 -0600 +++ /etc/._cfg0000_commenttest 2011-07-18 22:39:16.961901115 -0600 @@ -1,3 +1,3 @@ # -# test1 +# test2 # >> (1 of 2) -- /etc/commenttest >> q quit, h help, n next, e edit-new, z zap-new, u use-new m merge, t toggle-merge, l look-merge: n --- /etc/wstest 2011-07-18 22:46:39.556901713 -0600 +++ /etc/._cfg0000_wstest 2011-07-18 22:47:06.910901962 -0600 @@ -1,3 +1,3 @@ - foo + foo bar - baz + baz >> (2 of 2) -- /etc/wstest >> q quit, h help, n next, e edit-new, z zap-new, u use-new m merge, t toggle-merge, l look-merge: q dirtyepic@tundra ~ $ grep wscomments /etc/dispatch-conf.conf replace-wscomments=yes (i also used lines of only whitespace for wstest with the same result)
Portage 2.2.0_alpha45 (default/linux/amd64/10.0/developer, gcc-4.6.1, glibc-2.13-r4, 2.6.39-gentoo-r2 x86_64) ================================================================= System uname: Linux-2.6.39-gentoo-r2-x86_64-Intel-R-_Core-TM-_i7_CPU_Q_820_@_1.73GHz-with-gentoo-2.0.3 Timestamp of tree: Tue, 19 Jul 2011 03:30:01 +0000 ccache version 3.1.5 [disabled] app-shells/bash: 4.2_p10 dev-java/java-config: 2.1.11-r3 dev-lang/python: 2.5.4-r4, 2.6.7, 2.7.2, 3.1.4, 3.2 dev-util/ccache: 3.1.5 dev-util/cmake: 2.8.5 dev-util/pkgconfig: 0.26 sys-apps/baselayout: 2.0.3 sys-apps/openrc: 0.8.3-r1 sys-apps/sandbox: 2.5 sys-devel/autoconf: 2.13, 2.68 sys-devel/automake: 1.9.6-r3, 1.11.1-r1 sys-devel/binutils: 2.21.1 sys-devel/gcc: 4.3.6, 4.4.5, 4.5.2, 4.6.1, 4.6.2_pre9999::toolchain sys-devel/gcc-config: 1.5-r1 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r1 sys-kernel/linux-headers: 2.6.38 (virtual/os-headers) sys-libs/glibc: 2.13-r4 Repositories: gentoo tundra gcc-porting toolchain dirtyepic Installed sets: @system ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -march=native -ggdb -pipe -ftree-vectorize" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -march=native -ggdb -pipe -ftree-vectorize" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--with-bdeps=y" FEATURES="assume-digests binpkg-logs distlocks ebuild-locks fixlafiles fixpackages multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign split-log splitdebug strict test test-fail-continue unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="" GENTOO_MIRRORS="http://distfiles.gentoo.org/" LANG="en_US.utf8" LC_ALL="en_US.utf8" LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed" LINGUAS="en en_CA en_US" MAKEOPTS="-j16 V=1" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/home/dirtyepic/overlay /home/dirtyepic/svn/gcc-porting /home/dirtyepic/svn/toolchain /home/dirtyepic/svn/dirtyepic" SYNC="rsync://rsync.gentoo.org/gentoo-portage"
The relevant code looks like this: DIFF_WSCOMMENTS = "diff -Nu '%s' '%s' | grep '^[+-][^+-]' | grep -v '^[-+]#' | grep -v '^[-+][:space:]*$'" It only works when the output of that command is empty.
Created attachment 288313 [details, diff] portage-2.2.0-wscomment.patch The output of that command is never empty. :)
(In reply to comment #3) > Created attachment 288313 [details, diff] > portage-2.2.0-wscomment.patch > > The output of that command is never empty. :) Thanks, this is in git now: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=fcba9794d9d377cafc60679fc800e3f5a5b506d7
This is fixed in 2.1.10.21 and 2.2.0_alpha61.