[Rpm-maint] [rpm-software-management/rpm] Regex support while packaging files with %ghost (Discussion #3480)

Panu Matilainen notifications at github.com
Wed Jan 8 08:10:09 UTC 2025


> Is it possible to ghost a regex pattern while packaging files?

Did you actually try it?

> Is it possible to own a directory fully in rpm, upon removal; the directory should get removed without bothering about the content within.
> ...
> %ghost %dir %{python3_sitelib}/cloudinit/__pycache__/

Yes, it's very common. Just drop the %dir because that specifically tells rpm that this entry is ONLY about the directory node itself, and not the contents.

As for your use-case for wanting to avoid bloating packages with redundant .pyc files: you might want to research the background as to why they are included in packages. There are multiple reasons for it, and none of them is "for fun".

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

Message ID: <rpm-software-management/rpm/repo-discussions/3480/comments/11770094 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250108/e57ab1f4/attachment.htm>


More information about the Rpm-maint mailing list