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

Shreenidhi Shedi notifications at github.com
Wed Jan 8 10:37:44 UTC 2025


Here is the link to spec which I'm trying this with.

https://github.com/vmware/photon/blob/master/SPECS/selinux-python/selinux-python.spec#L52

I added below lines after line 52.
```
%ghost %{python3_sitelib}/__pycache__
%ghost %{python3_sitelib}/__pycache__/*.pyc
```

And after building and installing package, I did `python3 -c 'import selinux'` and it was successful.
Then I did `rpm -e selinux-python` and the pyc file is still left behind.

```
root at ph4dev [ ~ ]# ls /lib/python3.10/site-packages/selinux/__pycache__/
__init__.cpython-310.pyc
```
But if the ghost directives I used were effective, this should not have happened. Right?

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

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


More information about the Rpm-maint mailing list