aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2023-02-20 05:47:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2023-02-21 04:46:55 +0200
commit118c25e5a4d599e6e2b6986e227bf1c1f54a1a88 (patch)
tree8aa8facbbeee2c201e50141abde28bc56f0fd281
parent2e043865c8e9abba3ee43a2486a84c9b8d77ae59 (diff)
Derive main from dev
-rw-r--r--bpkg/system-package-manager-debian.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/bpkg/system-package-manager-debian.cxx b/bpkg/system-package-manager-debian.cxx
index f193570..44b3a2b 100644
--- a/bpkg/system-package-manager-debian.cxx
+++ b/bpkg/system-package-manager-debian.cxx
@@ -1534,6 +1534,15 @@ namespace bpkg
ns.front (),
false /* need_doc */,
false /* need_dbg */);
+
+ // If this is -dev without main, then derive main by stripping the -dev
+ // suffix. This feels tighter than just using the bpkg package name.
+ //
+ if (r.main.empty ())
+ {
+ assert (!r.dev.empty ());
+ r.main.assign (r.dev, 0, r.dev.size () - 4);
+ }
}
// Map the version.