pcp
[Top] [All Lists]

Re: [pcp] rpm migrate_tempdirs() problem on SuSE

To: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Subject: Re: [pcp] rpm migrate_tempdirs() problem on SuSE
From: Nathan Scott <nathans@xxxxxxxxxx>
Date: Wed, 27 Mar 2013 02:32:14 -0400 (EDT)
Cc: PCP Mailing List <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <51528C9C.5070403@xxxxxxxxxxxxxxxx>
Reply-to: Nathan Scott <nathans@xxxxxxxxxx>
Hi Ken,

----- Original Message -----
> The rpm spec files both contain
> 
>       mv -fun "$source" "$target"
> 
> on SuSE, mv(1) has no -n option (nor the equivalent --no-clobber) ...
> need some recoding here in old-style portable Unix command speak I
> think
> ... I'll leave that to someone who understands what this was supposed
> to
> be doing.
> 
> I'm guessing it needs to be
> 
>       [ -d "$target" ] || mv -fu "$source" "$target"
> 
> if "$target" is always a directory in this context
> 

Both source and target will be (should be!) files at that point in
the script - I think changing the -d to -f in your suggestion above
will do the trick.

ddiss will no doubt appreciate your attentions here - he's been unwell
recently btw, "descending mountain sickness" I believe.  The perils of
living with beautiful snow-covered mountains as your backdrop!

cheers.

--
Nathan

<Prev in Thread] Current Thread [Next in Thread>