Skip to content

Commit b4f981c

Browse files
committed
Eliminate the term "prerequisite"
1 parent d472832 commit b4f981c

File tree

1 file changed

+35
-20
lines changed

1 file changed

+35
-20
lines changed

spec.md

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,24 @@ metadata], which is reserved for use by downstream packaging systems.
147147
#### Version Range ####
148148

149149
A *Version Range* is a [String](#string) that describes a range of Versions
150-
that **MAY** be present or installed to fulfill prerequisites. It is specified
151-
in detail in the [Version Ranges](#version-ranges) section.
150+
that **MAY** be present or installed to fulfill dependencies.
151+
152+
The simplest format for a Version Range is just the version number itself,
153+
e.g. `2.4.2`. This means that **at least** version 2.4.2 must be present.
154+
Versions may also be truncated to their major or minor parts, as appropriate.
155+
For example, `2.4` means that **at least** version 2.4.0 must be present.
156+
157+
To indicate that **any** version is okay, use the version `0`.
158+
159+
Alternatively, a version range **may** use the operators `<` (less than), `<=`
160+
(less than or equal), `>` (greater than), `>=` (greater than or equal), `==`
161+
(equal), and `!=` (not equal). For example, the specification `< 2` means that
162+
any version of the dependency less than version 2 is suitable.
163+
164+
For more complicated situations, version specifications **may** be AND-ed
165+
together using commas. The specification `>= 1.2, != 1.5.2, < 2.0`
166+
indicates a version that must be **at least** 1.2, **less than** 2.0, and
167+
**not equal to** 1.5.2.
152168

153169
#### License String ####
154170

@@ -579,7 +595,7 @@ of the [gitignore format].
579595
"with": [ "xml", "uuid", "perl" ]
580596
},
581597
"pipeline": "pgxs",
582-
"prereqs": {
598+
"packages": {
583599
"build": {
584600
"requires": [
585601
"pkg:generic/awk",
@@ -604,7 +620,7 @@ of the [gitignore format].
604620
"musllinux-amd64",
605621
"darwin-23.5.0-arm64"
606622
],
607-
"prereqs": {
623+
"packages": {
608624
"configure": {
609625
"requires": [ "pkg:cargo/[email protected]" ]
610626
},
@@ -635,7 +651,7 @@ of the [gitignore format].
635651
"linux-amd64", "linux-arm64",
636652
"darwin-amd64", "darwin-arm64"
637653
],
638-
"dependencies": {
654+
"packages": {
639655
"configure": {
640656
"requires": {
641657
"external": [
@@ -693,7 +709,7 @@ of the [gitignore format].
693709
"platforms": ["linux"]
694710
},
695711
"dependencies": {
696-
"prereqs": {
712+
"packages": {
697713
"run": {
698714
"recommends": [
699715
"pkg:pypi/auto-gptq",
@@ -730,7 +746,6 @@ Properties:
730746

731747
* **postgres**: An [Object](#object) describing the versions of PostgreSQL
732748
required by the package. The object supports the following keys:
733-
734749
* **version**: A [Version Range](#version-range) identifying the
735750
supported versions of PostgreSQL. **REQUIRED**.
736751
* **with**: An [Array](#array) of [Terms](#term) that correspond
@@ -756,14 +771,14 @@ Properties:
756771
heuristics to ascertain the pipeline to use, such as the presence or
757772
absence of a `Makefile`, `Cargo.toml` file, etc.
758773

759-
* **prereqs**: An [Object](#object) defining dependencies required for
774+
* **packages**: An [Object](#object) defining dependencies required for
760775
different phases of the build process. The supported properties are
761776
`configure`, `build`, `test`, `run`, and `develop`. Values are
762777
[Objects](#object) with at least one of the properties `requires`,
763778
`recommends`, `suggests`, and `conflicts`. Their values are
764-
[Arrays](#array) of [purls](#purl) that identify the prerequisites.
779+
[Arrays](#array) of [purls](#purl) that identify the packages.
765780

766-
See the [Prereq Spec](#prereq-spec) for the full definition for this
781+
See the [Package Spec](#packages-spec) for the full definition for this
767782
property.
768783

769784
* **variations**: An [Array](#array) of [Object](#object)s that define
@@ -867,22 +882,22 @@ Each URL **MUST** properly resolve and the checksum **MUST** match.
867882
Dependencies
868883
============
869884

870-
Prereq Spec
871-
-----------
885+
Packages Spec
886+
-------------
872887

873-
The `prereqs` sub-property of the `dependencies` property defines the
888+
The `packages` sub-property of the `dependencies` property defines the
874889
relationship between a distribution and external dependencies, including other
875890
extension packages, system packages, and third-party packages, expressed as
876891
[purls](#purl). The structure is a hierarchical data structure which divides
877-
prerequisites into *Phases* of activity in the installation process and
878-
*Relationships* that indicate how prerequisites **SHOULD** be resolved.
892+
package dependencies into *Phases* of activity in the installation process and
893+
*Relationships* that indicate how dependencies **SHOULD** be resolved.
879894

880895
For example, to specify that the PGXN extension `pgtap` by user `theory` is
881896
required during the `test` phase, this entry would appear in the distribution
882897
metadata:
883898

884899
``` json
885-
"prereqs": {
900+
"packages": {
886901
"test": {
887902
"requires": [ "pkg:pgxn/theory/pgtap" ]
888903
}
@@ -946,11 +961,11 @@ phases.
946961
**SHOULD** be listed here.
947962

948963
* **runtime**: The runtime phase refers not only to when the distribution's
949-
contents are installed, but also to its continued use. Any dependency that
950-
is a prerequisite for regular use of this distribution **SHOULD** be
951-
indicated here.
964+
contents are installed, but also to its continued use. Any package that is
965+
a dependency for regular use of this distribution **SHOULD** be indicated
966+
here.
952967

953-
* **develop**: The develop phase's prereqs are dependency needed to work on
968+
* **develop**: The develop phase's packages are dependency needed to work on
954969
the distribution's source code as its maintainer does. These tools might
955970
be needed to build a release archive, to run maintainer-only tests, or to
956971
perform other tasks related to developing new versions of the

0 commit comments

Comments
 (0)