[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: RPM and symlink in %files



On Tue, Mar 11, 2003 at 08:32:05PM -0600, Kelledin wrote:
> On Tuesday 11 March 2003 06:45 pm, M M wrote:
> > Im trying to pkg a directory that is actually a symlink so in
> > my spec file :
> >
> > %files
> > /rar_rpm     # which is symlink to  /rar
> >
> > The install appears to go okay but when i look at what RPM did
> > , I see it do two things : it created the target install
> > directory (I called focus)  and I also see see another focus
> > but I see a bunch of characters at the end of the name.
> > Ex -->  focus;3e6e803f   -> rar
> > The attribute shows it being a link however I can't cd to it.
> 
> The symlink name with the gibberish characters generally happens 
> when rpm tries to extract the symlink, but finds it can't 
> actually create the symlink--usually because there's already a 
> directory with the same absolute path.
> 

Um, no. The debugging message prints out the tempname with a
semi-colon and timestamp of the temporaray file that is then
renamed into place.

> If there's just a file in the way with the same path, rpm will 
> happily remove the file and extract the symlink in its place.  
> It refuses to do that to a directory, because the only way to 
> reliably remove a directory without corrupting the filesystem is 
> to rm -Rf it.  For obvious reasons, it's generally a Very Bad 
> Thing(tm) for any program to just do that automatically.  So rpm 
> just creates the symlink with a different name.
> 

Nod.

If "ls -al" shows the symlink with the semicolon/timestamp appended
left on the file system, then the rename (onto a preexisting directory
probably, you can't replace a directory with a symlink using rpm) failed.

Don't do that is the answer.

73 de Jeff

-- 
Jeff Johnson	ARS N3NPQ
jbj@redhat.com (jbj@jbj.org)
Chapel Hill, NC





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []