Selaa lähdekoodia

dpkg (1.13.4) experimental; urgency=low

  The "Or the Wabbit gets it" Release

  * Add -L option to dpkg-architecture to list architecture strings
    we can accept.

 -- Scott James Remnant <scott@netsplit.com>  Tue, 29 Mar 2005 13:31:15 +0100
Scott James Remnant 21 vuotta sitten
vanhempi
commit
f508767236
7 muutettua tiedostoa jossa 73 lisäystä ja 23 poistoa
  1. 24 0
      ChangeLog
  2. 11 11
      configure
  3. 1 1
      configure.ac
  4. 10 1
      debian/changelog
  5. 1 1
      m4/arch.m4
  6. 4 1
      man/C/dpkg-architecture.1
  7. 22 8
      scripts/dpkg-architecture.pl

+ 24 - 0
ChangeLog

@@ -1,5 +1,29 @@
+2005-03-29  Scott James Remnant  <scott@netsplit.com>
+
+	* configure.ac: Release 1.13.4.
+
+2005-03-28  Scott James Remnant  <scott@netsplit.com>
+
+	* scripts/dpkg-architecture.pl: Catch -L and list every possible
+	os and cpu combination.
+	(usageversion): Add -L option to description.
+	(read_cputable): Add in-order list of cpu values to @cpu array.
+	(read_ostable): Add in-order list of os values to @os array.
+	* man/C/dpkg-architecture.1: Document -L option.
+
+2005-03-27  Scott James Remnant  <scott@netsplit.com>
+
+	* m4/arch.m4 (DPKG_OS_TYPE): Allow a vendor to appear at the start
+	of $os_type.
+	* scripts/dpkg-architecture.pl (gnu_to_debian): Don't strip the
+	vendor out, just allow it to appear at the start of the string.
+
 2005-03-21  Scott James Remnant  <scott@netsplit.com>
 2005-03-21  Scott James Remnant  <scott@netsplit.com>
 
 
+	* configure.ac: Bump version to 1.13.4~.
+
+	* configure.ac: Release 1.13.3.
+
 	* scripts/controllib.pl (unknown): Output field name we have in
 	* scripts/controllib.pl (unknown): Output field name we have in
 	hand, rather than trying to look it up in a dictionary in which
 	hand, rather than trying to look it up in a dictionary in which
 	it doesn't exist yet.
 	it doesn't exist yet.

+ 11 - 11
configure

@@ -1,6 +1,6 @@
 #! /bin/sh
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.59 for dpkg 1.13.3.
+# Generated by GNU Autoconf 2.59 for dpkg 1.13.4.
 #
 #
 # Report bugs to <debian-dpkg@lists.debian.org>.
 # Report bugs to <debian-dpkg@lists.debian.org>.
 #
 #
@@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 # Identity of this package.
 PACKAGE_NAME='dpkg'
 PACKAGE_NAME='dpkg'
 PACKAGE_TARNAME='dpkg'
 PACKAGE_TARNAME='dpkg'
-PACKAGE_VERSION='1.13.3'
-PACKAGE_STRING='dpkg 1.13.3'
+PACKAGE_VERSION='1.13.4'
+PACKAGE_STRING='dpkg 1.13.4'
 PACKAGE_BUGREPORT='debian-dpkg@lists.debian.org'
 PACKAGE_BUGREPORT='debian-dpkg@lists.debian.org'
 
 
 ac_unique_file="lib/dpkg.h"
 ac_unique_file="lib/dpkg.h"
@@ -816,7 +816,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
   cat <<_ACEOF
-\`configure' configures dpkg 1.13.3 to adapt to many kinds of systems.
+\`configure' configures dpkg 1.13.4 to adapt to many kinds of systems.
 
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
 
@@ -883,7 +883,7 @@ fi
 
 
 if test -n "$ac_init_help"; then
 if test -n "$ac_init_help"; then
   case $ac_init_help in
   case $ac_init_help in
-     short | recursive ) echo "Configuration of dpkg 1.13.3:";;
+     short | recursive ) echo "Configuration of dpkg 1.13.4:";;
    esac
    esac
   cat <<\_ACEOF
   cat <<\_ACEOF
 
 
@@ -1037,7 +1037,7 @@ fi
 test -n "$ac_init_help" && exit 0
 test -n "$ac_init_help" && exit 0
 if $ac_init_version; then
 if $ac_init_version; then
   cat <<\_ACEOF
   cat <<\_ACEOF
-dpkg configure 1.13.3
+dpkg configure 1.13.4
 generated by GNU Autoconf 2.59
 generated by GNU Autoconf 2.59
 
 
 Copyright (C) 2003 Free Software Foundation, Inc.
 Copyright (C) 2003 Free Software Foundation, Inc.
@@ -1051,7 +1051,7 @@ cat >&5 <<_ACEOF
 This file contains any messages produced by compilers while
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 running configure, to aid debugging if configure makes a mistake.
 
 
-It was created by dpkg $as_me 1.13.3, which was
+It was created by dpkg $as_me 1.13.4, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
 
   $ $0 $@
   $ $0 $@
@@ -1534,7 +1534,7 @@ _ACEOF
 
 
 echo "$as_me:$LINENO: checking dpkg operating system type" >&5
 echo "$as_me:$LINENO: checking dpkg operating system type" >&5
 echo $ECHO_N "checking dpkg operating system type... $ECHO_C" >&6
 echo $ECHO_N "checking dpkg operating system type... $ECHO_C" >&6
-os_type="`awk \"! /^(#.*)?\\$/ { if (match(\\\"$target_os\\\", \\\"^\\\"\\$3\\\"\\$\\\")) { print \\$1; exit; } }\" $srcdir/ostable`"
+os_type="`awk \"! /^(#.*)?\\$/ { if (match(\\\"$target_os\\\", \\\"^(.*-)?\\\"\\$3\\\"\\$\\\")) { print \\$1; exit; } }\" $srcdir/ostable`"
 if test "x$os_type" = "x"; then
 if test "x$os_type" = "x"; then
 	os_type=$target_os
 	os_type=$target_os
 	echo "$as_me:$LINENO: result: $os_type" >&5
 	echo "$as_me:$LINENO: result: $os_type" >&5
