<div class="gmail_quote">On Mon, Jul 26, 2010 at 2:17 AM, Bruno Wolff III <span dir="ltr">&lt;<a href="mailto:bruno@wolff.to">bruno@wolff.to</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I have attached two patches from bug 582051 that are intended to make<br>
--skipcopy more useful for testing. One is for functionallity, the other<br>
expands the documentation of what skipcopy skips a bit better.<br>
<br>
As discussed in the bug report I don&#39;t like:<br>
<br>
+if [ -s $USBMNT/$LIVEOS/$OVERFILE ]; then<br>
<br>
and think that it should be:<br>
<br>
+if [ &quot;$overlaysizemb&quot; -gt 0 ]; then<br>
<br>
This is easier to understand and seems more likely to be correct.<br>
I am not sure if my comment about my suggestion was misunderstood, but I<br>
don&#39;t see why my suggestion wouldn&#39;t work and the one provided would.<br>
But maybe there is something subtle going on.<br>
<br>
Since --skipcopy is for testing I don&#39;t think the patch will have much<br>
impact on normal use.<br>
<br>
So I would be inclined to except this patch if modified as I suggest, but I&#39;d<br>
like to get more feedback.</blockquote><div><br></div><div>I think the confusion here is due to the dual use of --skipcopy:</div><div><br></div><div>1. Testing the livecd-iso-to-disk script (with variations on installation options, for example), or</div>

<div><br></div><div>2. Repairing boot configuration files on an already-installed LiveUSB image.</div><div><br></div><div>For use #2, one would test for the existence of the overlay file on the target device, rather than the existence of a request for a new overlay (because $overlaysizemb is set only by the command line option --overlay-size-mb &lt;size&gt;, which is the way one requests a new, persistent overlay).</div>

<div><br></div><div>So to include an existing overlay reference on an image needing a new boot configuration file, one could simply invoke the --skipcopy option---without needing also to include a, perhaps counterintuitive, request for a new, persistent overlay.  This, of course, means that the variable $OVERFILE must be set without the new overlay request (which the attached patch provides).</div>

<div><br></div><div>In the standard installation case, if an overlay was requested, the overlay file will have just been created with dd before the $OVERFILE test is performed.</div><div><br></div></div>