[Rpm-maint] [rpm-software-management/rpm] Do not install %doc directories (Discussion #3782)

Etienne Champetier notifications at github.com
Wed Jun 11 11:41:18 UTC 2025


Testing on EL 9 (I'm packaging helm, just a random example)
```
# rpm -q --dump build/RPMS/helm.rpm | grep doc
/usr/share/doc/helm/sub 0 1 0000000000000000000000000000000000000000000000000000000000000000 040755 root root 0 0 0 X
/usr/share/doc/helm/sub/README.md 3699 1 f2d6d0f6ebf39cdff9612ff56be4d12d25ffc675a9cfac5b0a3031452417b929 0100644 root root 0 1 0 X
```
```
# rpm -i build/RPMS/helm.rpm
# ls /usr/share/doc/helm
sub
# ls /usr/share/doc/helm/sub/
README.md
# rpm -e helm
```
```
# rpm -i build/RPMS/helm.rpm --excludedocs
# ls -lia /usr/share/doc/helm
total 0
269049483 drwxr-xr-x. 2 root root  6 Jun 11 11:33 .
555211289 drwxr-xr-x. 1 root root 18 Jun 11 10:48 ..
```

So you are correct, with rpm, `helm` folder is present, but not `sub`, ie rpm removes folders owned by the package if they are empty once we filtered out all the docs

but with rpm-ostree, `helm/sub` is present, this is what is causing issue for me
```
# ostree ls --repo build/ostree/repo testref /usr/share/doc/helm/sub
d00755 0 0      0 /usr/share/doc/helm/sub
```

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/3782#discussioncomment-13432284
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/repo-discussions/3782/comments/13432284 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250611/86c37099/attachment-0001.htm>


More information about the Rpm-maint mailing list