@@ -1841,7 +1841,7 @@ fi
 
 
 # Define the identity of the package.
 # Define the identity of the package.
  PACKAGE='dpkg'
  PACKAGE='dpkg'
- VERSION='1.13.3'
+ VERSION='1.13.4'
 
 
 
 
 cat >>confdefs.h <<_ACEOF
 cat >>confdefs.h <<_ACEOF
@@ -15388,7 +15388,7 @@ _ASBOX
 } >&5
 } >&5
 cat >&5 <<_CSEOF
 cat >&5 <<_CSEOF
 
 
-This file was extended by dpkg $as_me 1.13.3, which was
+This file was extended by dpkg $as_me 1.13.4, which was
 generated by GNU Autoconf 2.59.  Invocation command line was
 generated by GNU Autoconf 2.59.  Invocation command line was
 
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_FILES    = $CONFIG_FILES
@@ -15451,7 +15451,7 @@ _ACEOF
 
 
 cat >>$CONFIG_STATUS <<_ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 ac_cs_version="\\
 ac_cs_version="\\
-dpkg config.status 1.13.3
+dpkg config.status 1.13.4
 configured by $0, generated by GNU Autoconf 2.59,
 configured by $0, generated by GNU Autoconf 2.59,
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
 
 

+ 1 - 1
configure.ac

@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 # Process this file with autoconf to produce a configure script.
 
 
 AC_PREREQ(2.59)
 AC_PREREQ(2.59)
