Patch for Lcalc

Stefan Sperling stsp at stsp.name
Thu May 10 18:49:23 CEST 2007


On Thu, May 10, 2007 at 12:06:18PM -0400, Jonathan wrote:
>  Hello all, DSman here.
> 
>  Over lunch today I ported Lcalc. It's working great. I've included the 
>  patch. ;)
> 
>  I've never done this before so I don't know if there really is proper 
>  "protocol" for submitting patches to the newsgroup.

See http://www.dslinux.org/wiki/Creating_Patches

Especially:
http://www.dslinux.org/wiki/Creating_Patches#Good_patches

>  Hopefully this all turned out all right...

This part of the diff is OK:

> Index: config/config.in
> ===================================================================
> --- config/config.in	(revision 1755)
> +++ config/config.in	(working copy)
> @@ -786,6 +786,7 @@
>  bool 'grep'			CONFIG_USER_GREP_GREP
>  bool 'hd'			CONFIG_USER_HD_HD
>  bool 'hexedit'			CONFIG_USER_HEXEDIT_HEXEDIT
> +bool 'Lcalc'			CONFIG_USER_LCALC_LCALC
>  bool 'lcd'			CONFIG_USER_LCD_LCD
>  bool 'ledcon'			CONFIG_USER_LEDCON_LEDCON
>  bool 'lha'			CONFIG_USER_LHA_LHA
> Index: config/Configure.help
> ===================================================================
> --- config/Configure.help	(revision 1755)
> +++ config/Configure.help	(working copy)
> @@ -494,6 +494,9 @@
>  CONFIG_USER_HEXEDIT_HEXEDIT
>    A nice hex editor
>  
> +CONFIG_USER_LCALC_LCALC
> +  A simple, 4 function calculator
> +
>  CONFIG_USER_ROUTE_IFCONFIG
>    Required to configure network interfaces.
>    Approx. binary size: 28k
> Index: user/Makefile
> ===================================================================
> --- user/Makefile	(revision 1755)
> +++ user/Makefile	(working copy)
> @@ -176,6 +176,7 @@
>  dir_$(CONFIG_USER_KLAXON_KLAXON)            += klaxon
>  dir_$(CONFIG_USER_L2TPD_L2TPD)              += l2tpd
>  dir_$(CONFIG_USER_LANG_A60)                 += a60
> +dir_$(CONFIG_USER_LCALC_LCALC)              += Lcalc
>  dir_$(CONFIG_USER_LCD_LCD)                  += lcd
>  dir_$(CONFIG_USER_LEDCON_LEDCON)            += ledcon
>  dir_$(CONFIG_USER_LEVEE_VI)                 += levee


This and below isn't:

> diff -urN user/Lcalc/Lcalc/Lcalc/AUTHORS user/Lcalc/Lcalc/AUTHORS
> --- user/Lcalc/Lcalc/Lcalc/AUTHORS	1969-12-31 19:00:00.000000000 -0500
> +++ user/Lcalc/Lcalc/AUTHORS	2000-02-02 12:23:24.000000000 -0500
> @@ -0,0 +1,3 @@
> +AUTHORS:
> +		Raymond Jones
> +
> diff -urN user/Lcalc/Lcalc/Lcalc/COPYING user/Lcalc/Lcalc/COPYING
> --- user/Lcalc/Lcalc/Lcalc/COPYING	1969-12-31 19:00:00.000000000 -0500
> +++ user/Lcalc/Lcalc/COPYING	2000-02-02 12:17:38.000000000 -0500


> @@ -0,0 +1,341 @@
> +
> +		    GNU GENERAL PUBLIC LICENSE
> +		       Version 2, June 1991


For example, we don't need a complete copy of the GPL in a patch!

A patch is supposed to contain only differences between two
sets of files (let's call them A and B) that describe what has
changed between A and B. So you can take the patch and apply
it to a copy of set A to get set B.

Note that your patch contains _entire_ copies of files.
This means you have diffed against empty files, which means
you probably had an error in your diff command line.

Diffs against empty files are generelly pointless.
Only files that you created to make the build work should appear
in the patch in their entirety, e.g. a Makefile you've written from
scratch. Nothing else.

Patches that contain unneeded junk are both hard to read and apply.

-- 
stefan
http://stsp.name                                         PGP Key: 0xF59D25F0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://mailman.dslinux.in-berlin.de/pipermail/dslinux-devel-dslinux.in-berlin.de/attachments/20070510/d081925a/attachment.pgp 


More information about the dslinux-devel mailing list