mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-08 09:07:44 +00:00
cmd/mkpkg: support specifying that a package replaces another.
Both RPM and Deb require us to specify both Replaces and Conflicts: Conflicts tells them that the packages cannot coexist on the system, Replaces tells them which one to keep.
This commit is contained in:
parent
dd68debd64
commit
21fc5ec371
@ -41,6 +41,7 @@ func main() {
|
|||||||
postinst := getopt.StringLong("postinst", 0, "", "debian postinst script path")
|
postinst := getopt.StringLong("postinst", 0, "", "debian postinst script path")
|
||||||
prerm := getopt.StringLong("prerm", 0, "", "debian prerm script path")
|
prerm := getopt.StringLong("prerm", 0, "", "debian prerm script path")
|
||||||
postrm := getopt.StringLong("postrm", 0, "", "debian postrm script path")
|
postrm := getopt.StringLong("postrm", 0, "", "debian postrm script path")
|
||||||
|
replaces := getopt.StringLong("replaces", 0, "", "package which this package replaces, if any")
|
||||||
getopt.Parse()
|
getopt.Parse()
|
||||||
|
|
||||||
filesMap, err := parseFiles(*files)
|
filesMap, err := parseFiles(*files)
|
||||||
@ -66,6 +67,11 @@ func main() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if *replaces != "" {
|
||||||
|
info.Overridables.Replaces = []string{*replaces}
|
||||||
|
info.Overridables.Conflicts = []string{*replaces}
|
||||||
|
}
|
||||||
|
|
||||||
switch *pkgType {
|
switch *pkgType {
|
||||||
case "deb":
|
case "deb":
|
||||||
info.Section = "net"
|
info.Section = "net"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user