# Grouping hierarchy in debian packages

**URL:** https://discourse.cmake.org/t/grouping-hierarchy-in-debian-packages/8084
**Category:** Usage
**Tags:** cpack:deb
**Created:** [May 9, 2023, 9:51am UTC](https://discourse.cmake.org/t/grouping-hierarchy-in-debian-packages/8084 "2023-05-09T09:51:37Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kingtim](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/e19b73/32.png) [@kingtim](https://discourse.cmake.org/u/kingtim)
#### Post date: [May 9, 2023, 9:51am UTC](https://discourse.cmake.org/t/grouping-hierarchy-in-debian-packages/8084/1 "2023-05-09T09:51:37Z")

</div>

I’d like to build 2 debian packages: A `Runtime` package which has some files and a `Develop` package. Which has ALL the files from the `Runtime` package as well as some additional files.

Is this possible?

With CPack i’d expect the following:

```auto
cpack_add_component_group(RuntimeGroup)
cpack_add_component(Runtime GROUP RuntimeGroup)

cpack_add_component_group(DevelopGroup PARENT RuntimeGroup)
cpack_add_component(Develop GROUP DevelopGroup)

```

This results in 2 debian packages. However the `DevelopGroup` package only contains the stuff from the `Develop` component. The PARENT argument seems to be ignored completely.

Anybody know if it is possible?

---

<div class="post-metadata">

### Author: ![craig.scott](https://discourse.cmake.org/user_avatar/discourse.cmake.org/craig.scott/32/20_2.png) [@craig.scott](https://discourse.cmake.org/u/craig.scott)
#### Post date: [May 9, 2023, 10:41pm UTC](https://discourse.cmake.org/t/grouping-hierarchy-in-debian-packages/8084/2 "2023-05-09T22:41:00Z")

</div>

PARENT relationships only specify structure, not content. If you need the `Develop` package to contain the contents of `Runtime` (a very unconventional and not recommended arrangement), you would have to install the contents to both the `Runtime` and `Develop` components. It is the `install()` commands that you would have to modify.

---

<div class="post-metadata">

### Author: ![kingtim](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/k/e19b73/32.png) [@kingtim](https://discourse.cmake.org/u/kingtim)
#### Post date: [May 10, 2023, 5:38am UTC](https://discourse.cmake.org/t/grouping-hierarchy-in-debian-packages/8084/3 "2023-05-10T05:38:22Z")

</div>

Ah, thats good to know!

What would be the more conventional way to solve this? Add Runtime as a dependency to Develop?

The thing i eant to achieve is being able to deploy test tools with a specific runtime and very strict version requirements (e.g. : Runtime 1.0.1 needs Develop 1.0.1).

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [May 10, 2023, 11:03am UTC](https://discourse.cmake.org/t/grouping-hierarchy-in-debian-packages/8084/4 "2023-05-10T11:03:26Z")

</div>

> [@kingtim](#):
>
> Add Runtime as a dependency to Develop?

This is the typical pattern (Debian and Fedora).

> [@kingtim](#):
>
> Runtime 1.0.1 needs Develop 1.0.1

The development packages tend to require the exact build too (so `1.0.1-4` in Fedora, not just version number).
