[BusyBox 0001439]: [patch] add the

bugs at busybox.net bugs at busybox.net
Wed Feb 13 16:59:18 UTC 2008


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=1439 
====================================================================== 
Reported By:                mirabilos
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   1439
Category:                   New Features
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             07-20-2007 05:43 PDT
Last Modified:              02-13-2008 08:59 PST
====================================================================== 
Summary:                    [patch] add the 
Description: 
This diff adds a version of the 
====================================================================== 

---------------------------------------------------------------------- 
 vda - 07-21-07 07:41  
---------------------------------------------------------------------- 
424897 byte source is 2.5 larger that our current biggest applet, ash.c.
Sorry. 

---------------------------------------------------------------------- 
 vda - 07-21-07 07:42  
---------------------------------------------------------------------- 
Oops. make that 1.5 times larger. But still far too big. Just build it
standalone. 

---------------------------------------------------------------------- 
 mirabilos - 07-21-07 09:10  
---------------------------------------------------------------------- 
I don't think "too big" is an issue since the user still has to
select it manually. 

---------------------------------------------------------------------- 
 vda - 07-21-07 16:30  
---------------------------------------------------------------------- 
If applet is added to bbox, its quality becomes responsibility of bbox
maintainers. Low-quality code taken into the tree tends to sit there
forever with nobody fixing it.

Patch review and inclusion is _the_ point where code is cleaned up and
slimmed down.

Random examples of bugs:

+     lists_dir=(char *)malloc(1);
+     lists_dir[0]='\0';

bloaty code:

+           line = realloc(line, line_size);
+           if (line == NULL) {
+               fprintf(stderr, "%s: out of memory\n", __FUNCTION__);
+               break;
+           }

and bad style:

+         }
+          if (( strcmp(flags,"hold")==0)||(
strcmp(flags,"noprune")==0)||
+              ( strcmp(flags,"user")==0)||( strcmp(flags,"ok")==0)) {
+             pkg->state_flag = pkg_state_flag_from_str(flags);
+          }
+/* pb_ asked this feature 03292004 */
+/* Actually I will use only this two, but this is an open for various
status */
+          if (( strcmp(flags,"installed")==0)||(
strcmp(flags,"unpacked")==0)){
+             pkg->state_status = pkg_state_status_from_str(flags);
+          }
+         ipkg_state_changed++;
+         ipkg_message(conf, IPKG_NOTICE,
+                      "Setting flags for package %s to %s\n",
+                      pkg->name, flags);
+     } 

---------------------------------------------------------------------- 
 mirabilos - 07-23-07 02:57  
---------------------------------------------------------------------- 
While I agree that the bugs should be fixed, this is
exactly why I'm submitting the patches to you (plus
making sure it won't break due to future busybox
changes). I don't even know its original authors,
but I surely won't object against bugs being fixed. 

---------------------------------------------------------------------- 
 bernhardf - 07-23-07 05:26  
---------------------------------------------------------------------- 
Also, the long option handling has to depend on ENABLE_GETOPT_LONG.

Can you please adjust accordingly (including vda's comments) and run this
through the mailing-list? TIA.

PS: You should use index_in_string_array rather than all those strcmp()
chains.
PPS: The most of struct args should be bools and not int's 

---------------------------------------------------------------------- 
 vda - 02-13-08 08:59  
---------------------------------------------------------------------- 
Reporter is not responding. Anyway, new applets are to be sent to mailing
list. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-20-07 05:43  mirabilos      New Issue                                    
07-20-07 05:43  mirabilos      Status                   new => assigned     
07-20-07 05:43  mirabilos      Assigned To               => BusyBox         
07-20-07 05:43  mirabilos      File Added: 911-ipkg.patch                    
07-21-07 07:41  vda            Note Added: 0002616                          
07-21-07 07:42  vda            Note Added: 0002617                          
07-21-07 09:10  mirabilos      Note Added: 0002623                          
07-21-07 16:30  vda            Note Added: 0002625                          
07-23-07 02:57  mirabilos      Note Added: 0002627                          
07-23-07 05:26  bernhardf      Note Added: 0002634                          
10-02-07 06:09  mat            Issue Monitored: mat                         
02-13-08 08:59  vda            Status                   assigned => closed  
02-13-08 08:59  vda            Note Added: 0004464                          
======================================================================




More information about the busybox-cvs mailing list