delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2010/03/28/09:31:35

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,EXECUTABLE_URI
X-Spam-Check-By: sourceware.org
Message-ID: <4BAF6835.2000203@gmx.de>
Date: Sun, 28 Mar 2010 16:31:17 +0200
From: Matthias Andree <matthias DOT andree AT gmx DOT de>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: "svn --version" halts in 1.7.2-2
References: <e22ab97b1003252340j350a606ah41b5663802ed098c AT mail DOT gmail DOT com> <20100326093204 DOT GS7718 AT calimero DOT vinschen DOT de> <4BACF903 DOT 70304 AT acm DOT org> <20100326210701 DOT GY7718 AT calimero DOT vinschen DOT de> <4BAD401C DOT 8000504 AT acm DOT org> <4BAD5803 DOT 3020509 AT cs DOT umass DOT edu> <4BAD69A4 DOT 6090605 AT acm DOT org> <4BAD6A59 DOT 5060604 AT cs DOT umass DOT edu>
In-Reply-To: <4BAD6A59.5060604@cs.umass.edu>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Am 27.03.2010 03:15, schrieb Eliot Moss:
> On 3/26/2010 10:12 PM, David Rothenberger wrote:
>> On 3/26/2010 5:57 PM, Eliot Moss wrote:
>>> My Windows 7 system hands on svn --version also, but
>>> produces no messages to /var/log/messages. I tried
>>> uninstalling libsasl2-devel but doing so had no effect.
>>>
>>> Regard -- Eliot Moss
>>
>> What happens if you rename /usr/lib/sasl2 to something else?
>>
>> % mv /usr/lib/sasl2 /usr/lib/sasl2.disabled
>> % svn --version
> 
> A great thought, David!  Works perfectly!
> 
> Not sure what else might depend on it, but it's an ok
> work-around for the moment, and possibly a good clue to
> the maintainers ...

Probably the record that some /usr/lib/sasl2 stuff got installed was lost
somehow.  A couple of days ago, I found my computer with an inconsistent setup
database (which showed a lot fewer files/packages than were actually installed),
so I got very few of the offered package updates displayed.  I investigated and
came up with a script to fix this (consider this version 0.0.1 and under GNU GPL
v3) state (see below).

I'd also appreciate if setup.exe recorded file hashes so I can see which files
have been altered since initial installation with a (to be written) cygcheck. I
know, volunteer efforts and spare time, but I'd still mention it.

Here's the script.  Crude, works for me in a particular situation, so no
warranties whatsoever (you're free not to use it):

---------------------------------------------------------------
#! /bin/bash
# repair-cygwin.sh - (C) 2010 Matthias Andree

set -eu

if [ $'\x20' != ' ' ] ; then
        echo "Your shell does not understand \$'...' - trying bash"
        exec /bin/bash --norc --noprofile "$0"
fi

unset LC_COLLATE
unset LC_CTYPE
unset LANG
export LC_ALL=C
export PATH=/bin:/usr/bin

echo "==> Checking for broken packages:"

# obtain list of broken packages:
cygcheck -c | tail -n +3 | egrep -v $'OK\r?$' | awk '{ print $1}' >/tmp/need
echo "Broken packages: $(cat /tmp/need | tr '
' ','|sed 's/,$//')"

echo "==> Checking for missing packages:"

# obtain list of packages that got installed
(cd /etc/setup/ && ls *.lst.gz ) | sed 's/.lst.gz$//' | sort >/tmp/pkgs

# obtain list of packages that Cygwin believes are installed
cygcheck -c -d | tail -n +3 | awk '{ print $1}' | sort >/tmp/have

# obtain list of missing packages:
miss="$(comm -3 /tmp/pkgs /tmp/have)"
printf "%s" "$miss" >>/tmp/need

echo "Missing packages: $(echo "$miss" | tr '
' ',' | sed 's/,$//')"

echo "==> Done."

if [ -z "$(cat /tmp/need)" ] ; then
        echo "No packages found missing or broken."
        exit 0
fi

# drop packages from installed.db so that they get reinstalled:
for i in $(sort -u /tmp/need) ; do
        grep -v "^$i " /etc/setup/installed.db >/etc/setup/i && mv /etc/setup/i
/etc/setup/installed.db
done

# now go
ok=0
for i in $(id -G) ; do
        if [ "_$i" = _0 ] ; then ok=1 ; fi
done
cmd="./setup.exe -n -q -P $(sort -u /tmp/need | tr '
' ',' | sed 's/,$//')"

if [ $ok = 1 ] ; then
        echo "==> Downloading setup.exe"
        wget -nv -N http://cygwin.com/setup.exe http://cygwin.com/setup.exe.sig
        echo "==> Verifying setup.exe signature"
        gpg --verify setup.exe.sig setup.exe
        echo "==> Running setup.exe"
        chmod +x setup.exe
        $cmd
else
        echo "Now run the following command from an Administrator shell,"
        echo "after you've downloaded and verified Cygwin's setup.exe:"
        echo "$cmd"
fi
---------------------------------------------------------------

-- 
Matthias Andree

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019