| Copyright | (c) 2017 Red Hat Inc. |
|---|---|
| License | LGPL |
| Maintainer | https://github.com/weldr |
| Stability | stable |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Codec.RPM.Version
Description
Functions and types for working with version numbers, as understood by RPM.
- data DepOrdering
- data DepRequirement = DepRequirement Text (Maybe (DepOrdering, EVR))
- data EVR = EVR {}
- parseEVR :: Text -> Either ParseError EVR
- parseDepRequirement :: Text -> Either ParseError DepRequirement
- satisfies :: DepRequirement -> DepRequirement -> Bool
- vercmp :: Text -> Text -> Ordering
Types
data DepOrdering Source #
Like Ordering, but with support for less-than-or-equal and greater-than-or-equal.
Instances
data DepRequirement Source #
RPM supports the concept of dependencies between packages. Collectively, these dependencies are commonly referred to as PRCO - Provides, Requires, Conflicts, and Obsoletes. These dependencies can optionally include version information. These relationships can be examined with various RPM inspection tools or can be found in the spec files that define how a package is built. Examples include:
Requires: python-six Requires: python3-blivet >= 1:1.0 Obsoletes: booty <= 0.107-1
This data type expresses a single dependency relationship. The example dependencies above would be represented like so:
DepRequirement "python-six" Nothing DepRequirement "python3-blivet" (Just (GTE, EVR (Just 1) "1.0" "")) DepRequirement "booty" (Just (LTE, EVR Nothing "0.107" "1"))
It is not in the scope of this type to know what kind of relationship a DepRequirement
describes.
Constructors
| DepRequirement Text (Maybe (DepOrdering, EVR)) |
Instances
The versioning information portion of a package's name - epoch, version, release.
Constructors
| EVR | |
Fields
| |
Functions
parseEVR :: Text -> Either ParseError EVR Source #
Convert a Text representation into an EVR or a ParseError if something goes wrong.
parseDepRequirement :: Text -> Either ParseError DepRequirement Source #
Convert a Text representation into a DepRequirement or a ParseError if something
goes wrong.
Arguments
| :: DepRequirement | The package in question, represented as a |
| -> DepRequirement | The requirement. |
| -> Bool |
Determine if a candidate package satisfies the dependency relationship required by some other package.