diff --git a/cmd/mkpkg/main.go b/cmd/mkpkg/main.go index fd7de4d94..60cc24fe7 100644 --- a/cmd/mkpkg/main.go +++ b/cmd/mkpkg/main.go @@ -41,6 +41,7 @@ func main() { postinst := getopt.StringLong("postinst", 0, "", "debian postinst script path") prerm := getopt.StringLong("prerm", 0, "", "debian prerm 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() filesMap, err := parseFiles(*files) @@ -66,6 +67,11 @@ func main() { }, }) + if *replaces != "" { + info.Overridables.Replaces = []string{*replaces} + info.Overridables.Conflicts = []string{*replaces} + } + switch *pkgType { case "deb": info.Section = "net"