feat: use numerical debian release string by default
This commit is contained in:
parent
77e118be64
commit
26a65924df
@ -119,10 +119,14 @@ var ReleaseStrings = [...]string{
|
|||||||
"bookworm",
|
"bookworm",
|
||||||
}
|
}
|
||||||
|
|
||||||
func (cn Release) String() string {
|
func (cn Release) Name() string {
|
||||||
return ReleaseStrings[cn]
|
return ReleaseStrings[cn]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (cn Release) String() string {
|
||||||
|
return fmt.Sprintf("%d", cn)
|
||||||
|
}
|
||||||
|
|
||||||
func ReleaseFromString(s string) (r Release) {
|
func ReleaseFromString(s string) (r Release) {
|
||||||
switch strings.ToLower(s) {
|
switch strings.ToLower(s) {
|
||||||
case "7", "wheezy":
|
case "7", "wheezy":
|
||||||
@ -220,7 +224,7 @@ func repositories(release Release) (repos []string) {
|
|||||||
format := "deb [check-valid-until=no trusted=yes] " +
|
format := "deb [check-valid-until=no trusted=yes] " +
|
||||||
"http://snapshot.debian.org/archive/%s/%s " +
|
"http://snapshot.debian.org/archive/%s/%s " +
|
||||||
"%s%s main"
|
"%s%s main"
|
||||||
r := fmt.Sprintf(format, archive, snapshot, release, s)
|
r := fmt.Sprintf(format, archive, snapshot, release.Name(), s)
|
||||||
repos = append(repos, r)
|
repos = append(repos, r)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user