[bug-notifications] [cswutils 0002869]: createpkg and checkpkg exit with \'ERROR: $software must be all lowercase\', even if the software name _is_ all lowercase.

Mantis Bug Tracker noreply at opencsw.org
Fri Aug 7 20:39:48 CEST 2009


A NOTE has been added to this issue. 
====================================================================== 
http://www.opencsw.org/bugtrack/view.php?id=2869 
====================================================================== 
Reported By:                clarkema
Assigned To:                
====================================================================== 
Project:                    cswutils
Issue ID:                   2869
Category:                   regular use
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
====================================================================== 
Date Submitted:             2008-04-29 09:46 CEST
Last Modified:              2009-08-07 20:39 CEST
====================================================================== 
Summary:                    createpkg and checkpkg exit with \'ERROR: $software
must be all lowercase\', even if the software name _is_ all lowercase.
Description: 
clarkema at desktop03:~/sgdsync/solaris> cat /etc/release

                       Solaris 10 8/07 s10s_u4wos_12b SPARC
           Copyright 2007 Sun Microsystems, Inc.  All Rights Reserved.
                        Use is subject to license terms.
                            Assembled 16 August 2007

clarkema at desktop03:~/sgdsync/solaris> grep NAME
pkginfo 
NAME=sgdsync - SGD application and server management tool.
clarkema at desktop03:~/sgdsync/solaris> createpkg -r ..
i copyright
ERROR: sgdsync must be all lowercase
====================================================================== 

---------------------------------------------------------------------- 
 (0006534) james (reporter) - 2009-08-07 20:39
 http://www.opencsw.org/bugtrack/view.php?id=2869#c6534 
---------------------------------------------------------------------- 
Please fix this, I'm sick of editing checkpkg and createpkg.

Below is a fix based on typeset.  I can't see why the [A-Z] does not
always work, it could be something to do with charsets, LC, LANGs, whatever
typeset works everywhere for me, including with accented chars: 'É'
(compose E '), probably want to block anything that isn't "[a-z]*" and not
just upper anyway!

isLower(){
	typeset -l LOWER=$1
	[ "$LOWER" = "$1" ]
}


if ! isLower $SOFTWARE ; then
       echo ERROR: $SOFTNAME must be all lowercase
       exit 1
fi




More information about the bug-notifications mailing list