Relevance Help to compare version

(imported topic written by SystemAdmin)

Q: version of pkginfo “TIVsmCba” of pkgdb as version

A: Version 5 Release 5 Level 0.6

T: 646

Q: version of pkginfo “TIVsmCba” of pkgdb as version < "

A: False

T: 708

On a Sun system, here’s all values from a pkginfo output

root # pkginfo -l TIVsmCba

PKGINST: TIVsmCba

NAME: IBM Tivoli Storage Manager Solaris 9/10 Backup Archive Client

CATEGORY: application

ARCH: sparc

VERSION: Version 5 Release 5 Level 0.6

BASEDIR: /opt/tivoli/tsm/client

VENDOR: IBM Tivoli Systems Inc.

PSTAMP: 2008.092.08:26:37

INSTDATE: May 29 2008 09:41

STATUS: completely installed

FILES: 31 installed pathnames

4 directories

10 executables

1 setuid/setgid executables

70095 blocks used (approx)

(imported comment written by NoahSalzman)

Are you looking for something like this?

Q: (((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of “Version 5 Release 6 Level 0.7”) as version

A: 5.6.0.7

Q: (((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of “Version 5 Release 6 Level 0.7”) as version > “5.6.0.6” as version

A: True

Q: (((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of “Version 5 Release 6 Level 0.7”) as version > “5.6.0.7” as version

A: False

Q: (((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of “Version 5 Release 6 Level 0.7”) as version > “5.5.0.7” as version

A: True

(imported comment written by SystemAdmin)

Yes, I need to check that the version is less than for example 5.5.0.7 so I can build an action script to upgrade from 5.5.0.6 to 5.5.0.7 of the TIVsmCba software on a Solaris system

So how would the relevance be coded to add the version of pkginfo of “TIVsmCba” of pkgdb

(imported comment written by SystemAdmin)

I tryed this, but fails?

Q: (((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of version of pkginfo “TIVsmCba” of pkgdb as version < " as version

E: The operator “trimmed string” is not defined.

Q:

(imported comment written by NoahSalzman)

Pull out the part in bold:

(((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of

“Version 5 Release 6 Level 0.7”

) as version > “5.6.0.6” as version

Put parens around it and tell your self “this needs to be a text string”:

(((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of

( THIS NEEDS TO BE A TEXT STRING )

) as version > “5.6.0.6” as version

Not sure if the “as string” is needed but better safe than sorry:

(((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of

( (version of pkginfo “TIVsmCba” of pkgdb) as string)

) as version > “5.6.0.6” as version

(imported comment written by SystemAdmin)

Q: (((following text of first "Version " of preceding text of first “Release” of it) as trimmed string & “.” & (following text of first "Release " of preceding text of first “Level” of it) as trimmed string & “.” & (following text of first "Level " of it) as trimmed string) of ( (version of pkginfo “TIVsmCba” of pkgdb) ) as string ) as version > “5.6.0.6” as version

E: The operator “rimmed string” is not defined.

Q:

Can’t figure out why “The operator “rimmed string” is not defined” is in error? I don’t see any typo??

(imported comment written by SystemAdmin)

Q: ((following text of first “Version " of preceding text of first " Release” of it) & “.” & (following text of first "Release " of preceding text of first “Level” of it)) of (version of pkginfo “TIVsmCba” of pkgdb) as trimmed string

A: 5.5

T: 944

works, but just can’t get the last part to work

(imported comment written by SystemAdmin)

Q: (version of pkginfo “TIVsmCba” of pkgdb)

A: Version 5 Release 5 Level 0.6

T: 656

Q: ((following text of first “Version " of preceding text of first " Release” of it) & “.” & (following text of first "Release " of preceding text of first “Level” of it)) of (version of pkginfo “TIVsmCba” of pkgdb)

A: 5.5

T: 928

Q: (following text of first "Level " of it) of (version of pkginfo “TIVsmCba” of pkgdb)

A: 0.6

T: 702

Now putting it all together fails???

Q: ((following text of first “Version " of preceding text of first " Release” of it) & “.” & (following text of first "Release " of preceding text of first “Level” of it) & “.” & (following text of first "Level " of it)) of (version of pkginfo “TIVsmCba” of pkgdb)

E: The operator “gdb” is not defined.

(imported comment written by SystemAdmin)

UPDATE: This result is definitly a bug in the Solaris “qna” debugger

Running from the Solaris “qna” debugger will generate the following errors, BUT does work fine when using the second one as an analysis in the console.

Q: ((following text of first “Version " of preceding text of first " Release” of it as trimmed string) & “.” & (following text of first "Release " of preceding text of first “Level” of it as trimmed string) & “.” & (following text of first "Level " of it as trimmed string)) of (“Version 5 Release 5 Level 0.6” as trimmed string)

E: The operator “immed string” is not defined.

Q: ((following text of first “Version " of preceding text of first " Release” of it as trimmed string) & “.” & (following text of first "Release " of preceding text of first “Level” of it as trimmed string) & “.” & (following text of first "Level " of it as trimmed string)) of (version of pkginfo “TIVsmCba” of pkgdb as trimmed string)

E: The operator “immed string” is not defined.

(imported comment written by SystemAdmin)

Please try running the query as a file and pipe the result back into qna and you will get the answer expected.

Put the text (minus the “Q:”) into foo.qna and run “qna < foo.qna”

There is a limit of characters on command line inputs in Solaris by default and its 255 characters which the string is exceeding.