parsing fails on a package name with no lowercase letters

Bug #1092290 reported by Peter Budny
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
g-CTAN
New
Undecided
Unassigned

Bug Description

In create_package_list(), the following at line 46:

for oldpacks in $(sed -e "/^.*[a-z].*/d" "${TLPDBDIR}"/package.names)

is troublesome when there is a package name that contains no letters. I found one such package to be "GS1". This will cause line 48:

if [ ${oldpacks} -lt ${G_RR} ]

to fail with the message:

/usr/share/g-ctan/fetch: line 48: [: GS1: integer expression expected

Fix:

Change the sed expression from

"/^.*[a-z].*/d"

to

"/^.*[a-zA-Z].*/d"

(Although I'm not sure why it isn't more restrictive, i.e. actually looking for "^name [a-zA-Z0-9]+$")

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.