Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 8416 - Slightly more inteligent diff of config files.
Summary: Slightly more inteligent diff of config files.
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: Low enhancement (vote)
Assignee: Nicholas Jones (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 7737
  Show dependency tree
 
Reported: 2002-09-26 10:40 UTC by Jason Price
Modified: 2011-10-30 22:36 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Price 2002-09-26 10:40:39 UTC
When running through the ._cfg0000 files that portage dumps around, I find that
many of them differ just by the header line managed by source control.

If portage could note that "oh, this file has only changed the header line" and
procede to place the new config on top of the old.  Something like:

head -1 $current_cfg > tmpfile1
head -1 $new_cfg > tmpfile2
echo "<" > tmpfile3
cat tmpfile1 >> tmpfile3
echo ">" >> tmpfile3
cat tmpfile2 >> tmpfile3
diff $current_cfg $new_cfg > tmpfile4
if [ "`diff tmpfile3 tmpfile4`" == "" ]; then
   mv $new_cfg $current_cfg
else
   mv $new_cfg `basename $current_cfg`/._cfg0000_${current_cfg}
fi

Note: logic is just typed in, not tested, at all.
Note2: this might be a duplicate.  I couldn't find one though.

Jason
Comment 1 Martin Holzer (RETIRED) gentoo-dev 2003-04-03 16:38:58 UTC
/etc/etc-update.conf

# Whether trivial/comment changes should be automerged
eu_automerge="yes"


quite good enough ?
Comment 2 Caleb Tennis (RETIRED) gentoo-dev 2003-07-07 19:54:57 UTC
Inactive, but the problem was solved.