From f508767236142541861ece120a5822d77cdb58e5 Mon Sep 17 00:00:00 2001 From: Scott James Remnant Date: Tue, 29 Mar 2005 13:31:15 +0100 Subject: [PATCH] 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 Tue, 29 Mar 2005 13:31:15 +0100 --- ChangeLog | 24 ++++++++++++++++++++++++ configure | 22 +++++++++++----------- configure.ac | 2 +- debian/changelog | 11 ++++++++++- m4/arch.m4 | 2 +- man/C/dpkg-architecture.1 | 5 ++++- scripts/dpkg-architecture.pl | 30 ++++++++++++++++++++++-------- 7 files changed, 73 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19176309..0eec14c1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,29 @@ +2005-03-29 Scott James Remnant + + * configure.ac: Release 1.13.4. + +2005-03-28 Scott James Remnant + + * 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 + + * 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 + * configure.ac: Bump version to 1.13.4~. + + * configure.ac: Release 1.13.3. + * scripts/controllib.pl (unknown): Output field name we have in hand, rather than trying to look it up in a dictionary in which it doesn't exist yet. diff --git a/configure b/configure index 615fa100..01d3fd8e 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # 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 . # @@ -269,8 +269,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='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' 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. # This message is too long to be a string in the A/UX 3.1 sh. 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]... @@ -883,7 +883,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of dpkg 1.13.3:";; + short | recursive ) echo "Configuration of dpkg 1.13.4:";; esac cat <<\_ACEOF @@ -1037,7 +1037,7 @@ fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF -dpkg configure 1.13.3 +dpkg configure 1.13.4 generated by GNU Autoconf 2.59 Copyright (C) 2003 Free Software Foundation, Inc. @@ -1051,7 +1051,7 @@ cat >&5 <<_ACEOF This file contains any messages produced by compilers while 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 $ $0 $@ @@ -1534,7 +1534,7 @@ _ACEOF echo "$as_me:$LINENO: checking dpkg operating system type" >&5 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 os_type=$target_os echo "$as_me:$LINENO: result: $os_type" >&5 @@ -1841,7 +1841,7 @@ fi # Define the identity of the package. PACKAGE='dpkg' - VERSION='1.13.3' + VERSION='1.13.4' cat >>confdefs.h <<_ACEOF @@ -15388,7 +15388,7 @@ _ASBOX } >&5 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 CONFIG_FILES = $CONFIG_FILES @@ -15451,7 +15451,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ -dpkg config.status 1.13.3 +dpkg config.status 1.13.4 configured by $0, generated by GNU Autoconf 2.59, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" diff --git a/configure.ac b/configure.ac index 0319d477..745a5e8a 100644 --- a/configure.ac +++ b/configure.ac @@ -1,7 +1,7 @@ # Process this file with autoconf to produce a configure script. 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_MACRO_DIR([m4]) diff --git a/debian/changelog b/debian/changelog index 2a0bb7c9..04bd24ef 100644 --- a/debian/changelog +++ b/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 Tue, 29 Mar 2005 13:31:15 +0100 + 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. * Fixed prototype warning in dpkg-scansources. Closes: #213577, #219760, diff --git a/m4/arch.m4 b/m4/arch.m4 index a27ef4ac..a18aa070 100644 --- a/m4/arch.m4 +++ b/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. AC_DEFUN([DPKG_OS_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 os_type=$target_os AC_MSG_RESULT([$os_type]) diff --git a/man/C/dpkg-architecture.1 b/man/C/dpkg-architecture.1 index 465f5004..cf10c258 100644 --- a/man/C/dpkg-architecture.1 +++ b/man/C/dpkg-architecture.1 @@ -11,7 +11,8 @@ Valid options: \&\fB\-f\fR .PP 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" .IX Header "DESCRIPTION" 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 value. .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 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 diff --git a/scripts/dpkg-architecture.pl b/scripts/dpkg-architecture.pl index 63005b7b..508b36d2 100755 --- a/scripts/dpkg-architecture.pl +++ b/scripts/dpkg-architecture.pl @@ -41,6 +41,7 @@ Usage: Options: -a set Debian architecture -t set GNU system type + -L list valid architectures -f force flag (override variables set in environment) Actions: -l list variables (default) @@ -58,6 +59,7 @@ sub read_cputable { if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) { $cputable{$1} = $2; $cputable_re{$1} = $3; + push @cpu, $1; } } close CPUTABLE; @@ -70,6 +72,7 @@ sub read_ostable { if (m/^(?!\#)(\S+)\s+(\S+)\s+(\S+)/) { $ostable{$1} = $2; $ostable_re{$1} = $3; + push @os, $1; } } close OSTABLE; @@ -96,13 +99,8 @@ sub debian_to_gnu { sub split_gnu { local ($_) = @_; - # Nuke the vendor bit - if (/^([^-]*)-([^-]*)-([^-]*-.*)/) { - return ($1, $3); - } else { - /^([^-]*)-(.*)/; - return ($1, $2); - } + /^([^-]*)-(.*)/; + return ($1, $2); } sub gnu_to_debian { @@ -119,7 +117,7 @@ sub gnu_to_debian { } foreach $a (keys %ostable_re) { - if ($gnu_os =~ /^$ostable_re{$a}$/) { + if ($gnu_os =~ /^(.*-)?$ostable_re{$a}$/) { $os = $a; last; } @@ -136,6 +134,20 @@ sub gnu_to_debian { &read_cputable; &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: chomp ($deb_build_arch = `dpkg --print-architecture`); @@ -190,6 +202,8 @@ while (@ARGV) { } elsif (m/^-c$/) { $action = 'c'; last; + } elsif (m/^-L$/) { + # Handled already } else { usageerr("unknown option \`$_'"); } -- 2.39.5