I think it would help a lot if you would scan through the
documentation on ups/upd, available under
http://www.fnal.gov/docs/products/ups/
but I'll try to summarize the most important highlights here.
UPS keeps track of the products installed on your system, so that
you can use "setup product" to do whatever needs to be done in order
to use each product. It's a uniform user interface to all products.
UPS has a product database that keeps track of things like:
- which versions are installed?
- which flavors are installed?
- where does each version/flavor combo (called an
"instance") live?
- if somebody does "setup xxx", which version of xxx should
be setup? If they add "-o" (old version), which one should
be setup? What about "-t" (test version)? etc.
- if somebody does "setup xxx", what other products should be
setup so that xxx will function properly?
- what else needs to be done when xxx is setup?
- what needs to be done when xxx is unsetup?
UPS uses a set of three files (version files, chain files, and table
files) to keep track of this information. In order for UPS to know
anything about a product, you need to DECLARE the product to ups,
telling ups things like:
- what is the name of the table file
- where does the product actually live
- what version is it? What flavor?
UPS also has one configuration file (dbconfig) for each UPS
database, which includes data common to all products (i.e., where to
put man pages, where the setups scripts live, etc.)
UPD is a wrapper around three things: ftp, [un]tar, and ups. UPD
will look at fnkits to determine which instance to install (best
match for the things you've entered on the UPD command line). It
will then
- ftp the tarfile to your system,
- unwind the tarfile according to the updconfig file on
your system
- issue the "ups declare" command appropriate for your
system
UPD is written in perl, so it requires that you have perl installed.
If you remove the perl product tree, UPD can't function. UPD also
requires ups.
UPD will NOT overwrite existing files, so when you tried to use UPD
to install cern over an existing cern tree, upd stopped because the
files already existed. You only needed to "declare" the cern
product to your database, using something like
ups declare -r /path/to/cern/top/level -m cern.table.file.name \
-flavor FLAVOR \
cern vN_M
to tell ups about this instance of CERN.
SO -- where to go from here? It sounds like you don't have a
"current" instance of ups itself declared. I think you should be
able to fix things by:
- find where your UPS_DIR is. This is the top-level of the
UPS product itself; it should contain directories like
bin doc inc lib man src test ups
Make note of which version of ups it is, and what flavor
system you're on
- cd to that directory and
UPS_DIR=`pwd`; export UPS_DIR (ksh syntax)
- find where your UPS database is (something like
/fnal/ups/db). cd to that directory and
PRODUCTS=`pwd`; export PRODUCTS
- cd $PRODUCTS/.upsfiles
Then scan the file dbconfig and make sure it looks
ok. Make note of the SETUPS_DIR.
- cd SETUPS_DIR (where you fill in the appropriate SETUPS_DIR
from your dbconfig file), then look at the file upsdb_list
and make sure it includes your ups database path
- then issue the command
$UPS_DIR/bin/ups declare -c \
-r $UPS_DIR \
-m ups.table \
-f FLAVOR \
ups vN_M
After that, you should be able to source the setups.[c]sh scripts
without any problem.
Please call me if this is unclear or doesn't fix the problem.
- -- lauri, x2214
On Friday 5 February 1999,
our friend Constance Sieh spaketh thusly:
> Erik,
>
> We are not really the ups/upd experts. I have forwarded your mail to
> them.
>
> -connie
> >
> >
> > Dan, Connie -
> >
> > I think I've got another problem with my Linux system at lab
> > 3. Its not a killer, but I'm spending way too much time on
> > these difficulties. Let me give you the rundown and see if you
> > can suggest something:
> >
> > 1. I'm having a hell of a time understanding upd. I'm trying
> > to install cern, for instance, in the official Fermilab manner.
> > I already had the cern directory in place but it wasn't
> > 'declared', whatever that means. So I had to delete the entire
> > cern directory structure already in place and did a upd install (it
> > won't let you install if it is already there). That seemed to
> > work.
> >
> > 2. Given this promising avenue, I started deleting some of the
> > other products that I had already placed there, including
> > (accidentally), the perl directory. Once I deleted that directory,
> > then the various upd scripts wouldn't work.
> >
> > 3. Then I got the upd/ups/perl kit off of the web and followed the
> > instructions there. That put the perl directory back into place
> > so I could do upd scripts again. I even reinstalled cern in the
> > official Fermilab upd manner. The libraries showed up and
> > everything.
> >
> > 4. However, now the command 'setup' doesn't work. When I try to
> > run /usr/local/etc/setups.sh, it give me the following error:
> > ****
> > **** Unable to initialize UPSII environment
> > ****
> > I assume when I reinstalled the ups/upd/perl architecture, something
> > went wrong, so I blame myself.
> >
> > At this point I have given up on trying to do anything with the ups/upd
> > system. It is very confusing to me (maybe I'm just dense) and its much
> > easier to just download the libraries off the web and use my own
> > structure, especially considering this is a dedicated purpose machine.
> > But I am willing to try something if you can suggest it.
> >
> > Thanks for any advice you can give.
> >
> > Erik
> >
> >
> > ------------------------------------------------------------
> > Erik Ramberg Email: [email protected]
> > Fermilab MS 231 Phone: +1-630-840-5731
> > P.O. Box 500 Fax: +1-630-840-6311
> > Batavia, IL 60510 Home: +1-630-406-0412
> >
> >
>
------- End of Forwarded Message