Richard L. Hamilton napsal(a):
> [...]
>> I'm hoping that whatever packaging mechanism will be
>> used in indiana
>> will support this.
>
> I'm hoping that unless there's a really compelling case to the contrary,
> whatever minimal and compatible extensions to the SVR4 pkg format
> are needed for desired functionality will be added, rather than switching
> to some other format. It's not as if any format is a magic bullet, IMO; more
> the tools that work with it.
>
>
> This message posted from opensolaris.org
> _______________________________________________
> desktop-discuss mailing list
> desktop-discuss at opensolaris.org
>
I would choice a bit different way ...
Because version format isn't united or standatized and nearly every
project use a bit different format. I suggest using version string and
version pattern. This is comment explaining it. (it's from few scripts
which I made for 2 reasons to make pkgtool more friendly and learn ruby)
# Class for storing info about version of package
# version is stored as string, but it has also pattern so it can be
# parsed and treaten as numerical version
#
# Format of version pattern:
# Every non-controling string is omitted as human cookies
# All controling string begin with '%' and they are parsed from left to
right
# %d ... Is integer string with normal order <
# %s ... Is string with normal lexicographical order <
# %% ... Is simple '%' character (so it will be exluded
#
# Here are few examples:
# version string A: "dev-1.3.5"
# version pattern: "dev-%d.%d.%d
# now you can compare this version with string or other instance of
version (which is much faster)
# A < "dev-1.3.6" ==> true
# A < "dev-1.4" ==> true
# A < "dev-1" ==> false
# but: A < "dev-1.3.5.1" ==> false
# that's because the string is converted to class Vesion with same pattern
# and the rest after pattern is excluded
# the right result gives:
# A < Version("dev-1.3.5.1", "dev-%d.%d.%d.%d") ==> true
#
# Last example also show that two instances of version are comparable even
# if they have different patterns, but such comparation doesn't give
good results always
# This `feature` is here because of some versions format changes - for
example appending minor
Such feature in svr4 package would be nice :-).
Petr