Provided by: dpkg-dev_1.18.4ubuntu1.7_all 

NOME
deb-version - formato del numero di versione dei pacchetti Debian
SINTASSI
[epoca:]versione-originale[-revisione-debian]
DESCRIZIONE
I numeri di versione usati per i pacchetti binari e sorgente di Debian sono formati da tre componenti che
sono:
epoca Questo è un singolo intero senza segno (generalmente piccolo). Può essere omesso, nel qual caso
viene considerato equivalente a zero. Se viene omesso allora la versione-originale non può
contenere alcun carattere «:».
Viene fornito per permettere di tralasciare errori nei numeri di versione delle versioni più
vecchie di un pacchetto e anche negli schemi di numerazione precedenti di un pacchetto.
versione-originale
This is the main part of the version number. It is usually the version number of the original
(“upstream”) package from which the .deb file has been made, if this is applicable. Usually this
will be in the same format as that specified by the upstream author(s); however, it may need to be
reformatted to fit into the package management system's format and comparison scheme.
Il metodo di confronto del sistema di gestione dei pacchetti per ciò che riguarda
versione-originale è descritto in seguito. La porzione versione-originale del numero di versione è
obbligatoria.
The upstream-version may contain only alphanumerics (“A-Za-z0-9”) and the characters . + - : ~
(full stop, plus, hyphen, colon, tilde) and should start with a digit. If there is no
debian-revision then hyphens are not allowed; if there is no epoch then colons are not allowed.
revisione-debian
Questa parte del numero di versione specifica la versione del pacchetto Debian basata sulla
versione originale. Può contenere solo caratteri alfanumerici e i caratteri + . ~ (più, punto,
tilde) e viene confrontata nello stesso modo di versione-originale.
It is optional; if it isn't present then the upstream-version may not contain a hyphen. This
format represents the case where a piece of software was written specifically to be turned into a
Debian package, and so there is only one “debianisation” of it and therefore no revision
indication is required.
It is conventional to restart the debian-revision at ‘1’ each time time the upstream-version is
increased.
dpkg spezza il numero di versione all'ultimo trattino nella stringa (se ce n'è uno) per
determinare versione-originale e revisione-debian. In un confronto, l'assenza di una
revisione-debian viene considerarata anteriore rispetto alla sua presenza (ma si deve notare che
revisione-debian è la parte meno significativa del numero di versione).
Algoritmo di ordinamento
Le parti versione-originale e revisione-debian vengono confrontate dal sistema di gestione dei pacchetti
usando lo stesso algoritmo:
Le stringhe vengono confrontate da sinistra a destra.
First the initial part of each string consisting entirely of non-digit characters is determined. These
two parts (one of which may be empty) are compared lexically. If a difference is found it is returned.
The lexical comparison is a comparison of ASCII values modified so that all the letters sort earlier than
all the non-letters and so that a tilde sorts before anything, even the end of a part. For example, the
following parts are in sorted order: ‘~~’, ‘~~a’, ‘~’, the empty part, ‘a’.
Poi viene determinata la parte iniziale del resto di ogni stringa che consiste interamente di caratteri
che sono cifre. I valori numerici di queste due parti vengono confrontati e qualsiasi differenza trovata
è restituita come risultato del confronto. Per questi scopi una stringa vuota (che può solo essere
presente alla fine di una o di entrambe le stringhe di versione confrontate) viene considerata come zero.
Questi due passi (confronto e rimozione delle stringhe iniziali senza cifre e stringhe iniziali di cifre)
vengono ripetuti fino a che non viene trovata una differenza o non sono esaurite entrambe le stringhe.
Note that the purpose of epochs is to allow us to leave behind mistakes in version numbering, and to cope
with situations where the version numbering scheme changes. It is not intended to cope with version
numbers containing strings of letters which the package management system cannot interpret (such as
‘ALPHA’ or ‘pre-’), or with silly orderings.
NOTE
Il carattere tilde e le sue particolari proprietà di ordinamento sono stati introdotti nella versione
1.10 di dpkg e alcune parti degli script di compilazione di dpkg hanno acquisito il supporto per essi
solamente più tardi nella serie 1.10.x.
VEDERE ANCHE
deb-control(5), deb(5), dpkg(1)
Progetto Debian 2 aprile 2013 deb-version(5)