Line 64... |
Line 64... |
64 |
|
64 |
|
65 |
Let's imagine that we have a package named NASM in version 2.12. A new version
|
65 |
Let's imagine that we have a package named NASM in version 2.12. A new version
|
66 |
2.15 of this software has been released, you tested it, found it stable so you
|
66 |
2.15 of this software has been released, you tested it, found it stable so you
|
67 |
packaged it. How to add it to the SvarDOS packages repository?
|
67 |
packaged it. How to add it to the SvarDOS packages repository?
|
68 |
|
68 |
|
69 |
Add the new version of your package:
|
69 |
Duplicate the last version of the package into a new file:
|
70 |
|
70 |
|
71 |
$ svn add nasm-2.15.svp
|
71 |
$ svn cp nasm-2.14.svp nasm-2.15.svp
|
72 |
$ svn add nasm-2.15.zip <-- optional (only if package has sources)
|
72 |
$ svn cp nasm-2.14.zip nasm-2.15.zip <-- only if package has sources
|
- |
|
73 |
|
- |
|
74 |
Then overwrite the new version files with the actual new files (ie. overwrite
|
- |
|
75 |
the nasm-2.15.* files in the example above).
|
73 |
|
76 |
|
74 |
Finally, review and commit your changes:
|
77 |
Finally, review and commit your changes:
|
75 |
|
78 |
|
76 |
$ svn st
|
79 |
$ svn st
|
77 |
$ svn commit -m 'updated package NASM to version 2.15'
|
80 |
$ svn commit -m 'updated package NASM to version 2.15'
|
78 |
|
81 |
|
- |
|
82 |
An alternative way would be to simply svn add the new version of files and it
|
- |
|
83 |
would work just as well, but going through the "svn cp" + overwriting steps
|
- |
|
84 |
allows svn to store the new version of the files much more efficiently, as it
|
- |
|
85 |
will store only the bytes that changed instead of the entire file. Subversion
|
- |
|
86 |
makes use of the xdelta algorithm for storing changes, and this algorithm works
|
- |
|
87 |
both on text and binary content.
|
- |
|
88 |
|
- |
|
89 |
|
- |
|
90 |
Which version of the package will users get?
|
- |
|
91 |
|
79 |
The repository server will automatically serve the latest available version as
|
92 |
The repository server automatically serves the latest available version as the
|
80 |
the "preferred" version to users. The version strings are processed (and
|
93 |
"preferred" version to users. The version strings are processed (and compared
|
81 |
compared with each other) through the PHP version_compare() function documented
|
94 |
to each other) through the PHP version_compare() function documented here:
|
82 |
here: <https://www.php.net/manual/en/function.version-compare>
|
95 |
<https://www.php.net/manual/en/function.version-compare>
|
83 |
|
96 |
|
84 |
This function works relatively well, but it might fail on some exotic version
|
97 |
This function works relatively well, but it might fail on some exotic version
|
85 |
strings. For the time being, there is no way to flag a specific package version
|
98 |
strings. For the time being, there is no way to flag a specific package version
|
86 |
as being "preferred".
|
99 |
as being "preferred".
|
87 |
|
100 |
|
88 |
|
101 |
|
89 |
=== REMOVING A PACKAGE ========================================================
|
102 |
=== REMOVING A PACKAGE ========================================================
|
90 |
|
103 |
|
91 |
On rare occasions it may be necessary to delete some packages. For example if
|
104 |
On rare occasions it may be necessary to delete a package. For example if they
|
92 |
they proved to be harmful in some way, or if their licensing is not compatible
|
105 |
proved to be harmful in some way, or if their licensing is not compatible with
|
93 |
with SvarDOS distribution, etc. Removing a package means deleting it from the
|
106 |
SvarDOS distribution, etc. Removing a package is as simple as deleting it from
|
94 |
svn repository and commiting the change. Example:
|
107 |
the svn repository and commiting the change. Example:
|
95 |
|
108 |
|
96 |
$ cd svardos-pkgs
|
109 |
$ cd svardos-pkgs
|
97 |
$ svn del package.svp
|
110 |
$ svn del package.svp
|
98 |
$ svn del package.zip <-- only if zip with sources exists
|
111 |
$ svn del package.zip <-- only if zip with sources exists
|
99 |
$ svn commit -m 'removed package PACKAGE_NAME because (reason here)'
|
112 |
$ svn commit -m 'removed package PACKAGE_NAME because (reason here)'
|