Problems while creating a package with build variables

Hi!

I can successfully create Solaris packages using build variables as shown in the following prototype file.

Please note that I may use the build variable$VersionTAO within the path.

!VersionTAO=1.4.5

f none usr/tao/lib/libTAO.so.1.4.5=/usr/tao/$VersionTAO/lib/libTAO.so.1.4.5

But when I replace the version numbers1.4.5 in line 3 by$VersionTAO...

!VersionTAO=1.4.5

f none usr/tao/lib/libTAO.so.$VersionTAO=/usr/tao/$VersionTAO/lib/libTAO.so.$VersionTAO

...the packaging will fail with the following error.

# pkgmk -o -d /tmp/mypackage -f ./prototype/myprototype

## Building pkgmap frompackage prototype file.

ERROR in myprototype:

no objectfor <usr/tao/lib/libTAO.so.$VersionTAO> found in local path

Can anyone give me I hint?

I would like to have only one occurence of the version number.

Thanks, Thomas

[1002 byte] By [thomas.pa] at [2007-11-27 9:44:41]
# 1

This is untested on my part, but on page 24 of the "Application Packaging Developers Guide," (http://docs.sun.com/app/docs/doc/817-0406?a=load) a build variable is defined as beginning with a lowercase letter. Install variables, on the other hand, start with uppercase letters.

Could it be a simple as changing the case of "VersionTAO" to "versionTAO?"

JerryBussera at 2007-7-12 23:51:53 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 2
so does that mean that you include the lowercase variable in your pkginfo file, instead of trying to declare it in the pkgmap file? - jeff
jeffrey.sa at 2007-7-12 23:51:53 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 3
No, you should still be able to define it in the prototype file just as you have done.
JerryBussera at 2007-7-12 23:51:53 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...
# 4

Thanks for this hint, but it didn't work either. Here are my tests with the lowercase variable.

1.) Using the lowercase variable only as a path element.

!versionTAO=1.4.5

f none usr/tao/lib/libTAO.so.1.4.5=/usr/tao/$versionTAO/lib/libTAO.so.1.4.5

=> It works as before.

2.) Using the lowercase variable as a path element and on the right-hand side of the equal sign.

!versionTAO=1.4.5

f none usr/tao/lib/libTAO.so.1.4.5=/usr/tao/$versionTAO/lib/libTAO.so.$versionTAO

=> pkgmk fails.

# pkgmk -o -d /tmp/mypackage -f ./prototype/myprototype

## Building pkgmap from package prototype file.

ERROR in myprototype:

no object for <usr/acetao/lib/libTAO.so.1.4.5> found in local path

3.) Using the lowercase variable as a path element and on the left-hand side of the equal sign.

!versionTAO=1.4.5

f none usr/tao/lib/libTAO.so.$versionTAO=/usr/tao/$versionTAO/lib/libTAO.so.1.4.5

=> pkgmk does not fail but does not resolve the variable. The package contains the file reloc/usr/acetao/lib/libTAO.so.$versionTAO.

These tests show exactly the same behaviour as seen with an uppercase-variable.

thomas.pa at 2007-7-12 23:51:53 > top of Java-index,Solaris Operating System,Solaris Essentials - General Technical Questions...