pcp
[Top] [All Lists]

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

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: [pcp] rpm migrate_tempdirs() problem on SuSE
From: David Disseldorp <ddiss@xxxxxxx>
Date: Wed, 27 Mar 2013 12:00:37 +0100
Cc: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>, PCP Mailing List <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1955776917.25463227.1364365934207.JavaMail.root@xxxxxxxxxx>
References: <51528C9C.5070403@xxxxxxxxxxxxxxxx> <1955776917.25463227.1364365934207.JavaMail.root@xxxxxxxxxx>
Hi Nathan and Ken.

On Wed, 27 Mar 2013 02:32:14 -0400 (EDT)
Nathan Scott <nathans@xxxxxxxxxx> wrote:

> 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.

It looks like --no-clobber was added in 2009 with coreutils 7.1 - it's
present on SLE11SP2 but missing from SLE11SP1.

> > 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.

Sounds fine to me.

> 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!

I'm back to full strength now, was just a normal flu :)

Cheers, David

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