[BusyBox 0000694]: the uuencode function is repeated in uuencode and wget.

bugs at busybox.net bugs at busybox.net
Fri Jul 14 23:20:26 UTC 2006


A NOTE has been added to this issue. 
====================================================================== 
http://busybox.net/bugs/view.php?id=694 
====================================================================== 
Reported By:                ehovland
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   694
Category:                   Other
Reproducibility:            always
Severity:                   tweak
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             02-06-2006 13:13 PST
Last Modified:              07-14-2006 16:20 PDT
====================================================================== 
Summary:                    the uuencode function is repeated in uuencode and
wget.
Description: 
both coreutils/uuencode.c and networking/wget.c have a function to uuencode
data. It sure would be smart to have only one implementation and have both
uuencode and wget use it.

The attached patch moves the uuencode function to libbb/uuencode.c and
modifies coreutils/uuencode.c to use the libbb/uuencode.c version. It also
adds some encoding tests to testsuite/uuencode to make sure the move wasn't
stuffed up.
====================================================================== 

---------------------------------------------------------------------- 
 ehovland - 02-06-06 13:27  
---------------------------------------------------------------------- 
The second patch removes the base64enc function from networking/wget.c and
uses the libbb bb_uuencode with a base64 table.

I have not yet figured out how to test this for working in a way that can
be put into testsuite. So if anyone has any ideas, add a note. 

---------------------------------------------------------------------- 
 scott - 02-09-06 13:11  
---------------------------------------------------------------------- 
Do we need depenency checks in the config for applets 'uuencode' and 'wget'
to be sure uuencode is enabled in the libbb?  I know buildroot uses deps to
be sure required modules are selected.

Or is uuencode always compiled in libbb regardless of the applet config? 

---------------------------------------------------------------------- 
 ehovland - 02-09-06 14:01  
---------------------------------------------------------------------- 
The patch as included always builds uuencode into libbb. I am willing to
rework the patch so that uuencode doesn't always get built in libbb and
then put in the checks in uuencode and wget applets.

Please advise. 

---------------------------------------------------------------------- 
 bernhardf - 04-12-06 12:05  
---------------------------------------------------------------------- 
In this case, please provide a single patch in which you rename
bb_tbl_base64 to bb_uuenc_tbl_base64 and bb_tbl_std to bb_uuenc_tbl_std.

Also, move your new tests and the old one
(uuencode-sets-standard-input-mode-correctly) to the new testing framework
(see testsuite/*tests).

TIA 

---------------------------------------------------------------------- 
 ehovland - 07-14-06 16:20  
---------------------------------------------------------------------- 
Well, 3 months later. Here is a patch which attempts to do what Bernhard
ask for.

I tried to make it conditionally compile uuencode.c in libbb. But I just
couldn't figure it out in the time I alloted for this change.

Otherwise, I am hopefully the new patch attached to this issue is good
enough. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
02-06-06 13:13  ehovland       New Issue                                    
02-06-06 13:13  ehovland       Status                   new => assigned     
02-06-06 13:13  ehovland       Assigned To               => BusyBox         
02-06-06 13:13  ehovland       File Added: move_uuencode_to_libbb.patch         
          
02-06-06 13:25  ehovland       File Added: remove_uuencode_from_wget.patch      
             
02-06-06 13:27  ehovland       Note Added: 0001051                          
02-09-06 13:11  scott          Note Added: 0001072                          
02-09-06 14:01  ehovland       Note Added: 0001073                          
04-12-06 12:05  bernhardf      Note Added: 0001282                          
07-14-06 16:18  ehovland       File Added: bb-uuencode-wget-consolidation.patch 
                  
07-14-06 16:20  ehovland       Note Added: 0001523                          
======================================================================




More information about the busybox-cvs mailing list