portage_workdir_hacktool: add some --force options to resolve out-of-sync situations
portage_workdir_hacktool: bugsfixes & workarounds

o fix some bugs where we used "exit" when we meant "return" (very annoying!!)
o avoid using fancy subshell syntax (cygwin 1.7.13 has a bug about this?)
sys-apps/portage: cygdll_protect enhancements

o make ebuild acquire the master lock for most operations.  Has the
  "side effect" (the main effect we are going for, really) of causing
  cygdll_protect heuristics to consider ebuild to be a portage process
  and therefore to protect .dll's in use by active ebuilds.

o bugfix: import various methods needed to execute various writemsg
  statements in cygdll_protect

o defer cygdll_protect heuristic protections analysis until the first
  call to is_cygdll_protected -- prior to this change, heuristic analysis
  was performed in every process useing the protection manager class,
  which included, i.e.: portageq cygdll_protect_list -- a pointless
  waste of cpu cycles.

o add code to deal with canonicalization of filenames.  This addresses
  a couple of issues: first, sometimes pldd was returning filenames like
  /c/cygwin/$EPREFIX/usr/foo on my system, presumably because I mount
  C:\ as /c in /etc/fstab.  That's pretty retarded however, since
  /c/cygwin is mounted as "/".  This would doubly fail to protect /usr/foo
  because firstly, we only protect files matching "$EPREFIX/.*" and
  secondly, because presumably is_cygdll_protected will be called on
  with the argument "$EPREFIX/usr/foo" which != "/c/cygwin/$EPREFIX/usr/foo".
  The other issue dealt with as a canonicalization issue is that of
  .exe files and their non-.exe equivalents (this is a POSIX API-level
  kludge that cygwin implements to help userland not be confused by
  .exe appearing at the end of filenames).  Minor changes were also needed
  to ensure that the canonicalization feature didn't break the cygdll
  protections database handling; hopefully I got that all correct, although
  I didn't test things very carefully.

o Remove commentcruft

Note that we still have not dealt with the general database issue that exists
regarding .exe filepaths and their ghostly non-.exe-suffixed counterparts.
This change only deals with the issue insofar as it may interfere with
is_cygdll_protected testing (a patch for dealing with this in the database is
in the works).
some new TODOS
backport upstream fixed bug
gendiffs: Eliminate timestamp-sensitivity

The good news is that this makes gendiffs generate much less fussy
output by eliminating all the time-stamp shit in the embedded diff
headers.

The bad news is it makes gendiffs even slower :(
update portage_diffs to the new gendiffs format
sys-apps/portage: cygdll-protect enhancements

This begins the important work of handling unmerge protection as well as
merge protection.  Actually all the hard work is already done.

o during unmerge, decide whether regular file objects are cygdll-protected
  and instead of unlinking them, store a placeholder in the cygdll
  protection database file.  No _cygdll_protect_file is created -- just the
  entry that would have corresponded to an empty file (kind of analogous to
  diff -N.  This makes the hashing value of the empty file into a magic number
o avoid a bug in the canonicalization code introduced in the last patch that
  would cause OSExceptions
o Only match prefixes if the prefix really exists (ended up being simpler to code)
o during the pretty-print phase of cygdll-protect at the end of an emerge, only
  show a given file once (formerly it would dump twice if it was in the database
  and settings['CYGDLL_PROTECT']
o Misc pretty-print touch-ups (looks way better imo)
o pretty-print for magic-number database entries even though no file exists

This mostly just leaves cygdll-update, and then it's done!