-AC_INIT([dpkg], [1.13.3], [debian-dpkg@lists.debian.org])
+AC_INIT([dpkg], [1.13.4], [debian-dpkg@lists.debian.org])
 AC_CONFIG_SRCDIR([lib/dpkg.h])
 AC_CONFIG_SRCDIR([lib/dpkg.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_MACRO_DIR([m4])
 
 

+ 10 - 1
debian/changelog

@@ -1,6 +1,15 @@
+dpkg (1.13.4) experimental; urgency=low
+  
+  The "Or the Wabbit gets it" Release
+
+  * Add -L option to dpkg-architecture to list architecture strings
+    we can accept.
+
+ -- Scott James Remnant <scott@netsplit.com>  Tue, 29 Mar 2005 13:31:15 +0100
+
 dpkg (1.13.3) experimental; urgency=low
 dpkg (1.13.3) experimental; urgency=low
   
   
-  The "Paying off Karma at a vastly acclerated rate" Release.
+  The "Paying off Karma at a vastly accelerated rate" Release.
 
 
   * Missing newline added to warning output function.  Closes: #283798.
   * Missing newline added to warning output function.  Closes: #283798.
   * Fixed prototype warning in dpkg-scansources.  Closes: #213577, #219760,
   * Fixed prototype warning in dpkg-scansources.  Closes: #213577, #219760,

+ 1 - 1
m4/arch.m4

@@ -22,7 +22,7 @@ AC_DEFINE_UNQUOTED(ARCHITECTURE_CPU, "${cpu_type}",
 # special cases to determine what type it is.  Sets ARCHITECTURE_OS.
 # special cases to determine what type it is.  Sets ARCHITECTURE_OS.
 AC_DEFUN([DPKG_OS_TYPE],
 AC_DEFUN([DPKG_OS_TYPE],
 [AC_MSG_CHECKING([dpkg operating system type])
 [AC_MSG_CHECKING([dpkg operating system type])
-[os_type="`awk \"! /^(#.*)?\\$/ { if (match(\\\"$target_os\\\", \\\"^\\\"\\$][3\\\"\\$\\\")) { print \\$][1; exit; } }\" $srcdir/ostable`"]
+[os_type="`awk \"! /^(#.*)?\\$/ { if (match(\\\"$target_os\\\", \\\"^(.*-)?\\\"\\$][3\\\"\\$\\\")) { print \\$][1; exit; } }\" $srcdir/ostable`"]
 if test "x$os_type" = "x"; then
 if test "x$os_type" = "x"; then
 	os_type=$target_os
 	os_type=$target_os
 	AC_MSG_RESULT([$os_type])
 	AC_MSG_RESULT([$os_type])

+ 4 - 1
man/C/dpkg-architecture.1

@@ -11,7 +11,8 @@ Valid options:
 \&\fB\-f\fR
 \&\fB\-f\fR
 .PP
 .PP
 Valid actions:
 Valid actions:
-\&\fB\-l\fR, \fB\-q\fRVariable\-Name, \fB\-s\fR, \fB\-u\fR, \fB\-c\fR Command
+\&\fB\-l\fR, \fB\-q\fRVariable\-Name, \fB\-s\fR, \fB\-u\fR, \fB\-c\fR Command,
+\fB\-L\fR
 .SH "DESCRIPTION"
 .SH "DESCRIPTION"
 .IX Header "DESCRIPTION"
 .IX Header "DESCRIPTION"
 dpkg-architecture does provide a facility to determine and set the build and
 dpkg-architecture does provide a facility to determine and set the build and
@@ -36,6 +37,8 @@ does return a similar command to unset all variables. \fB\-c\fR does execute a
 command in an environment which has all variables set to the determined
 command in an environment which has all variables set to the determined
 value.
 value.
 .PP
 .PP
+A list of valid architecture names can be printed with the \fB\-L\fR action.
+.PP
 Existing environment variables with the same name as used by the scripts are
 Existing environment variables with the same name as used by the scripts are
 not overwritten, except if the \fB\-f\fR force flag is present. This allows the user
 not overwritten, except if the \fB\-f\fR force flag is present. This allows the user
 to override a value even when the call to dpkg-architecture is buried in
 to override a value even when the call to dpkg-architecture is buried in

+ 22 - 8
scripts/dpkg-architecture.pl

@@ -41,6 +41,7 @@ Usage:
 Options:
 Options:
        -a<debian-arch>    set Debian architecture
        -a<debian-arch>    set Debian architecture
        -t<gnu-system>     set GNU system type 
        -t<gnu-system>     set GNU system type 
+       -L                 list valid architectures
        -f                 force flag (override variables set in environment)
        -f                 force flag (override variables set in environment)
 Actions:
 Actions:
        -l                 list variables (default)
        -l                 list variables (default)
@@ -58,6 +59,7 @@ sub read_cputable {
 	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
 	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
 	    $cputable{$1} = $2;
 	    $cputable{$1} = $2;
 	    $cputable_re{$1} = $3;
 	    $cputable_re{$1} = $3;
+	    push @cpu, $1;
 	}
 	}
     }
     }
     close CPUTABLE;
     close CPUTABLE;
@@ -70,6 +72,7 @@ sub read_ostable {
 	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
 	if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) {
 	    $ostable{$1} = $2;
 	    $ostable{$1} = $2;
 	    $ostable_re{$1} = $3;
 	    $ostable_re{$1} = $3;
+	    push @os, $1;
 	}
 	}
     }
     }
     close OSTABLE;
     close OSTABLE;
@@ -96,13 +99,8 @@ sub debian_to_gnu {
 sub split_gnu {
 sub split_gnu {
     local ($_) = @_;
     local ($_) = @_;
 
 
-    # Nuke the vendor bit
-    if (/^([^-]*)-([^-]*)-([^-]*-.*)/) {
-	return ($1, $3);
-    } else {
-	/^([^-]*)-(.*)/;
-	return ($1, $2);
-    }
+    /^([^-]*)-(.*)/;
+    return ($1, $2);
 }
 }
 
 
 sub gnu_to_debian {
 sub gnu_to_debian {
@@ -119,7 +117,7 @@ sub gnu_to_debian {
     }
     }
 
 
     foreach $a (keys %ostable_re) {
     foreach $a (keys %ostable_re) {
-	if ($gnu_os =~ /^$ostable_re{$a}$/) {
+	if ($gnu_os =~ /^(.*-)?$ostable_re{$a}$/) {
 	    $os = $a;
 	    $os = $a;
 	    last;
 	    last;
 	}
 	}
@@ -136,6 +134,20 @@ sub gnu_to_debian {
 &read_cputable;
 &read_cputable;
 &read_ostable;
 &read_ostable;
 
 
+# Check for -L
+if (grep { m/^-L$/ } @ARGV) {
+    foreach $os (@os) {
+	foreach $cpu (@cpu) {
+	    if ($os eq "linux") {
+		print "$cpu\n"
+	    } else {
+		print "$os-$cpu\n";
+	    }
+	}
+    }
+    exit unless $#ARGV;
+}
+
 # Set default values:
 # Set default values:
 
 
 chomp ($deb_build_arch = `dpkg --print-architecture`);
 chomp ($deb_build_arch = `dpkg --print-architecture`);
@@ -190,6 +202,8 @@ while (@ARGV) {
     } elsif (m/^-c$/) {
     } elsif (m/^-c$/) {
        $action = 'c';
        $action = 'c';
        last;
        last;
+    } elsif (m/^-L$/) {
+       # Handled already
     } else {
     } else {
 	usageerr("unknown option \`$_'");
 	usageerr("unknown option \`$_'");
     }
     }