On 09/29/10 02:04 PM, Jack Schwartz wrote:
Hi Alok.
On 09/29/10 01:36 PM, Alok Aggarwal wrote:
The current implementation of DC includes a section in
the SPARC DC manifests to specify the files that are to be
left uncompressed in the boot_archive. The entries
look like this:
<base_include type="file"
fiocompress="false">etc/path_to_inst</base_include>
In the new AI/DC schema/manifest, there isn't a specific
section to describe the boot_archive and thus no default
place to put information like the above in the manifest.
So, we have a couple of choices:
a) Specify the files to be left uncompressed as an argument
to the checkpoint that will consume this list. The following
would be added to [1]:
<kwargs>
<arg name="uncompressed_files">file1, file2, file3</arg>
</kwargs>
b) Add a section for uncompressed files to the distro_spec section
of the manifest [2].
The advantage to (a) is that it makes it obvious as to which
checkpoint consumes that information whereas (b) sort of
obfuscates it. The disadvantage to (a) is that it can get
sort of clunky with line wraps or whatnot if the uncompressed files
list becomes large.
Which option do people prefer?
IIRC, XML doesn't look at white space. If this is so, you can still
use option A (which I prefer) and still have files listed on their own
line. Something like this:
<kwargs>
<arg name="uncompressed_files">
file1
file2
file3
</arg>
</kwargs>
... and even if XML does look at white space, you can still parse the
list you get from XML into individual words (files).
Thanks,
Jack
XML preserves whitespace (and thus, tools that manipulate XML shouldn't
be trimming or expanding whitespace or adding line wraps); but consumers
are always free to ignore it. In most cases, ours included, white space
tends to be ignored.
Given that we're parsing filenames here, whitespace could theoretically
be relevant - file paths with spaces are rare, and it's unlikely that
someone would need one uncompressed, but it's still entirely possible.
I still prefer option A, but how to deal with non-'standard' filepaths
should be taken into consideration (not necessarily just for this case;
but for other checkpoints, including user generated ones, as well).
Perhaps kwargs needs a 'list' like sub-element which would pack elements
into a tuple before passing them in (or perhaps I'm over thinking it):
<kwargs>
<arg name="uncompressed_files">
<li>file1</li>
<li>file2</li>
<li>file3</li>
</arg>
</kwargs>
- Keith
Thanks,
Alok
[1]
http://src.opensolaris.org/source/xref/caiman/cud_dc/usr/src/cmd/distro_const/manifest/dc_text_sparc.xml#596
[2]
http://src.opensolaris.org/source/xref/caiman/cud_dc/usr/src/cmd/distro_const/manifest/dc_text_sparc.xml#5
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss