From 119f63dea7213ded96f224bdc952f355d1aa3afa Mon Sep 17 00:00:00 2001
From: Apertis package maintainers <packagers@lists.apertis.org>
Date: Thu, 3 Jun 2021 10:26:58 +0200
Subject: [PATCH] d/control: allow this package to fully replace `coreutils`

As we want `rust-coreutils` to be a replacement to `coreutils-gplv2`, we
need to ensure this package gets picked up when boostrapping the system,
and that `coreutils-gplv2` won't be installed at the same time.

This is achieved by:
- adding Conflicts/Breaks/Replaces/Provides relationships identical to
  those of `coreutils-gplv2`
- adding another Conflicts relationship with `coreutils-gplv2`
- make the package priority `required` so it can be pulled by
  `debootstrap`

Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
---
 debian/control | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 1fcc088..5970622 100644
--- a/debian/control
+++ b/debian/control
@@ -1,6 +1,6 @@
 Source: rust-coreutils
 Section: utils
-Priority: optional
+Priority: required
 Build-Depends: debhelper (>= 12),
  dh-cargo (>= 24),
  cargo:native,
@@ -48,7 +48,15 @@ Recommends:
 Suggests:
  ${cargo:Suggests}
 Provides:
- ${cargo:Provides}
+ ${cargo:Provides},
+ coreutils (= 8.24-1),
+ mktemp,
+Conflicts:
+ coreutils,
+ coreutils-gplv2,
+ mktemp (<< 1.6-4co5)
+Replaces:
+ mktemp
 Built-Using: ${cargo:Built-Using}
 XB-X-Cargo-Built-Using: ${cargo:X-Cargo-Built-Using}
 Description: Universal coreutils utils, written in Rust
-- 
GitLab