On Feb 27, 2009, at 4:59 AM, Scott ss wrote:
On Feb 27, 2009, at 4:42 AM, Ryan Schmidt wrote:
On Feb 26, 2009, at 19:24, Scott Haneda wrote:
My ASSP portfile I have now, instead of using xinstall, I just
copy the directory into place. I need a little guidance no the
best way to do this.
ASSP will end up in /opt/local/var/ASSP
If ASSP is not there, I just move the entire distro in. On first
run of ASSP, a few files and folders are made, the user is good to
go.
How do I deal with updates to ASSP? The files that were made on
first run, as well as config files that have been edited over
time, can not be replaced.
I believe if I do this as a entire directory, I am going to mess
up, unless there is a merge or sync command I am not seeing.
Would it then be correct to simply install each file one at a
time, then they get registered, and the port upgrade can just
touch those files, leaving any user created files in the same area
alone?
It does not matter how you put files into the destroot, whether
it's by file copy or xinstall or make install or whatever. As long
as files are in the destroot, MacPorts will see them and register
them to the port.
Ok, thanks. I will have to think the best way to do this then.
You should not install any files the user will modify, because they
will be deleted and overwritten by your port's new files if they
upgrade the port. Instead, install sample files which the user is
to copy and then modify.
I hope there is a provision for dealing with this. ASSP has a built
in http server, done in perl, which allows a web based admin. That
admin, reads and writes files in the ASSP/files, ASSP/db and a few
other places. The user is not modifying them directly, they are
more like "preferences" for ASSP.
There are no sample files to install, they are sparse config/
instruction files, that get filled over time, either by the user
admin, or automatically by the application, or both.
How do I protect these files? I suspect this is analogous to how to
you protect mysql databases, but those are not pre-installed in most
cases.
If I understand Ryans reply correctly, if you create the folders but
not the files, then the folders will be registered but not the files.
Since port won't delete files not registered to it the files nor the
directory should be deleted.
I don't know this but this is the behavior I would expect.
//Brad
_______________________________________________
macports-users mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-users