# How to keep ports modifications



## tobe (Feb 3, 2009)

Hello,

I did some modifications on one of the ports, but each time i'm rebuilding after an update, it is rebuilded and i'm loosing the modifications.

I there any way i can keep my modifications ?
I'm using csup and portupgrade.

Thanks,
TobÃ©.


----------



## hydra (Feb 3, 2009)

As far as I know, csup compares the FreeBSD ports repository with your local and does the sync. So it's pretty obvious you loose your stuff. The sync can be omitted with a .cvsignore in the directory (check the one in /usr/ports/.cvsignore, it contains 'packages' and 'distfiles').


----------



## tobe (Feb 3, 2009)

It seems csup just sync some packages definitions.
When building, the distfiles are downloaded (if needed), unpacked, patched, builded and then the source tree is removed when the port is cleaned.

I'm gonna try to modify the package definition to add my patch. If possible, then it should be merged by csup when updating.

Thanks,
TobÃ©

Edit:
Actually it's easy as creating a 'files' directory and putting patches inside


----------

