[26705] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: /svn/athena r25695 - trunk/debathena/debathena/locker-menu/debian

daemon@ATHENA.MIT.EDU (Jonathan Reed)
Sat Aug 4 19:52:52 2012

Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Jonathan Reed <jdreed@MIT.EDU>
In-Reply-To: <alpine.GSO.1.10.1208041939410.22690@multics.mit.edu>
Date: Sat, 4 Aug 2012 19:52:48 -0400
Cc: source-commits@MIT.EDU
Message-Id: <155D7538-2995-40FE-BECC-7B42B70337C6@MIT.EDU>
To: Benjamin Kaduk <kaduk@MIT.EDU>
Content-Transfer-Encoding: 8bit

>> 	if [ "$RET" = "true" ]; then
>> 	    echo "Using real icons for debathena-locker-menu..." >&2
>> 	    for i in $ICONS; do
>> -		if ! cp -f "$ICON_NONFREE_DIR/$i" "$SHAREDIR/$i"; then
>> -		    echo "Can't find real icon for $i, falling back to generic" >&2
>> +		if [ -f "$ICON_NONFREE_DIR/$i" ] && \
>> +		    ln -nsf "$ICON_NONFREE_DIR/$i" "$SHAREDIR/$i"; then
> 
> Isn't the logic on the check for ln's return value inverted?

Indeed it is.


>> +case "$1" in
>> +    purge|remove)
>> +	for i in $ICONS; do
>> +	    if [ -L "$SHAREDIR/$i" ] &&
>> +		! [ -f "$(readlink "$SHAREDIR/$i")" ]; then
>> +		rm -f "$SHAREDIR/$i"
>> +	    fi
>> +	done
> 
> I had in mind just unconditionally removing the link, but this is fine, too.

This felt more in compliance with policy, but I guess we can just scribble over it, since it's in /usr/share anyway.  Although, hrm, if I do this in the postrm, I would need to remove the directory too, right?  Otherwise it would still be lying around, since it would not have been removed in the cleanup as it was nonempty?

-Jon

home help back first fref pref prev next nref lref last post