Reinstalling or replacing a package with an application bundle fails with:
/sw/bin/dpkg: error processing /sw/fink/dists/local/main/binary-darwin-x86_64/PACKAGENAME.deb (--install):
unable to make backup link of `./sw/Applications/BUNDLENAME.app/Contents/PkgInfo' before installing new version: Operation not permitted
At the moment the solution is to remove the package before reinstalling or installing the replacing one.
There were statements in the discussion on irc that a new version of dpkg might fix it.
Update: version 0.38.5 of fink does not fix it :-(
I had a look into dpkg. The error message comes from line 620 in main/archives.c, but unfortunately, I do not understand the code.
Last edit: K.-M. Schindler 2015-05-16
Maybe we could work around this in the near term by using 'dpkg -r --force-depends <package>' followed by 'dpkg -i <package>' instead of just 'dpkg -i package'. This seems painful, though. </package></package>
The new version of dpkg mentioned on IRC is coupled with huge changes in the fink code, so it's a nontrivial change.
Until dpkg is fixed, a workaround is to delete the files or directories in a PreInstScript. Not all files and directories cause this problem, PkgInfo is one of the trouble makers. Maybe, this work around helps other maintainers of packages with the same problem.
I had another look at it today and it seems to be resolved. OS X 10.12.3, fink 0.41.1 and dpkg 1.10.21. If this is true, the issue can be closed.