Sometimes you see package names with "CSW" in front, for example CSWbash. But you also see package names without that, for example just "bash". Is it only a convention, or is there a difference between the two?
asked: 2012-02-06 by: automaciej
Names starting with CSW are the System V package name. When mentioning a OpenCSW package without the CSW prefix, the convention is to refer to the package name as found in the descriptions of the package.
Names with the CSW prefix are used with the native pkgadd utility or the specific pkgutil utility which understands both names.
Names without the CSW prefix are understood only by pkgutil.
In an ideal world, we'd only have names without the CSW prefix. These are called catalog names, you'll find them used heavily throughout our website, they are the main package identifier in our catalog, and it's perfectly fine to only use these names when managing OpenCSW packages via
pkgutil is simply a layer on top of the native Solaris SVR4 package system, our packages also need to carry names that conform to the SVR4 package naming scheme. These names are called package names and you'll primarily see them if you need to work with the native Solaris package management tools like
pkgadd. They require a vendor prefix (CSW) and have historically been strongly length-limited (which explains rare occurrences of condensed package names).
So, coming back to your original question, "CSWbash" and "bash" refer to the same OpenCSW package. "CSWbash" is the actual, native SVR4 package name (or short, package name) whereas "bash" is a more convenient, shorter version, called the catalog name which is provided by the pkgutil abstraction layer.
pkgutil -a will show you both names alongside each other. You can use either name with
pkgutil, but when working with the native OS package management tools, these will only understand the native, vendor-prefixed SVR4 package names.
Also, as an unfortunate implementation detail: both name types underlie different sets of invalid characters. In particular, catalog names allow for _ (but not for -), whereas package names allow for - (but not for _). This is why you'll often see _ in a catalog name being translated to - in the package name.