[Lunar-bugs] [Lunar Linux 0000308]: /var/state/lunar/packages never updates if empty.

Lunar bug reports list lunar-bugs at lunar-linux.org
Sun Nov 18 00:39:29 CET 2007


The following issue has been SUBMITTED. 
====================================================================== 
http://bugs.lunar-linux.org/view.php?id=308 
====================================================================== 
Reported By:                Striker
Assigned To:                sofar
====================================================================== 
Project:                    Lunar Linux
Issue ID:                   308
Category:                   theedge
Reproducibility:            always
Severity:                   minor
Priority:                   low
Status:                     assigned
Moonbase Version:           20071117-SVN 
Core Tools:                 Theedge 
Core Tools Version:         20070307 
====================================================================== 
Date Submitted:             11-18-2007 00:39 CET
Last Modified:              11-18-2007 00:39 CET
====================================================================== 
Summary:                    /var/state/lunar/packages never updates if empty.
Description: 
Some bad logic within the add_module function causes it to fail permanently
and silently whenever the packages file is empty (I'm playing with a 32bit
chroot).

The culprit is on line 512 of modules.lunar in the add_module function:

  grep -v "^$1:" $MODULE_STATUS_BACKUP > $MODULE_STATUS 2>/dev/null &&

The logic in the line is such that if the file is empty, and since the -v
switch is used on grep, there are *no* matching lines, and grep returns a
non-zero status in turn causing the entire function to exit before it
inserts the new module information into the file.
====================================================================== 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
11-18-07 00:39  Striker        New Issue                                    
11-18-07 00:39  Striker        Status                   new => assigned     
11-18-07 00:39  Striker        Assigned To               => sofar           
11-18-07 00:39  Striker        Moonbase Version          => 20071117-SVN    
11-18-07 00:39  Striker        Core Tools                => Theedge         
11-18-07 00:39  Striker        Core Tools Version        => 20070307        
======================================================================



More information about the Lunar-bugs mailing list