Explorar o código

Remove restriction that package names be at least two characters long.

Scott James Remnant %!s(int64=22) %!d(string=hai) anos
pai
achega
071c198c0f
Modificáronse 5 ficheiros con 10 adicións e 4 borrados
  1. 5 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 0 1
      lib/parsehelp.c
  4. 1 1
      scripts/cl-debian.pl
  5. 2 2
      scripts/dpkg-source.pl

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+Fri May 7 00:04:28 BST 2004 Scott James Remnant <scott@netsplit.com>
+
+  * 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 <andrew@neep.com.au>
 
   * utils/md5sum.c: Add support for DOS line-endings (\r\n).

+ 2 - 0
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,

+ 0 - 1
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;

+ 1 - 1
scripts/cl-debian.pl

@@ -52,7 +52,7 @@ $expect='first heading';
 while (<STDIN>) {
     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;

+ 2 - 2
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~]/ &&