> On May 24, 2015, at 12:52 PM, Alexander Hansen <alexanderk.han...@gmail.com> > wrote: > >> >> On May 24, 2015, at 07:01, William G. Scott <wgsc...@ucsc.edu> wrote: >> >> Hi folks: >> >> I’ve been using fink for well over 10 years now, but am having problems for >> the first time that I just can’t seem to get around. This has happened >> several times now, typically after a power failure due to the crumbling >> neglected University of California, albeit Santa Cruz infrastructure. The >> only way I have found to recover from this is to reinstall fink from >> scratch. There has to be a better way... >> >> I'm getting errors of the form: >> >> % sudo apt-get install fink >> Reading Package Lists... Done >> Building Dependency Tree... Done >> 1 packages upgraded, 0 newly installed, 0 to remove and 36 not upgraded. >> 1 packages not fully installed or removed. >> Need to get 0B/993kB of archives. After unpacking 0B will be used. >> (Reading database ... 255459 files and directories currently installed.) >> Preparing to replace fink 0.38.4-91 (using >> .../fink_0.38.5-91_darwin-x86%5f64.deb) ... >> dpkg: warning - old pre-removal script returned error exit status 1 >> dpkg - trying script from the new package instead ... >> /sw/bin/dpkg: error processing >> /sw/var/cache/apt/archives/fink_0.38.5-91_darwin-x86%5f64.deb (--unpack): >> subprocess new pre-removal script returned error exit status 1 >> dpkg: error while cleaning up: >> subprocess post-installation script returned error exit status 1 >> Errors were encountered while processing: >> /sw/var/cache/apt/archives/fink_0.38.5-91_darwin-x86%5f64.deb >> E: Sub-process /sw/bin/dpkg returned an error code (1) >> >> I tried everything I could think of with "apt-get" and with "fink rebuild" >> to no avail. >> >> Initially, the file /sw/var/lib/dpkg/status had these lines: >> >> 9125 Package: fink-buildlock-fink-0.38.4-91 >> 9126 Status: deinstall reinstreq half-installed >> 9127 Section: unknown >> 9128 Architecture: darwin-x86_64 >> 9129 Version: 2015.05.24-06.33.53 >> >> I changed the Status line to this: purge ok not-installed as suggested in >> the wiki >> >> This change persists, but so does the error. I also tried >> sudo cp /sw/var/lib/dpkg/status-old /sw/var/lib/dpkg/status >> as suggested in FAQ 6.13 but to no avail. >> >> % fink --version >> Package manager version: 0.38.4 >> >> % sw_vers >> ProductName: Mac OS X >> ProductVersion: 10.10.4 >> BuildVersion: 14E17e >> > > We don’t support prerelease OS X. :-) > >> Latest xcode, command-line tools, X11. >> >> Any suggestions? >> >> Bill >> > > The status file won’t buy you anything here. The problem is that the > PreRmScript is throwing an error. > > You might try running the script manually as root to see what’s going on. > The currently installed one lives in /sw/var/lib/dpkg/info/fink.prerm . > > On my system it looks like > > #!/bin/sh > # prerm script for package fink, auto-created by fink > > set -e > > # clean up package indexes > [ \! -d /sw/var/lib/fink/finkinfodb ] || touch > /sw/var/lib/fink/finkinfodb/invalidate > rm -f /sw/var/lib/fink/index.db > rm -f /sw/var/lib/fink/index.db.lock > rm -f /sw/var/lib/fink/infolist > rm -f /sw/var/lib/fink/shlibs.db > rm -f /sw/var/lib/fink/shlibs.db.lock > > exit 0 > > ### > > If your /bin/sh isn’t bash that might account for the problem. > -- > Alexander Hansen, Ph.D. > Fink User Liaison
% /bin/sh --version GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin14) Copyright (C) 2007 Free Software Foundation, Inc. However, when I edited /sw/var/lib/dpkg/info/fink.prerm and manually replaced /bin/sh with /bin/bash, then it worked. (Sorry for the delayed reply, it took me awhile to encounter the error again.) Also, thanks very much. Bill ------------------------------------------------------------------------------ _______________________________________________ Fink-users mailing list Fink-users@lists.sourceforge.net List archive: http://news.gmane.org/gmane.os.macosx.fink.user Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-users