Patchwork live-image/fwts-frontend-text: use cp versus ln as symbolic links are not supported on fat file systems

login
register
mail settings
Submitter Colin King
Date July 8, 2012, 11:32 a.m.
Message ID <4FF96FC5.409@canonical.com>
Download mbox | patch
Permalink /patch/169628/
State Rejected
Headers show

Comments

Colin King - July 8, 2012, 11:32 a.m.
Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
---
  live-image/fwts-frontend-text |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Chris Van Hoof - July 9, 2012, 4:44 p.m.
On 07/08/2012 07:32 AM, Colin Ian King wrote:
> Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
> ---
>  live-image/fwts-frontend-text |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
> index 932c068..8315d47 100755
> --- a/live-image/fwts-frontend-text
> +++ b/live-image/fwts-frontend-text
> @@ -197,7 +197,7 @@ done_tests_finish()
>  {
>      if [ -n "${CASPER_DETECTED:+x}" ]; then
>          cd $WORK_DIR
> -        ln -sf ./results.html ../../results.html
> +        cp ./results.html ../../results.html
>      else
>          ln -sf $WORK_DIR/results.html /fwts/results.html
>      fi

"""
Is it better to mv the file rather than cp it?  If it makes no real
difference, then I'm OK with this fix.

Colin
"""

I figured it'd be best to preserve all the data and only copy the latest
to the top-level work dir, but I do see your point, a full run from my
x220 yields a 460K results.html file, which could quickly consume the
10mb snapshot file we use to save the data in.

Anyone else have an opinion? We could leave the existing plaintext data
in place and always move the html to save space for multiple runs?

--chris
Keng-Yu Lin - July 10, 2012, 8:41 a.m.
On Tue, Jul 10, 2012 at 12:44 AM, Chris Van Hoof <vanhoof@canonical.com> wrote:
> On 07/08/2012 07:32 AM, Colin Ian King wrote:
>> Signed-off-by: Chris Van Hoof <vanhoof@canonical.com>
>> ---
>>  live-image/fwts-frontend-text |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
>> index 932c068..8315d47 100755
>> --- a/live-image/fwts-frontend-text
>> +++ b/live-image/fwts-frontend-text
>> @@ -197,7 +197,7 @@ done_tests_finish()
>>  {
>>      if [ -n "${CASPER_DETECTED:+x}" ]; then
>>          cd $WORK_DIR
>> -        ln -sf ./results.html ../../results.html
>> +        cp ./results.html ../../results.html
>>      else
>>          ln -sf $WORK_DIR/results.html /fwts/results.html
>>      fi
>
> """
> Is it better to mv the file rather than cp it?  If it makes no real
> difference, then I'm OK with this fix.
>
> Colin
> """
>
> I figured it'd be best to preserve all the data and only copy the latest
> to the top-level work dir, but I do see your point, a full run from my
> x220 yields a 460K results.html file, which could quickly consume the
> 10mb snapshot file we use to save the data in.
>
> Anyone else have an opinion? We could leave the existing plaintext data
> in place and always move the html to save space for multiple runs?
>

if we can keep the latest N records will be good enough to me (at
least to me :-)).

Patch

diff --git a/live-image/fwts-frontend-text b/live-image/fwts-frontend-text
index 932c068..8315d47 100755
--- a/live-image/fwts-frontend-text
+++ b/live-image/fwts-frontend-text
@@ -197,7 +197,7 @@  done_tests_finish()
  {
      if [ -n "${CASPER_DETECTED:+x}" ]; then
          cd $WORK_DIR
-        ln -sf ./results.html ../../results.html
+        cp ./results.html ../../results.html
      else
          ln -sf $WORK_DIR/results.html /fwts/results.html
      fi