Fcopy patch regarding debian bug report #360184

Janning Vygen vygen at planwerk6.de
Wed Dec 6 12:01:03 CET 2006


Hi fai,

attached there are two patch files for fcopy, one for debian stable version 
and one for the latest from fai (which send Thomas Lange to me yesterday)

These Patch files should fix the bug 

    http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=360184

    "In case only the modes are changed, but the actual file stays the same,   
     these changes are not propagated; a possible workaround is IMHO 
     to call set_mode even if a file is preserved."

It just fixes the part of code where $opt_update is not set as i do not 
understood what -p really does.

the main difference is in this line

   if ( compare($tmpfile,$destfile) or compare_mode($ps,$destfile,$class)) {

instead of 

   if ( compare($tmpfile,$destfile) ){

There are a few new subroutines:
   sub get_sourcefile_mode
   sub get_destfile_mode
   sub compare_mode

and some minor modifications to 
  sub set_mode 
to use these new subroutines and avoid repeated code.

It was tested a few times in my environment and it works for me, but maybe 
won't work for you. 

i hope it works and will help anybody. Feel free to use/modify/discard but 
don't claim me for any bugs.

Can anybody review this patch and maybe upload it to http://bugs.debian.org/ 
as i am not used to handle bug reporting databases.

kind regards
Janning

PS: i hope its allowed to send attachments to the list. netiquette is still a 
TODO on 
http://faiwiki.informatik.uni-koeln.de/index.php/Linux-fai_mailing_list_infos

-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcopy.deb31.patch
Type: text/x-diff
Size: 3029 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20061206/cc49ff98/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fcopy.latest.patch
Type: text/x-diff
Size: 3171 bytes
Desc: not available
Url : http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20061206/cc49ff98/attachment-0001.bin 


More information about the linux-fai mailing list