From 071c198c0f503b2d6de36e7f7325a7e13dcdf469 Mon Sep 17 00:00:00 2001 From: Scott James Remnant Date: Thu, 6 May 2004 23:06:31 +0000 Subject: [PATCH] Remove restriction that package names be at least two characters long. --- ChangeLog | 5 +++++ debian/changelog | 2 ++ lib/parsehelp.c | 1 - scripts/cl-debian.pl | 2 +- scripts/dpkg-source.pl | 4 ++-- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index b6c03379..d05193be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Fri May 7 00:04:28 BST 2004 Scott James Remnant + + * lib/parsehelp.c, scripts/dpkg-source.pl, scripts/cl-debian.pl: Remove + restriction that package names be at least two characters long. + Thu May 6 23:57:52 BST 2004 Andrew Shugg * utils/md5sum.c: Add support for DOS line-endings (\r\n). diff --git a/debian/changelog b/debian/changelog index c5f5179c..a5d508c1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -9,6 +9,8 @@ dpkg (1.10.22) unstable; urgency=low * Fix segfault when "gcc -dumpmachine" returns a non-matching triplet. Closes: #211850. * Add support for DOS line-endings to md5sum. Closes: #246103. + * Remove restriction that package names be at least two characters long. + Closes: #237734. * Correct 'n' and 'p' key descriptions in dselect help message. Closes: #120562. * Stop hardcoding the list of manual page languages in debian/rules, diff --git a/lib/parsehelp.c b/lib/parsehelp.c index 9478445b..dbdff0fb 100644 --- a/lib/parsehelp.c +++ b/lib/parsehelp.c @@ -112,7 +112,6 @@ const char *illegal_packagename(const char *p, const char **ep) { if (!*p) return _("may not be empty string"); if (!isalnum(*p)) return _("must start with an alphanumeric"); - if (!*++p) return _("must be at least two characters"); while ((c= *p++)!=0) if (!isalnum(c) && !strchr(alsoallowed,c)) break; if (!c) return NULL; diff --git a/scripts/cl-debian.pl b/scripts/cl-debian.pl index e6a4d162..b3db0033 100755 --- a/scripts/cl-debian.pl +++ b/scripts/cl-debian.pl @@ -52,7 +52,7 @@ $expect='first heading'; while () { s/\s*\n$//; # printf(STDERR "%-39.39s %-39.39s\n",$expect,$_); - if (m/^(\w[-+0-9a-z.]+) \(([^\(\) \t]+)\)((\s+[-0-9a-z]+)+)\;/i) { + if (m/^(\w[-+0-9a-z.]*) \(([^\(\) \t]+)\)((\s+[-0-9a-z]+)+)\;/i) { if ($expect eq 'first heading') { $f{'Source'}= $1; $f{'Version'}= $2; diff --git a/scripts/dpkg-source.pl b/scripts/dpkg-source.pl index 70a6281d..5efc2c60 100755 --- a/scripts/dpkg-source.pl +++ b/scripts/dpkg-source.pl @@ -530,8 +530,8 @@ if ($opmode eq 'build') { $sourcepackage= $fi{'S Source'}; $sourcepackage =~ m/[^-+.0-9a-z]/ && &error("source package name contains illegal character \`$&'"); - $sourcepackage =~ m/^[0-9a-z]./ || - &error("source package name is too short or starts with non-alphanum"); + $sourcepackage =~ m/^[0-9a-z]/ || + &error("source package name starts with non-alphanum"); $version= $fi{'S Version'}; $version =~ m/[^-+:.0-9a-zA-Z~]/ && -- 2.39.5