DragonFly BSD
DragonFly kernel List (threaded) for 2003-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Xml in packaging system


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 1 Nov 2003 10:57:57 -0800 (PST)

:This is very cool... At first glance it looks like
:"press record"
:build the package.
:"stop recording"
:
:Now you have a set of port rules?
:
:Am I way off?
:
:If not I really like it :).  How would this differ from expect?
:
:I think I missed something.
:
:Dave

    Close.  It's not actually recording anything.  Well, it is... it's 
    recording the 'mountlist' equivalent (the VFS mappings onto the
    real filesystem).  

    But any modifications you make to the filesystem (creating files, deleting
    files, modifying files) which are kept as part of the VFS itself, in a
    unionfs like fashion, and not passed through to the real filesystem...
    the VFS is simply acting like a unionfs with the top layer being an MFS
    like entity instead of another disk-based filesystem.

    When it comes time to generate the VFS config, it would generate a list
    of the underlying filesystem mappings and it would then generate 
    sufficient information to reproduce the top layer (the 'memory filesystem'
    integrated into the VFS).  It's not really recording the exact sequence
    of commands you used, it is simply taking the end result and generating
    a sequence of RM, MKDIR, CREATE FILE (and the contents of the new files),
    and for any file that also exists in the underlying real filesystem
    it would 'diff' the old and new files to produce a delta.

    So, in fact, being able to record such a configuration is not difficult
    at all.  It could be done almost trivially.  In fact, if we give 
    ourselves the ability to query the VFS for the mappings and the ability
    to create a temporary mount that only shows the VFS's unionfs top layer,
    a shell script could be written to compare the top layer with the
    bottom layer and generate the patch set almost exactly what a 'diff -N' 
    command would output, but of course with additional info like user,
    group, modes, deletions, and so forth.

						-Matt



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]