From: Ian Jackson Date: Thu, 1 Aug 1996 01:46:34 +0000 (+0100) Subject: dpkg (1.2.13) unstable; urgency=LOW X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90d5c6916aefd17aa016ceb5010e105afa41e515;p=dpkg dpkg (1.2.13) unstable; urgency=LOW * dpkg --search produces correct output for diversions. * dpkg-name remove unnecessary arch missing warning. (Bug#3482.) * dpkg-deb --build warns about uppercase chars in package name. * dpkg-scanpackages error messages updated and manpage provided (thanks to Michael Shields). * dpkg-scanpackages warns about spurious entries in override file. * dpkg-scanpackages `noverride' renamed to `override' everywhere. * dpkg-scanpackages field ordering to put Architecture higher. * dpkg-scanpackages field names capitalised appropriately. * dpkg-scanpackages invokes find with -follow. (Bug#3956.) * guidelines say #!/usr/bin/perl everywhere, not #!/bin/perl. * Many developers' PGP keys added. * configure script uses ${CC} instead of $(CC) (again :-/). * developers' keys included in dpkg source tree and /usr/doc. * configure remade using autoconf 2.10-3 (was 2.4-1). -- Ian Jackson Thu, 1 Aug 1996 02:46:34 +0100 --- diff --git a/TODO b/TODO index 4cf706ac..5f461ba1 100644 --- a/TODO +++ b/TODO @@ -20,6 +20,8 @@ urgent * remove old docs from /usr/doc/dpkg. other stuff unlikely to get done soon + * Automatically remove .gz if can't be found ? + * Local version number (using non-numeric epoch, perhaps ?) * Filename field generated by --record-avail handle split packages somehow. * understand Replaces in dselect * provide way for package to declare ownership of files for dpkg -S @@ -46,6 +48,7 @@ other stuff unlikely to get done soon * --purge remove empty directories which used too contain conffiles * conffiles handling options, including `replace removed files' * `diff' option at conffile prompt + * dpkg --query | -Q done * highlight or pre-sort or something new or changed packages, diff --git a/configure b/configure index fd38b74d..d0764eab 100755 --- a/configure +++ b/configure @@ -1,8 +1,8 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.4 -# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# Generated automatically using autoconf version 2.10 +# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. @@ -40,9 +40,22 @@ target=NONE verbose= x_includes=NONE x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' # Initialize some other variables. subdirs= +MFLAGS= MAKEFLAGS= ac_prev= for ac_option @@ -64,9 +77,14 @@ do case "$ac_option" in - -build | --build | --buil | --bui | --bu | --b) + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) ac_prev=build ;; - -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*) + -build=* | --build=* | --buil=* | --bui=* | --bu=*) build="$ac_optarg" ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ @@ -76,6 +94,12 @@ do | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file="$ac_optarg" ;; + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + -disable-* | --disable-*) ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` # Reject names that are not valid shell variable names. @@ -126,12 +150,29 @@ Configuration: Directory and file names: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] - --exec-prefix=PREFIX install architecture-dependent files in PREFIX + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] --srcdir=DIR find the sources in DIR [configure dir or ..] --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names - --program-transform-name=PROGRAM run sed PROGRAM on installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF Host type: --build=BUILD configure for building on BUILD [BUILD=HOST] --host=HOST configure for HOST [guessed] @@ -143,8 +184,10 @@ Features and packages: --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR ---enable and --with options recognized:$ac_help EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi exit 0 ;; -host | --host | --hos | --ho) @@ -152,6 +195,44 @@ EOF -host=* | --host=* | --hos=* | --ho=*) host="$ac_optarg" ;; + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; @@ -164,6 +245,15 @@ EOF | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) @@ -204,6 +294,23 @@ EOF | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) @@ -214,6 +321,13 @@ EOF -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir="$ac_optarg" ;; + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) @@ -223,7 +337,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.4" + echo "configure generated by autoconf version 2.10" exit 0 ;; -with-* | --with-*) @@ -269,7 +383,7 @@ EOF -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } ;; - *) + *) if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then echo "configure: warning: $ac_option: invalid host type" 1>&2 fi @@ -389,8 +503,8 @@ fi ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' -ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -427,7 +541,6 @@ else fi done IFS="$ac_save_ifs" - test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" fi fi CC="$ac_cv_prog_CC" @@ -437,6 +550,55 @@ else echo "$ac_t""no" 1>&6 fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + ac_prog_rejected=no + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + break + fi + done + IFS="$ac_save_ifs" +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# -gt 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + set dummy "$ac_dir/$ac_word" "$@" + shift + ac_cv_prog_CC="$@" + fi +fi +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } +fi echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then @@ -447,12 +609,13 @@ else yes; #endif EOF -if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:613: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no fi fi + echo "$ac_t""$ac_cv_prog_gcc" 1>&6 if test $ac_cv_prog_gcc = yes; then GCC=yes @@ -470,7 +633,8 @@ fi rm -f conftest* fi - echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 + +echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6 if test $ac_cv_prog_gcc_g = yes; then CFLAGS="-g -O" else @@ -525,12 +689,13 @@ else yes; #endif EOF -if ${CXX-g++} -E conftest.C 2>&5 | egrep yes >/dev/null 2>&1; then +if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:693: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gxx=yes else ac_cv_prog_gxx=no fi fi + echo "$ac_t""$ac_cv_prog_gxx" 1>&6 if test $ac_cv_prog_gxx = yes; then GXX=yes @@ -548,7 +713,8 @@ fi rm -f conftest* fi - echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6 + +echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6 if test $ac_cv_prog_gxx_g = yes; then CXXFLAGS="-g -O" else @@ -563,8 +729,8 @@ fi dpkg_archset='' # Check whether --with-arch or --without-arch was given. -withval="$with_arch" -if test -n "$withval"; then +if test "${with_arch+set}" = set; then + withval="$with_arch" if test "x$with_arch" = x; then { echo "configure: error: --with-arch requires an architecture name" 1>&2; exit 1; } @@ -583,7 +749,7 @@ else if test "x$dpkg_arch" != x; then dpkg_archwhy=" (obtained from dpkg)" elif test "${GCC-no}" = yes; then - dpkg_arch="`$(CC) --print-libgcc-file-name | + dpkg_arch="`${CC} --print-libgcc-file-name | sed -e 's,^.*/gcc-lib/,,; s,/libgcc\.a$,,; s,/[0-9.][0-9.]*$,,; s/-.*$//'`" if test "x`echo \"$dpkg_arch\" | tr -d a-z0-9-`" != x -o "x$dpkg_arch" = x then @@ -649,8 +815,8 @@ EOF fi # Check whether --with-newdeb or --without-newdeb was given. -withval="$with_newdeb" -if test -n "$withval"; then +if test "${with_newdeb+set}" = set; then + withval="$with_newdeb" cat >> confdefs.h <<\EOF #define BUILDOLDPKGFORMAT 0 EOF @@ -658,8 +824,8 @@ EOF fi # Check whether --with-olddeb or --without-olddeb was given. -withval="$with_olddeb" -if test -n "$withval"; then +if test "${with_olddeb+set}" = set; then + withval="$with_olddeb" cat >> confdefs.h <<\EOF #define BUILDOLDPKGFORMAT 1 EOF @@ -722,12 +888,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -736,12 +903,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -770,11 +938,11 @@ else ac_cv_c_cross=yes else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_cross=no else @@ -783,22 +951,24 @@ fi fi rm -fr conftest* fi -cross_compiling=$ac_cv_c_cross + echo "$ac_t""$ac_cv_c_cross" 1>&6 +cross_compiling=$ac_cv_c_cross echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include #include #include EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:972: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -813,7 +983,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -831,7 +1001,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -849,10 +1019,10 @@ fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then - ac_cv_header_stdc=no + : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -863,7 +1033,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -eval $ac_link +{ (eval echo configure:1037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then : else @@ -873,6 +1043,7 @@ fi rm -fr conftest* fi fi + echo "$ac_t""$ac_cv_header_stdc" 1>&6 if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF @@ -939,10 +1110,17 @@ else esac done IFS="$ac_save_ifs" - # As a last resort, use the slow shell script. - test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh" + fi - INSTALL="$ac_cv_path_install" + if test "${ac_cv_path_install+set}" = set; then + INSTALL="$ac_cv_path_install" + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL="$ac_install_sh" + fi fi echo "$ac_t""$INSTALL" 1>&6 @@ -985,7 +1163,7 @@ if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1016,7 +1194,7 @@ if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1047,7 +1225,7 @@ if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -1078,13 +1256,15 @@ if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ -char vprintf(); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char vprintf(); int main() { return 0; } int t() { @@ -1100,7 +1280,7 @@ vprintf(); ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:1284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else @@ -1126,13 +1306,15 @@ if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ -char _doprnt(); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char _doprnt(); int main() { return 0; } int t() { @@ -1148,7 +1330,7 @@ _doprnt(); ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:1334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else @@ -1175,7 +1357,7 @@ if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1235,6 +1417,7 @@ fi rm -f conftest* fi + echo "$ac_t""$ac_cv_c_const" 1>&6 if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF @@ -1250,7 +1433,7 @@ else ac_cv_c_bigendian=unknown # See if sys/param.h defines the BYTE_ORDER macro. cat > conftest.$ac_ext < #include @@ -1262,11 +1445,11 @@ int t() { #endif ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:1449: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* # It does; now see whether it defined to BIG_ENDIAN or not. cat > conftest.$ac_ext < #include @@ -1278,7 +1461,7 @@ int t() { #endif ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:1465: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -1295,7 +1478,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_c_bigendian=no else @@ -1318,6 +1501,7 @@ fi rm -fr conftest* fi fi + echo "$ac_t""$ac_cv_c_bigendian" 1>&6 if test $ac_cv_c_bigendian = yes; then cat >> confdefs.h <<\EOF @@ -1334,7 +1518,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1345,7 +1529,7 @@ main() exit(0); } EOF -eval $ac_link +{ (eval echo configure:1533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_sizeof_unsigned_long=`cat conftestval` else @@ -1368,7 +1552,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1379,7 +1563,7 @@ main() exit(0); } EOF -eval $ac_link +{ (eval echo configure:1567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } if test -s conftest && (./conftest; exit) 2>/dev/null; then ac_cv_sizeof_unsigned_int=`cat conftestval` else @@ -1401,13 +1585,15 @@ if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ -char $ac_func(); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); int main() { return 0; } int t() { @@ -1423,7 +1609,7 @@ $ac_func(); ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:1613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1435,7 +1621,7 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'` + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <&6 else cat > conftest.$ac_ext < EOF -eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1648: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1471,7 +1658,7 @@ rm -f conftest* fi if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 - ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'` + ac_tr_hdr=HAVE_`echo $ac_hdr | tr 'abcdefghijklmnopqrstuvwxyz./\055' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ___'` cat >> confdefs.h <&6 else cat > conftest.$ac_ext < /* Override any gcc2 internal prototype to avoid an error. */ -char sysinfo(); +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sysinfo(); int main() { return 0; } int t() { @@ -1509,7 +1698,7 @@ sysinfo(); ; return 0; } EOF -if eval $ac_link; then +if { (eval echo configure:1702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then rm -rf conftest* eval "ac_cv_func_sysinfo=yes" else @@ -1529,7 +1718,7 @@ else echo "$ac_t""no" 1>&6 echo $ac_n "checking __NR_sysinfo""... $ac_c" 1>&6 cat > conftest.$ac_ext < @@ -1574,7 +1763,7 @@ fi else cat > conftest.$ac_ext < int main() { return 0; } @@ -1582,7 +1771,7 @@ int t() { strcmp("a","b") ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:1775: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_works=yes else @@ -1611,7 +1800,7 @@ fi else cat > conftest.$ac_ext < @@ -1622,7 +1811,7 @@ int t() { alphasort ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:1815: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_header_alphasort=yes else @@ -1654,7 +1843,7 @@ EOF else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_inline=yes else @@ -1694,7 +1883,7 @@ EOF else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_supported=yes else @@ -1728,7 +1917,7 @@ EOF else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_noreturn=yes else @@ -1767,7 +1956,7 @@ EOF else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_attribute_const=yes else @@ -1806,7 +1995,7 @@ EOF else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_attribute_format=yes else @@ -1860,7 +2049,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wall -Wno-implicit -Werror" cat > conftest.$ac_ext < @@ -1873,7 +2062,7 @@ int t() { ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:2066: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_all=yes else @@ -1907,7 +2096,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wwrite-strings -Werror" cat > conftest.$ac_ext < @@ -1920,7 +2109,7 @@ int t() { ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:2113: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_writestrings=yes else @@ -1954,7 +2143,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wpointer-arith -Werror" cat > conftest.$ac_ext < @@ -1967,7 +2156,7 @@ int t() { ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:2160: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_pointerarith=yes else @@ -2001,7 +2190,7 @@ else oldcflags="${CFLAGS-}" CFLAGS="${CFLAGS-} ${CWARNS} -Wimplicit -Wnested-externs -Werror" cat > conftest.$ac_ext < @@ -2014,7 +2203,7 @@ int t() { ; return 0; } EOF -if eval $ac_compile; then +if { (eval echo configure:2207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* dpkg_cv_c_gcc_warn_implicit=yes else @@ -2118,7 +2307,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.4" + echo "$CONFIG_STATUS generated by autoconf version 2.10" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -2132,10 +2321,12 @@ ac_given_INSTALL="$INSTALL" trap 'rm -fr `echo "Makefile dpkg-deb/Makefile lib/Makefile include/Makefile dselect/Makefile split/Makefile methods/Makefile md5sum/Makefile main/Makefile doc/Makefile scripts/Makefile config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\CEOF +# Protect against being on the right side of a sed subst in config.status. +sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g; + s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub s%@CFLAGS@%$CFLAGS%g @@ -2147,6 +2338,18 @@ s%@LIBS@%$LIBS%g s%@exec_prefix@%$exec_prefix%g s%@prefix@%$prefix%g s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g s%@CC@%$CC%g s%@CXX@%$CXX%g s%@perlpath@%$perlpath%g @@ -2256,13 +2459,13 @@ EOF # Transform confdefs.h into a sed script conftest.vals that substitutes # the proper values into config.h.in to produce config.h. And first: -# Protect against being on the right side of a sed subst in config.status. +# Protect against being on the right side of a sed subst in config.status. # Protect against being in an unquoted here document in config.status. rm -f conftest.vals cat > conftest.hdr <<\EOF s/[\\&%]/\\&/g s%[\\$`]%\\&%g -s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp s%ac_d%ac_u%gp s%ac_u%ac_e%gp EOF @@ -2310,6 +2513,12 @@ cat >> $CONFIG_STATUS <<\EOF echo "$ac_file is unchanged" rm -f conftest.h else + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + fi rm -f $ac_file mv conftest.h $ac_file fi diff --git a/configure.in b/configure.in index ecdb8ab7..6c6bd0ad 100644 --- a/configure.in +++ b/configure.in @@ -25,7 +25,7 @@ AC_ARG_WITH(arch, dpkg_archwhy=" (obtained from dpkg)" elif test "${GCC-no}" = yes; then changequote(, )dnl - dpkg_arch="`$(CC) --print-libgcc-file-name | + dpkg_arch="`${CC} --print-libgcc-file-name | sed -e 's,^.*/gcc-lib/,,; s,/libgcc\.a$,,; s,/[0-9.][0-9.]*$,,; s/-.*$//'`" changequote([, ])dnl if test "x`echo \"$dpkg_arch\" | tr -d a-z0-9-`" != x -o "x$dpkg_arch" = x diff --git a/debian.Changelog b/debian.Changelog index 6108845b..a6dcd133 100644 --- a/debian.Changelog +++ b/debian.Changelog @@ -1,3 +1,27 @@ +dpkg (1.2.13) unstable; urgency=LOW + + * dpkg --search produces correct output for diversions. + * dpkg-name remove unnecessary arch missing warning. (Bug#3482.) + + * dpkg-deb --build warns about uppercase chars in package name. + + * dpkg-scanpackages error messages updated and manpage provided + (thanks to Michael Shields). + * dpkg-scanpackages warns about spurious entries in override file. + * dpkg-scanpackages `noverride' renamed to `override' everywhere. + * dpkg-scanpackages field ordering to put Architecture higher. + * dpkg-scanpackages field names capitalised appropriately. + * dpkg-scanpackages invokes find with -follow. (Bug#3956.) + + * guidelines say #!/usr/bin/perl everywhere, not #!/bin/perl. + * Many developers' PGP keys added. + + * configure script uses ${CC} instead of $(CC) (again :-/). + * developers' keys included in dpkg source tree and /usr/doc. + * configure remade using autoconf 2.10-3 (was 2.4-1). + + -- Ian Jackson Thu, 1 Aug 1996 02:46:34 +0100 + dpkg (1.2.12); priority=LOW * dpkg --search and --list understand and comment on diversions. diff --git a/debian.README b/debian.README index d72471bf..0774320b 100644 --- a/debian.README +++ b/debian.README @@ -6,6 +6,7 @@ which is part of Debian. Copyright (C) 1994,1995,1996 Ian Jackson Copyright (C) 1995,1996 Erick Branderhorst Copyright (C) 1996 Kim-Minh Kaplan +Copyright (C) 1996 Michael Shields Copyright (C) 1995 Bruce Perens Copyright (C) 1994 Carl Streeter Copyright (C) 1994 Matt Welsh diff --git a/debian.rules b/debian.rules index d80f9f52..e6552aa7 100755 --- a/debian.rules +++ b/debian.rules @@ -1,7 +1,7 @@ #!/usr/bin/make -f package=dpkg -version=1.2.12 +version=1.2.13 archi=$(shell dpkg --print-architecture) DIR:=$(shell pwd) diff --git a/doc/Makefile.in b/doc/Makefile.in index 91f81186..dc906e19 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -24,7 +24,7 @@ mandir = $(prefix)/man man5dir = $(mandir)/man5 man5 = 5 docdir = $(prefix)/doc -devdocdir = $(docdir)/dpkg +dpkgdocdir = $(docdir)/dpkg DIST = Makefile.in $(SRC) $(MAN) @@ -35,15 +35,15 @@ INSTALL_DATA = @INSTALL_DATA@ MAKEINFO = makeinfo TEXI2DVI = texi2dvi -DEVDOCS= auto-deconfiguration.txt dependency-ordering.txt \ +DPKGDOCS= auto-deconfiguration.txt dependency-ordering.txt \ disappear-replace.txt diversions.text \ essential-flag.txt version-ordering.txt # Files folded into main guidelines document -OBSOLETEDOCS= descriptions.txt upgrades+errors.txt \ +OBSOLETEDOCS= descriptions.txt upgrades+errors.txt developer-keys.pgp \ maintainer-script-args.txt virtual-dependencies.txt -all: $(DEVDOCS) guidelines.info +all: $(DPKGDOCS) guidelines.info guidelines.info: guidelines.texi $(MAKEINFO) $(srcdir)/guidelines.texi @@ -65,7 +65,7 @@ database-structure.monops: database-structure.ps clean: rm -f database-structure.ps database-structure.monops ps - rm -f *.{aux,cp,dvi,fn,ky,log,pg,toc,tp,vr} + rm -f *.{aux,cp,dvi,fn,ky,log,pg,toc,tp,vr,bak} rm -f guidelines.info* distclean: @@ -77,6 +77,6 @@ install: all $(INSTALL_DATA) deb-control.5 $(man5dir)/deb-control.$(man5) $(INSTALL_DATA) guidelines.info guidelines.info-*[0-9] \ $(infodir)/. - set -e; for d in $(DEVDOCS) ; do \ - $(INSTALL_DATA) $$d $(devdocdir)/$$d ; \ + set -e; for d in $(DPKGDOCS) ; do \ + $(INSTALL_DATA) $$d $(dpkgdocdir)/$$d ; \ done diff --git a/doc/developer-keys.bak b/doc/developer-keys.bak new file mode 100644 index 00000000..a62f9c93 Binary files /dev/null and b/doc/developer-keys.bak differ diff --git a/doc/developer-keys.pgp b/doc/developer-keys.pgp new file mode 100644 index 00000000..8e19ee19 Binary files /dev/null and b/doc/developer-keys.pgp differ diff --git a/doc/guidelines.texi b/doc/guidelines.texi index f266b955..f537b81b 100644 --- a/doc/guidelines.texi +++ b/doc/guidelines.texi @@ -360,12 +360,7 @@ All command scripts should have a @code{#!} line naming the shell to be used to interpret them. @item -In the case of Perl scripts this should be @code{#!/usr/bin/perl} or -sometimes @code{#!/bin/perl}, as follows: if the script is a critical -one that may be called when the @file{/usr} partition is unmounted or -broken it should use @file{/bin/perl}. Otherwise (especially if the -script is not specifically targetted at Debian) it should use Perl's -standard location, @file{/usr/bin/perl}. +In the case of Perl scripts this should be @code{#!/usr/bin/perl}. @item Generally the following compilation parameters should be used: @@ -973,9 +968,8 @@ errors when making calls such as @code{open}, @code{print}, If these scripts exist they should be left in the @file{DEBIAN} directory with execute permission enabled and should contain an -appropriate @code{#!} line, such as @code{#!/bin/bash} for a -@code{bash} script or @code{#!/bin/perl} for a Perl script (see -above). +appropriate @code{#!} line, such as @code{#!/bin/bash} for a @code{bash} +script or @code{#!/usr/bin/perl} for a Perl script (see above). @node Dependencies and Conflicts, Package Classification Fields, Installation and Removal Scripts, Control Files @unnumberedsec Conflicts, Depends, Suggests, Recommends and Provides diff --git a/doc/sgml/programmer.sgml b/doc/sgml/programmer.sgml index 72b04963..e6f27ae9 100644 --- a/doc/sgml/programmer.sgml +++ b/doc/sgml/programmer.sgml @@ -1,4 +1,4 @@ - + Scope of this manual +

This manual describes the technical aspects of creating Debian binary packages (Note that this document is not yet complete ! Binary package format +

Creating package files -- All manipulation of binary package files is done by When you've prepared the package, you should invoke: - + dpkg --build +

This will build the package in + dpkg-deb --info + Package control information files

The control information portion of a binary package is a collection of files with names known to The main control information file: +

The most important control information file used by The value for this field can be obtained using - + dpkg --print-architecture - + This actually invokes - + gcc --print-libgcc-file-name - + and parses and decomposes the output and looks the CPU type from the GCC configuration in a table in List of other control fields +

There are several other fields which are used elsewhere by parts of the system. These should not appear in package control files. Status fields +

These fields appear in These fields are found in Obsolete fields +

These are still recognised by + @@ -459,6 +469,7 @@ separate control file field. This field went through several names. Version numbering

Every package has a version number, in its Package maintainer scripts run by +

It is possible supply scripts as part of a package which for details of exactly when and how these scripts are called and with what arguments. Declaring relationships between packages

Packages can declare in their control file that they have certain relationships to other packages - for example, that they may not be installed at the same time as certain other packages, and/or that they -depend on the presence of others. +depend on the presence of others, or that they should overwrite files +in certain other packages if present.

This is done using the -Syntax of relationship fields +Syntax of relationship fields +

These fields all have a uniform syntax. They are a list of package names separated by commas. @@ -664,8 +679,8 @@ The relations allowed are for strictly earlier, earlier or equal, exactly equal, later or equal and strictly later, respectively. The forms Whitespace may appear at any point in the version specification, and @@ -677,8 +692,9 @@ put a single space after each comma, on either side of each vertical bar, and before each open parenthesis. Dependencies - -These three fields are used to declare a dependency by one package on +These four fields are used to declare a dependency by one package on another. They appear in the depending package's control file.

@@ -697,6 +713,10 @@ For this reason packages in an installation run are usually all unpacked first and all configured later; this gives later versions of packages with dependencies on later versions of other packages the opportunity to have their dependencies satisfied. +

+ +Thus + + + + +However, this process is slow (because it requires repeated +invocations of + +For these reasons, and because this field imposes restrictions on the +order in which packages may be unpacked (which can be difficult for +installations from multipart media, for example), + +When the package declaring it is being configured, a + + +However, when a package declaring a predependency is being unpacked +the predependency can be satisfied even if the depended-on package(s) +are only unpacked or half-configured, provided that they have been +configured correctly at some point in the past (and not removed or +partially removed since). In this case both the previously-configured +and currently unpacked or half-configured versions must satisfy any +version clause in the -Alternative packages - Deconfiguration due to removal during bulk installations +

+ +If + +However, if the + +Alternative packages - +

+ +When one package declares a conflict with another + +If one package is to be installed, the other must be removed first - +if the package being installed is marked as replacing () the one on the system, or the one on the system is +marked as deselected, or both packages are marked + + + +A package will not cause a conflict merely because its configuration +files are still installed; it must be at least half-installed. +

+ +A special exception is made for packages which declare a conflict with +their own package name, or with a virtual package which they provide +(see below): this does not prevent their installation, and allows a +package to conflict with others providing a replacement for it. +

+ +A + -**** WRITE THIS -Virtual packages - Virtual packages - +

-**** WRITE THIS +As well as the names of actual (`concrete') packages, the package +relationship fields -Overwriting files - +A virtual package is one which appears in the -**** WRITE THIS +If there are both a real and a virtual package of the same name then +the dependency may be satisfied (or the conflict caused) by either the +real package or any of the virtual packages which provide it. This is +so that, for example, supposing we have +

+ +If a dependency or a conflict has a version number attached then only +real packages will be considered to see whether the relationship is +satisfied (or prohibited, for a conflict) - it is assumed that a real +package which provides virtual package is not of the `right' version. +So, a + +If you want to specify which of a set of real packages should be the +default to satisfy a particular dependency on a virtual package, you +should list the real package as alternative before the virtual. +

+ +Defaults for satisfying dependencies - ordering +

+ +Ordering is significant in dependency fields. +

+ +Usually dselect will suggest to the user that they select the package +with the most `fundamental' class (eg, it will prefer Base packages to +Optional ones), or the one that they `most wanted' to select in some +sense. +

+ +However, in the absence of other information + +However, there is no way to specify the `order' of several packages +which all provide the same thing, when that thing is listed as a +dependency. +

+ +Therefore a dependency on a virtual package should contain a concrete +package name as the first alternative, so that this is the default. +

+ +For example, consider the set of packages: + + +Package: glibcdoc +Recommends: info-browser + +Package: info +Provides: info-browser + +Package: emacs +Provides: info-browser + + +If +Package: glibcdoc +Recommends: info | info-browser + +so that +

+ +The + +Virtual packages () are not considered when looking +at a Overwriting files in other packages +

+ +Firstly, as mentioned before, it is usually an error for a package to +contains files which are on the system in another package, though +currently the + +If the overwriting package declares that it replaces the one +containing the file being overwritten then + +If a package is completely replaced in this way, so that . +

+ +In the future + +This usage of Replacing whole packages, forcing their removal +

+ +Secondly, . This usage only takes effect when the two +packages Order of processing steps and maintainer script arguments

Summary of ways maintainer scripts are called

@@ -819,20 +1077,20 @@ the `error unwind' calls listed below. If a version the package is already installed, call - + + If this gives an error (ie, a non-zero exit status), dpkg will attempt instead: - + + Error unwind, for both the above cases: - + + @@ -843,32 +1101,32 @@ If a `conflicting' package is being removed at the same time: If any packages depended on that conflicting package and + + Error unwind: - + + The deconfigured packages are marked as requiring configuration, so that if To prepare for removal of the conflicting package, call: - + + Error unwind: - + + @@ -876,28 +1134,28 @@ Error unwind: If the package is being upgraded, call: - + + Otherwise, if the package had some configuration files from a previous version installed (ie, it is in the `configuration files only' state): - + + Otherwise (ie, the package was completely purged): - + + Error unwind versions, respectively: - + + @@ -927,19 +1185,19 @@ and then it is removed again). If the package is being upgraded, call - + + If this fails, + + Error unwind, for both cases: - + + @@ -967,18 +1225,19 @@ to have been removed. For each such package, + + The package's maintainer scripts are removed. It is noted in the status database as being in a sane state, namely -not installed (any conffiles it may have are ignored). Note that -disappearing packages do not have their prerm called, because - @@ -1010,9 +1269,9 @@ and so do not get removed now). When we configure a package (this happens with + +

No attempt is made to unwind after errors during configuration. @@ -1029,17 +1288,17 @@ circumstances. - + + The package's files are removed (except conffiles). - + + All the maintainer scripts except the postrm are removed. @@ -1054,9 +1313,9 @@ The conffiles and any backup files ( - + + The package's file list is removed. @@ -1066,14 +1325,117 @@ The package's file list is removed. No attempt is made to unwind after errors during removal. +Configuration file handling

+ +The easy method is to ship a best-effort configuration in the package, +and use + +The hard method is to build the configuration file from scratch in the +Automatic handling of configuration files by + +A package may contain a control area file called + +When a package is upgraded, during the configuration state shortly +before + +For each file it checks to see whether the version of the file +included in the package is the same as the one that was included in +the last version of the package (the one that is being upgraded +from); it also compares the version currently installed on the system +with the one shipped with the last version. +

+ +If neither the user nor the package maintainer has changed the file, +it is left alone. If one or the other has changed their version, then +the changed version is preferred - ie, if the user edits their file, +but the package maintainer doesn't ship a different version, the +user's changes will stay, silently, but if the maintainer ships a new +version and the user hasn't edited it the new version will be +installed (with an informative message). If both have changed their +version the user is prompted about the problem and must resolve the +differences themselves. +

+ +The comparisons are done by calculating the MD5 message digests of the +files, and storing the MD5 of the file as it was included in the most +recent version of the package. +

+ +When a package is installed for the first time + +However, note that + +Note that a package should Fully-featured maintainer script configuration handling +

+ +For files which contain site-specific information such as thep +hostname and networking details and so forth, it is better to create +the file in the package's + +This will typically involve examining the state of the rest of the +system to determine values and other information, and may involve +prompting the user for some information which can't be obtained some +other way. +

+ +When using this method there are a number of important issues which +should be considered: +

+ +The package's Dangling references +

Would dangle to conffiles

There would be a dangling xref here. Instead I've just put this dummy text in. Would dangle to descriptions

There would be a dangling xref here. Instead I've just put this dummy text in. diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c index 3eef94f9..7e9b7fa5 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c @@ -94,9 +94,9 @@ void do_build(const char *const *argv) { &checkedinfo, stderr, &warns); assert(checkedinfo->available.valid); if (strspn(checkedinfo->name, - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-.") + "abcdefghijklmnopqrstuvwxyz0123456789+-.") != strlen(checkedinfo->name)) - ohshit("package name has characters that aren't alphanums or `-+.'"); + ohshit("package name has characters that aren't lowercase alphanums or `-+.'"); if (checkedinfo->priority == pri_other) { fprintf(stderr, "warning, `%s' contains user-defined Priority value `%s'\n", controlfile, checkedinfo->otherpriority); diff --git a/main/enquiry.c b/main/enquiry.c index f6b7f866..2d02cc68 100644 --- a/main/enquiry.c +++ b/main/enquiry.c @@ -439,7 +439,7 @@ void enqperpackage(const char *const *argv) { if (namenode->divert && !namenode->divert->camefrom) { if (!namenode->divert->pkg) printf("locally diverted"); else if (pkg == namenode->divert->pkg) printf("package diverts others"); - else printf("diverted by %s",pkg->name); + else printf("diverted by %s",namenode->divert->pkg->name); printf(" to: %s\n",namenode->divert->useinstead->name); } file= file->next; diff --git a/scripts/Makefile.in b/scripts/Makefile.in index 64433b94..12a5d6e8 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -1,5 +1,5 @@ # Copyright (C) 1994 Ian Murdock -# Copyright (C) 1994,1995 Ian Jackson +# Copyright (C) 1994,1995,1996 Ian Jackson # # This is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as @@ -36,7 +36,8 @@ perlpath = @perlpath@ MAN1 = dpkg-name EXC = dpkg-name -MAN8 = update-rc.d start-stop-daemon update-alternatives install-info +MAN8 = update-rc.d start-stop-daemon update-alternatives install-info \ + dpkg-scanpackages SBIN = update-rc.d start-stop-daemon update-alternatives install-info \ dpkg-scanpackages dpkg-divert cleanup-info diff --git a/scripts/dpkg-name.sh b/scripts/dpkg-name.sh index e427e8d6..54578965 100644 --- a/scripts/dpkg-name.sh +++ b/scripts/dpkg-name.sh @@ -69,7 +69,7 @@ getname () { a=`dpkg-deb -f -- "$1" architecture`; a=`echo $a|sed -e 's/ *//g'`; - if [ -z "$a" ]; # architecture field empty + if [ -z "$a" -a -n "$noarchitecture" ]; # arch field empty, or ignored then a=`dpkg --print-architecture`; stderr "assuming architecture \`"$a"' for \`"$1"'"; diff --git a/scripts/dpkg-scanpackages.8 b/scripts/dpkg-scanpackages.8 new file mode 100644 index 00000000..827cc83e --- /dev/null +++ b/scripts/dpkg-scanpackages.8 @@ -0,0 +1,107 @@ +.\" This manpage is copyright (C) 1996 Michael Shields . +.\" +.\" This is free software; you may redistribute it and/or modify +.\" it under the terms of the GNU General Public License as +.\" published by the Free Software Foundation; either version 2, +.\" or (at your option) any later version. +.\" +.\" This is distributed in the hope that it will be useful, but +.\" WITHOUT ANY WARRANTY; without even the implied warranty of +.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +.\" GNU General Public License for more details. +.\" +.\" You should have received a copy of the GNU General Public +.\" License along with dpkg; if not, write to the Free Software +.\" Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +.TH DPKG-SCANPACKAGES 8 "1996-07-08" "Debian Linux" +.SH NAME +dpkg-scanpackages \- create Packages files +. +.SH SYNOPSIS +.B dpkg-scanpackages +.I binarydir +.I overridefile +.RI [ pathprefix ] +.B > +.I Packages +. +.SH DESCRIPTION +.B dpkg-scanpackages +sorts through a tree of Debian binary packages and creates a Packages +file, used by +.BR dselect (8) +to tell the user what packages are available for installation. These +Packages files are the same as those found on Debian archive sites +and CD-ROMs. You might use +.B dpkg-scanpackages +yourself if making a directory of local packages to install on a cluster +of machines. +.PP +.I binarydir +is the name of the binary tree to process (for example, +.BR contrib/binary-i386 ). +It is best to make this relative to the root of the Debian archive, +because every Filename field in the new Packages file will start with +this string. +.PP +.I overridefile +is the name of a file to read which contains information about how the +package fits into the distribution; see below. +.PP +.I pathprefix +is an optional string to be prepended to the Filename fields. +. +.SH THE OVERRIDE FILE +While most information about a package can be found in the control file, +some must be filled in by the distribution czars rather than by the +maintainer, because they relate to the arrangement of files for release +rather than the actual dependencies and description of the package. +This information is found in the override file. +.PP +The override file has a simple whitespace-delimited format. Comments are +allowed (denoted with a +.BR # ). +.PP +.in +5 +.I package +.I priority +.I section +.RI [ maintainerinfo ] +.in -5 +.PP +.I package +is the name of the package. Entries in the override file for packages +not found in the binary tree are ignored. +.PP +.I priority +and +.I section +place the package within the release tree; these ought not to be found +in the control file. If the package is found in a subdirectory of +.IR binarydir , +that will be checked against +.IR section . +.PP +.IR maintainerinfo , +if present, can be either the name of a maintainer for an unconditional +override, or else +.I oldmaintainer +.B => +.I newmaintainer +to perform a substitution. +.PP +The override files used to make the official Packages lists may be found +in the +.I indices +directory on any Debian mirror. +. +.SH DIAGNOSTICS +.B dpkg-scanpackages +outputs the usual self-explanatory errors. It also warns about packages +that are in the wrong subdirectory, are duplicated, have a Filename +field in their control file, are missing from the override file, or have +maintainer substitutions which do not take effect. +. +.SH SEE ALSO +.BR dpkg (8), +.BR dselect (8). diff --git a/scripts/dpkg-scanpackages.pl b/scripts/dpkg-scanpackages.pl index 97396a94..ee82ebe1 100755 --- a/scripts/dpkg-scanpackages.pl +++ b/scripts/dpkg-scanpackages.pl @@ -1,106 +1,106 @@ -#!/usr/bin/perl -- -# usage: -# dpkg-scanpackages .../binary .../noverride pathprefix >.../Packages.new -# mv .../Packages.new .../Packages -# -# This is the core script that generates Packages files (as found -# on the Debian FTP site and CD-ROMs). -# -# The first argument should preferably be a relative filename, so that -# the Filename field has good information. -# -# Any desired string can be prepended to each Filename value by -# passing it as the third argument. -# -# The noverride file is a series of lines of the form -#

-# where the field is optional. Fields are separated by -# whitespace. The field may be => -# (this is recommended). - -$version= '1.0.12'; # This line modified by Makefile +#!/usr/bin/perl + +$version= '1.2.6'; # This line modified by Makefile %kmap= ('optional','suggests', 'recommended','recommends', 'class','priority', 'package_revision','revision'); -%pri= ('priority',300, - 'section',290, - 'maintainer',280, - 'version',270, - 'depends',250, - 'recommends',240, - 'suggests',230, - 'conflicts',220, - 'provides',210, - 'filename',200, - 'size',180, - 'md5sum',170, - 'description',160); - -@ARGV==3 || die; - -$binarydir= shift(@ARGV); --d $binarydir || die $!; - -$override= shift(@ARGV); --e $override || die $!; - -$pathprefix= shift(@ARGV); - -open(F,"find $binarydir -name '*.deb' -print |") || die $!; +@fieldpri= ('Package', + 'Version', + 'Priority', + 'Section', + 'Essential', + 'Maintainer', + 'Pre-Depends', + 'Depends', + 'Recommends', + 'Suggests', + 'Conflicts', + 'Provides', + 'Replaces', + 'Architecture', + 'Filename', + 'Size', + 'MD5sum', + 'Description'); + +$i=100; grep($pri{$_}=$i--,@fieldpri); + +$#ARGV == 1 || $#ARGV == 2 + or die "Usage: dpkg-scanpackages binarypath overridefile pathprefix > Packages\n"; +($binarydir, $override, $pathprefix) = @ARGV; +-d $binarydir or die "Binary dir $binarydir not found\n"; +-e $override or die "Override file $override not found\n"; + +# The extra slash causes symlinks to be followed. +open(F,"find $binarydir/ -follow -name '*.deb' -print |") + or die "Couldn't open pipe to find: $!\n"; while () { chop($fn=$_); - substr($fn,0,length($binarydir)) eq $binarydir || die $fn; - open(C,"dpkg-deb -I $fn control |") || die "$fn $!"; - $t=''; while () { $t.=$_; } - $!=0; close(C); $? && die "$fn $? $!"; + substr($fn,0,length($binarydir)) eq $binarydir + or die "$fn not in binary dir $binarydir\n"; + $t= `dpkg-deb -I $fn control` + or die "Couldn't call dpkg-deb on $fn: $!\n"; + $? and die "\`dpkg-deb -I $fn control' exited with $?\n"; undef %tv; $o= $t; while ($t =~ s/^\n*(\S+):[ \t]*(.*(\n[ \t].*)*)\n//) { - $k= $1; $v= $2; - $k =~ y/A-Z/a-z/; + $k= lc $1; $v= $2; if (defined($kmap{$k})) { $k= $kmap{$k}; } + if (@kn= grep($k eq lc $_, @fieldpri)) { + @kn==1 || die $k; + $k= $kn[0]; + } $v =~ s/\s+$//; $tv{$k}= $v; -#print STDERR "K>$k V>$v<\n"; } - $t =~ m/^\n*$/ || die "$fn $o / $t ?"; - defined($tv{'package'}) || die "$fn $o ?"; - $p= $tv{'package'}; delete $tv{'package'}; + $t =~ /^\n*$/ + or die "Unprocessed text from $fn control file; info:\n$o / $t\n"; + + defined($tv{'Package'}) + or die "No Package field in control file of $fn\n"; + $p= $tv{'Package'}; delete $tv{'Package'}; + if (defined($p1{$p})) { print(STDERR " ! Package $p (filename $fn) is repeat;\n". - " ignored that one and using data from $pfilename{$p}) !\n") + " ignored that one and using data from $pfilename{$p} !\n") || die $!; next; } - if (defined($tv{'filename'})) { - print(STDERR " ! Package $p (filename $fn) has Filename field !\n") || die $!; - } - $tv{'filename'}= "$pathprefix$fn"; + print(STDERR " ! Package $p (filename $fn) has Filename field!\n") || die $! + if defined($tv{'Filename'}); + + $tv{'Filename'}= "$pathprefix$fn"; + open(C,"md5sum <$fn |") || die "$fn $!"; - chop($_=); m/^[0-9a-f]{32}$/ || die "$fn \`$_' $!"; - $!=0; close(C); $? && die "$fn $? $!"; - $tv{'md5sum'}= $_; - defined(@stat= stat($fn)) || die "$fn $!"; - $stat[7] || die "$fn $stat[7]"; - $tv{'size'}= $stat[7]; - if (length($tv{'revision'})) { - $tv{'version'}.= '-'.$tv{'revision'}; - delete $tv{'revision'}; + chop($_=); close(C); $? and die "\`md5sum < $fn' exited with $?\n"; + /^[0-9a-f]{32}$/ or die "Strange text from \`md5sum < $fn': \`$_'\n"; + $tv{'MD5sum'}= $_; + + @stat= stat($fn) or die "Couldn't stat $fn: $!\n"; + $stat[7] or die "$fn is empty\n"; + $tv{'Size'}= $stat[7]; + + if (length($tv{'Revision'})) { + $tv{'Version'}.= '-'.$tv{'Revision'}; + delete $tv{'Revision'}; } + for $k (keys %tv) { $pv{$p,$k}= $tv{$k}; $k1{$k}= 1; $p1{$p}= 1; } + $_= substr($fn,length($binarydir)); s#/[^/]+$##; s#^/*##; $psubdir{$p}= $_; $pfilename{$p}= $fn; } -$!=0; close(F); $? && die "$? $!"; +close(F); +$? and die "find exited with $?\n"; select(STDERR); $= = 1000; select(STDOUT); @@ -120,29 +120,31 @@ sub writelist { @samemaint=(); -open(O,"<$override") || die $!; -while() { +open(O, $override) + or die "Couldn't open override file $override: $!\n"; +while () { + s/\#.*//; s/\s+$//; ($p,$priority,$section,$maintainer)= split(/\s+/,$_,4); next unless defined($p1{$p}); if (length($maintainer)) { if ($maintainer =~ m/\s*=\>\s*/) { - $oldmaint= $`; $newmaint= $'; $debmaint= $pv{$p,'maintainer'}; + $oldmaint= $`; $newmaint= $'; $debmaint= $pv{$p,'Maintainer'}; if (!grep($debmaint eq $_, split(m:\s*//\s*:, $oldmaint))) { push(@changedmaint, - " $p (package says $pv{$p,'maintainer'}, not $oldmaint)\n"); + " $p (package says $pv{$p,'Maintainer'}, not $oldmaint)\n"); } else { - $pv{$p,'maintainer'}= $newmaint; + $pv{$p,'Maintainer'}= $newmaint; } - } elsif ($pv{$p,'maintainer'} eq $maintainer) { + } elsif ($pv{$p,'Maintainer'} eq $maintainer) { push(@samemaint," $p ($maintainer)\n"); } else { print(STDERR " * Unconditional maintainer override for $p *\n") || die $!; - $pv{$p,'maintainer'}= $maintainer; + $pv{$p,'Maintainer'}= $maintainer; } } - $pv{$p,'priority'}= $priority; - $pv{$p,'section'}= $section; + $pv{$p,'Priority'}= $priority; + $pv{$p,'Section'}= $section; if (length($psubdir{$p}) && $section ne $psubdir{$p}) { print(STDERR " !! Package $p has \`Section: $section',". " but file is in \`$psubdir{$p}' !!\n") || die $!; @@ -151,12 +153,11 @@ while() { $o1{$p}= 1; } close(O); +print(STDERR "\n") || die $! if $ouches; -if ($ouches) { print(STDERR "\n") || die $!; } - -$k1{'maintainer'}= 1; -$k1{'priority'}= 1; -$k1{'section'}= 1; +$k1{'Maintainer'}= 1; +$k1{'Priority'}= 1; +$k1{'Section'}= 1; @missingover=(); @@ -171,9 +172,12 @@ for $p (sort keys %p1) { } $r.= "\n"; $written++; - print(STDOUT $r) || die $!; + $p1{$p}= 1; + print(STDOUT $r) or die "Failed when writing stdout: $!\n"; } -close(STDOUT) || die $!; +close(STDOUT) or die "Couldn't close stdout: $!\n"; + +@spuriousover= grep(!defined($p1{$_}),sort keys %o1); &writelist("** Packages in archive but missing from override file: **", @missingover); @@ -189,5 +193,11 @@ if (@samemaint) { @samemaint, "\n") || die $!; } +if (@spuriousover) { + print(STDERR + " -- Packages in override file but not in archive: --\n", + @spuriousover, + "\n") || die $!; +} print(STDERR " Wrote $written entries to output Packages file.\n") || die $!; diff --git a/version.h b/version.h index c6c0a555..ac5cd6c6 100644 --- a/version.h +++ b/version.h @@ -1 +1 @@ -#define DPKG_VERSION "1.2.11" /* This line modified by Makefile */ +#define DPKG_VERSION "1.2.13" /* This line modified by Makefile */