Skip to main content

developerWorks >  Rational  >  Forums  >  Rational Apex  >  developerWorks

.Rational_Location mangled by gnu tar    Point your RSS reader here for a feed of the latest messages in this thread


     

 
 

My developerWorks
 Welcome, Guest
Sign in or register
Permlink Replies: 7 - Pages: 1 - Last Post: Aug 27, 2009 9:40 PM Last Post By: GregBek Threads: [ Previous | Next ]
shochat

Posts: 2
Registered: Aug 18, 2008 07:22:26 PM
.Rational_Location mangled by gnu tar
Posted: Aug 26, 2009 08:54:16 PM
Click to report abuse...   Click to reply to this thread Reply
We are using Apex 3.2.0b on both Solaris 8 and HP-UX B.11.11 (or 11i). Part of our process for making deliveries to a customer site involves creating a tar file (from the root directory) of a complete set of subsystems and contained views. Each subsystem and each view contains a symbolic link called .Rational_Location, pointing to the full pathname of the directory containing it, i.e., to the subsystem or view, as the case may be. Sometimes, more or less randomly, when these are untar'd at the site, some of these .Rational_Location symlinks are invalid (they end up being empty files instead of symbolic links). This causes the views to be unusable until we perform the necessary surgery on the damaged links. My question is, has anyone else noticed this problem? We are using gnu tar version 1.14, and one guess we have is that we might not have the problem if we were to upgrade to version 1.22, currently the lastest version available from FSF. Any suggestions would be appreciated.
    • David
GregBek

Posts: 13
Registered: Jun 19, 2007 07:54:41 PM
Re: .Rational_Location mangled by gnu tar
Posted: Aug 26, 2009 09:29:20 PM   in response to: shochat in response to: shochat's post
Click to report abuse...   Click to reply to this thread Reply
Could be a path name length problem. Which is why gnu tar is better than normal tar.

Remember the proper way to fix the .Rational_Local symlinks is to use the "apex set_location -replace" command.

Greg
shochat

Posts: 2
Registered: Aug 18, 2008 07:22:26 PM
Re: .Rational_Location mangled by gnu tar
Posted: Aug 27, 2009 04:05:37 PM   in response to: GregBek in response to: GregBek's post
Click to report abuse...   Click to reply to this thread Reply
What does the apex set_location -replace do that is different from what you get by using rm followed by ln -s (with the full path to the view)?
I found your comment on long path names intriguing, but I have not been able to come up with a test case (with a symlink pointing to the containing directory at the end of a very long path) in which gnu tar does it wrong. As I said in my original post, it seems to be random.
    • David
marek5

Posts: 34
Registered: Mar 28, 2005 10:56:39 AM
Re: .Rational_Location mangled by gnu tar
Posted: Aug 27, 2009 05:06:00 PM   in response to: shochat in response to: shochat's post
Click to report abuse...   Click to reply to this thread Reply
David, the "apex set_location -replace" is equivalent to the following Unix commands:

% rm .Rational_Location
% ln -s `pwd` .Rational_Location

You may see it at the following technote:
http://www-01.ibm.com/support/docview.wss?rs=984&uid=swg21131639

Thnaks,
Marek
GregBek

Posts: 13
Registered: Jun 19, 2007 07:54:41 PM
Re: .Rational_Location mangled by gnu tar
Posted: Aug 27, 2009 09:38:09 PM   in response to: marek5 in response to: marek5's post
Click to report abuse...   Click to reply to this thread Reply
The difference b/n "ln -s `pwd` .Rational_Location" and "apex set_location -replace `pwd`" is the that the Apex command will traverse back up the directory hierachy looking for "parent" .Rational_Location links, ie: at the subsystem level if you are in a view. And it trusts a .Rational_Location more than the output of `pwd`.

Apex does like the canonical names to be consistent. The danger with `pwd` is that the command may return a pathname that includes a temporary mount point.

So you should always start at the top and set_location going down through the hierachy.

They key thing to remember, is that the .Rational_Location of a view must be the same name that is used when other views import it.

Greg
GregBek

Posts: 13
Registered: Jun 19, 2007 07:54:41 PM
Re: .Rational_Location mangled by gnu tar
Posted: Aug 27, 2009 09:38:45 PM   in response to: marek5 in response to: marek5's post
Click to report abuse...   Click to reply to this thread Reply
The difference b/n "ln -s `pwd` .Rational_Location" and "apex set_location -replace `pwd`" is the that the Apex command will traverse back up the directory hierarchy looking for "parent" .Rational_Location links, ie: at the subsystem level if you are in a view. And it trusts a .Rational_Location more than the output of `pwd`.

Apex does like the canonical names to be consistent. The danger with `pwd` is that the command may return a pathname that includes a temporary mount point.

So you should always start at the top and set_location going down through the hierarchy.

They key thing to remember, is that the .Rational_Location of a view must be the same name that is used when other views import it.

Greg
GregBek

Posts: 13
Registered: Jun 19, 2007 07:54:41 PM
Re: .Rational_Location mangled by gnu tar
Posted: Aug 27, 2009 09:39:20 PM   in response to: marek5 in response to: marek5's post
Click to report abuse...   Click to reply to this thread Reply
The difference b/n "ln -s `pwd` .Rational_Location" and "apex set_location -replace `pwd`" is the that the Apex command will traverse back up the directory hierarchy looking for "parent" .Rational_Location links, ie: at the subsystem level if you are in a view. And it trusts a .Rational_Location more than the output of pwd.

Apex does like the canonical names to be consistent. The danger with `pwd` is that the command may return a pathname that includes a temporary mount point.

So you should always start at the top and set_location going down through the hierarchy.

They key thing to remember, is that the .Rational_Location of a view must be the same name that is used when other views import it.

Greg
GregBek

Posts: 13
Registered: Jun 19, 2007 07:54:41 PM
Re: .Rational_Location mangled by gnu tar
Posted: Aug 27, 2009 09:40:14 PM   in response to: marek5 in response to: marek5's post
Click to report abuse...   Click to reply to this thread Reply
The difference b/n "ln -s pwd .Rational_Location" and "apex set_location -replace pwd" is the that the Apex command will traverse back up the directory hierarchy looking for "parent" .Rational_Location links, eg at the subsystem level if you are in a view. And it trusts a .Rational_Location more than the output of pwd.

Apex does like the canonical names to be consistent. The danger with `pwd` is that the command may return a pathname that includes a temporary mount point.

So you should always start at the top and set_location going down through the hierarchy.

They key thing to remember, is that the .Rational_Location of a view must be the same name that is used when other views import it.

Greg
 Tags
Help

Use the search field to find all types of content in My developerWorks with that tag.

Use the slider bar to see more or fewer tags.

Popular tags shows the top tags for this particular type of content or application that you're viewing.

My tags shows your tags for this particular type of content or application that you're viewing.

 

MoreLess 


Point your RSS reader here for a feed of the latest messages in all forums