* 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 <ian@chiark.chu.cam.ac.uk> Thu, 1 Aug 1996 02:46:34 +0100
* remove old docs from /usr/doc/dpkg.
other stuff unlikely to get done soon
+ * Automatically remove <file>.gz if <file> 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
* --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,
#! /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.
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
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 \
| --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.
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]
--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)
-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 ;;
| --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=*)
| -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=*)
-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=*)
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-*)
-*) { 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
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.
fi
done
IFS="$ac_save_ifs"
- test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
fi
fi
CC="$ac_cv_prog_CC"
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
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
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
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
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
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; }
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
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
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
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 726 "configure"
+#line 892 "configure"
#include "confdefs.h"
#include <assert.h>
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
:
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 740 "configure"
+#line 907 "configure"
#include "confdefs.h"
#include <assert.h>
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
:
ac_cv_c_cross=yes
else
cat > conftest.$ac_ext <<EOF
-#line 774 "configure"
+#line 942 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-eval $ac_link
+{ (eval echo configure:946: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_c_cross=no
else
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 <<EOF
-#line 795 "configure"
+#line 964 "configure"
#include "confdefs.h"
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <float.h>
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*
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
-#line 817 "configure"
+#line 987 "configure"
#include "confdefs.h"
#include <string.h>
EOF
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
-#line 835 "configure"
+#line 1005 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
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 <<EOF
-#line 856 "configure"
+#line 1026 "configure"
#include "confdefs.h"
#include <ctype.h>
#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
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
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
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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 989 "configure"
+#line 1167 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1020 "configure"
+#line 1198 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1051 "configure"
+#line 1229 "configure"
#include "confdefs.h"
#include <sys/types.h>
#if STDC_HEADERS
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1082 "configure"
+#line 1260 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
#include <assert.h>
/* 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() {
; 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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1130 "configure"
+#line 1310 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
#include <assert.h>
/* 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() {
; 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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1179 "configure"
+#line 1361 "configure"
#include "confdefs.h"
int main() { return 0; }
char **p;
/* NEC SVR4.0.2 mips cc rejects this. */
struct point {int x, y;};
-static struct point const zero;
+static struct point const zero = {0,0};
/* AIX XL C 1.02.0.0 rejects this.
It does not let you subtract one const X* pointer from another in an arm
of an if-expression whose if-part is not a constant expression */
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:1411: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_c_const=yes
else
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
ac_cv_c_bigendian=unknown
# See if sys/param.h defines the BYTE_ORDER macro.
cat > conftest.$ac_ext <<EOF
-#line 1254 "configure"
+#line 1437 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#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 <<EOF
-#line 1270 "configure"
+#line 1453 "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/param.h>
#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
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1299 "configure"
+#line 1482 "configure"
#include "confdefs.h"
main () {
/* Are we little or big endian? From Harbison&Steele. */
exit (u.c[sizeof (long) - 1] == 1);
}
EOF
-eval $ac_link
+{ (eval echo configure:1495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }
if test -s conftest && (./conftest; exit) 2>/dev/null; then
ac_cv_c_bigendian=no
else
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
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1338 "configure"
+#line 1522 "configure"
#include "confdefs.h"
#include <stdio.h>
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
{ echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
else
cat > conftest.$ac_ext <<EOF
-#line 1372 "configure"
+#line 1556 "configure"
#include "confdefs.h"
#include <stdio.h>
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
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1405 "configure"
+#line 1589 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
#include <assert.h>
/* 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() {
; 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
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 <<EOF
#define $ac_tr_func 1
EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1457 "configure"
+#line 1643 "configure"
#include "confdefs.h"
#include <$ac_hdr>
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*
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 <<EOF
#define $ac_tr_hdr 1
EOF
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1491 "configure"
+#line 1678 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sysinfo(); below. */
#include <assert.h>
/* 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() {
; 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
echo "$ac_t""no" 1>&6
echo $ac_n "checking __NR_sysinfo""... $ac_c" 1>&6
cat > conftest.$ac_ext <<EOF
-#line 1533 "configure"
+#line 1722 "configure"
#include "confdefs.h"
#include <linux/sys.h>
else
cat > conftest.$ac_ext <<EOF
-#line 1578 "configure"
+#line 1767 "configure"
#include "confdefs.h"
#include <string.h>
int main() { return 0; }
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
else
cat > conftest.$ac_ext <<EOF
-#line 1615 "configure"
+#line 1804 "configure"
#include "confdefs.h"
#include <sys/types.h>
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
else
cat > conftest.$ac_ext <<EOF
-#line 1658 "configure"
+#line 1847 "configure"
#include "confdefs.h"
int main() { return 0; }
} inline int foo (int x) {
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:1855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
dpkg_cv_c_inline=yes
else
else
cat > conftest.$ac_ext <<EOF
-#line 1698 "configure"
+#line 1887 "configure"
#include "confdefs.h"
int main() { return 0; }
extern int testfunction(int x) __attribute__((,,))
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:1895: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
dpkg_cv_c_attribute_supported=yes
else
else
cat > conftest.$ac_ext <<EOF
-#line 1732 "configure"
+#line 1921 "configure"
#include "confdefs.h"
int main() { return 0; }
extern int testfunction(int x) __attribute__((noreturn))
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:1929: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
dpkg_cv_c_attribute_noreturn=yes
else
else
cat > conftest.$ac_ext <<EOF
-#line 1771 "configure"
+#line 1960 "configure"
#include "confdefs.h"
int main() { return 0; }
extern int testfunction(int x) __attribute__((const))
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:1968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
dpkg_cv_c_attribute_const=yes
else
else
cat > conftest.$ac_ext <<EOF
-#line 1810 "configure"
+#line 1999 "configure"
#include "confdefs.h"
int main() { return 0; }
extern int testfunction(char *y, ...) __attribute__((format(printf,1,2)))
; return 0; }
EOF
-if eval $ac_compile; then
+if { (eval echo configure:2007: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
dpkg_cv_attribute_format=yes
else
oldcflags="${CFLAGS-}"
CFLAGS="${CFLAGS-} ${CWARNS} -Wall -Wno-implicit -Werror"
cat > conftest.$ac_ext <<EOF
-#line 1864 "configure"
+#line 2053 "configure"
#include "confdefs.h"
#include <string.h>
; 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
oldcflags="${CFLAGS-}"
CFLAGS="${CFLAGS-} ${CWARNS} -Wwrite-strings -Werror"
cat > conftest.$ac_ext <<EOF
-#line 1911 "configure"
+#line 2100 "configure"
#include "confdefs.h"
#include <string.h>
; 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
oldcflags="${CFLAGS-}"
CFLAGS="${CFLAGS-} ${CWARNS} -Wpointer-arith -Werror"
cat > conftest.$ac_ext <<EOF
-#line 1958 "configure"
+#line 2147 "configure"
#include "confdefs.h"
#include <string.h>
; 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
oldcflags="${CFLAGS-}"
CFLAGS="${CFLAGS-} ${CWARNS} -Wimplicit -Wnested-externs -Werror"
cat > conftest.$ac_ext <<EOF
-#line 2005 "configure"
+#line 2194 "configure"
#include "confdefs.h"
#include <string.h>
; 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
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 ;;
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 <<EOF
-# 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
+# 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
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
# 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
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
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
+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 <ian@chiark.chu.cam.ac.uk> Thu, 1 Aug 1996 02:46:34 +0100
+
dpkg (1.2.12); priority=LOW
* dpkg --search and --list understand and comment on diversions.
Copyright (C) 1994,1995,1996 Ian Jackson <iwj10@cus.cam.ac.uk>
Copyright (C) 1995,1996 Erick Branderhorst <branderhorst@heel.fgg.eur.nl>
Copyright (C) 1996 Kim-Minh Kaplan <kkaplan@cdfhp3.in2p3.fr>
+Copyright (C) 1996 Michael Shields <shields@crosslink.net>
Copyright (C) 1995 Bruce Perens <bruce@pixar.com>
Copyright (C) 1994 Carl Streeter <streeter@cae.wisc.edu>
Copyright (C) 1994 Matt Welsh <mdw@sunsite.unc.edu>
#!/usr/bin/make -f
package=dpkg
-version=1.2.12
+version=1.2.13
archi=$(shell dpkg --print-architecture)
DIR:=$(shell pwd)
man5dir = $(mandir)/man5
man5 = 5
docdir = $(prefix)/doc
-devdocdir = $(docdir)/dpkg
+dpkgdocdir = $(docdir)/dpkg
DIST = Makefile.in $(SRC) $(MAN)
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
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:
$(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
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:
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
-<!doctype linuxdoc system>
+<!doctype linuxdoc system "./linuxdoc.dtd" >
<!--
Debian Linux dpkg package installation tool.
<toc>
<!-- Describes the technical interface between a package and dpkg.
-Control file fields and their syntax and semantics. How to use
+How to use
update-rc.d, diversions, update-alternatives, install-info in a
package. How to safely put shared libraries in a package. Details of
-dpkg's handling of individual files. Semantics of virtual packages.
+dpkg's handling of individual files.
Sections on when to use which feature (eg Replaces
vs. Replaces/Conflicts vs. update-alternatives vs. diversions)
Cross-references to the policy document (see below) where appropriate.
Description of the interface between dselect and its access methods.
Hints on where to start with a new package (ie, the hello package).
+What to do about file aliasing.
-->
<sect>Scope of this manual
+<p>
This manual describes the technical aspects of creating Debian binary
packages (<tt/.deb/ files.). It documents the behaviour of the
<em>Note that this document is not yet complete !</em>
<sect>Binary package format
+<p>
<tt/dpkg/ is a suite of programs for creating binary package files and
installing and removing them on Unix systems.<footnote><tt/dpkg/ is
<sect1>Creating package files -- <tt/dpkg-deb/
+<p>
All manipulation of binary package files is done by <tt/dpkg-deb/;
it's the only program that has knowledge of the format.
<p>
When you've prepared the package, you should invoke:<!--var-->
-<tscreen><verb>
+<example>
dpkg --build <it/directory/
-</verb></tscreen>
+</example>
<p>
This will build the package in <var/directory/<tt/.deb/.
See the manpage for <tt/dpkg-deb/ for details of how to examine the
contents of this newly-created file. You may find the output of
following commands enlightening:
-<tscreen><verb>
+<example>
dpkg-deb --info <var/filename/<tt/.deb/
dpkg-deb --contents <var/filename/<tt/.deb/
-</verb></tscreen>
+</example>
<sect1>Package control information files<label id="controlarea">
+<p>
The control information portion of a binary package is a collection of
files with names known to <tt/dpkg/. It will treat the contents of
</descrip>
<sect1>The main control information file: <tt/control/<label id="controlfile">
+<p>
The most important control information file used by <tt/dpkg/ when it
installs a package is <tt/control/. It contains all the package's
<p>
The value for this field can be obtained using
-<tscreen><verb>
+<example>
dpkg --print-architecture
-</verb></tscreen>
+</example>
This actually invokes
-<tscreen><verb>
+<example>
gcc --print-libgcc-file-name
-</verb></tscreen>
+</example>
and parses and decomposes the output and looks the CPU type from the
GCC configuration in a table in <tt/dpkg/. This is so that it will
work if you're cross-compiling.
</descrip>
<sect2>List of other control fields
+<p>
There are several other fields which are used elsewhere by parts of
the system. These should not appear in package control files.
<sect3>Status fields
+<p>
These fields appear in <tt/dpkg/'s internal status file; they are also
printed by <tt/dpkg --status/ and can be seen in <tt/dselect/ by
</descrip>
<sect4><tt/Packages/ file (available package) fields
+<p>
These fields are found in <tt/Packages/ files (lists of packages
available for installation, which are generated by the distribution
</descrip>
<sect4>Obsolete fields
+<p>
These are still recognised by <tt/dpkg/ but should not appear anywhere
any more.
-<p><descrip>
+<descrip>
<tag><tt/Revision/, <tt/Package-Revision/, <tt/Package_Revision/</tag>
</descrip>
<sect1>Version numbering<label id="versions">
+<p>
Every package has a version number, in its <tt/Version/ control file
field.
converted to a sane form for use in the <tt/Version/ field.
<sect1>Package maintainer scripts run by <tt/dpkg/<label id="maintainerscripts">
+<p>
It is possible supply scripts as part of a package which <tt/dpkg/
will run for you when your package is installed, upgraded or removed.
how these scripts are called and with what arguments.
<sect>Declaring relationships between packages<label id="depconoverwr">
+<p>
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.
<p>
This is done using the <tt/Depends/, <tt/Recommends/, <tt/Suggests/,
<tt/Conflicts/, <tt/Provides/ and <tt/Replaces/ control file fields.
<p>
-<sect>Syntax of relationship fields
+<sect1>Syntax of relationship fields
+<p>
These fields all have a uniform syntax. They are a list of package
names separated by commas.
for strictly earlier, earlier or equal, exactly equal, later or equal
and strictly later, respectively. The forms <tt/</ and <tt/>/
were used to mean earlier/later or equal, rather than strictly
-earlier/later, and so (while <tt/dpkg/ still supports them) they
-should not appear in new packages.
+earlier/later, so they should not appear in new packages (though
+<tt/dpkg/ still supports them).
<p>
Whitespace may appear at any point in the version specification, and
bar, and before each open parenthesis.
<sect1>Dependencies - <tt/Depends/, <tt/Recommends/, <tt/Suggests/, <tt/Pre-Depends/
+<p>
-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.
<p>
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.
+<p>
+
+Thus <tt/Depends/ allows package maintainers to impose an order in
+which packages should be configured.
<descrip>
<tag/<tt/Depends//
**** WHEN TO USE -- POLICY STATEMENT HERE ?
+<tag/<tt/Suggests//
+This is used to declare that one package may be more useful with one
+or more others.
+<p>
+<tt/dselect/ will offer suggsted packages to the system administrator
+when they select the suggesting package, but the default is not to
+install the suggested package.
-<tt/<tt/Suggests//
-This declares a
+**** WHEN TO USE -- POLICY STATEMENT HERE ?
-**** WRITE THIS
+<tag/<tt/Pre-Depends//
+
+This field is like <tt/Depends/, except that it also forces <tt/dpkg/
+to complete installation of the packages named before even starting
+the installation of the package which declares the predependency.
+<p>
+
+<tt/dselect/ checks for predependencies when it is doing an
+installation run, and will attempt to find the packages which are
+required to be installed first and do so in the right order.
+<p>
+
+However, this process is slow (because it requires repeated
+invocations of <tt/dpkg/) and troublesome (because it requires
+guessing where to find the appropriate files).
+<p>
+
+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), <tt/Pre-Depends/
+should be used sparingly, preferably only by packages whose premature
+upgrade or installation would hamper the ability of the system to
+continue with any upgrade that might be in progress.
+<p>
+
+When the package declaring it is being configured, a
+<tt/Pre-Dependency/ will be considered satisfied only if the depending
+package has been correctly configured, just as if an ordinary
+<tt/Depends/ had been used.
+<p>
+
+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 <tt/Pre-Depends/ field.
</descrip>
-<sect1>Alternative packages - <tt/Conflicts/
+<sect2>Deconfiguration due to removal during bulk installations
+<p>
+
+If <tt/dpkg/ would like to remove a package due to a conflict, as
+described above, but this would violate a dependency of some other
+package on the system, <tt/dpkg/ will usually not remove the
+conflicting package and halt with an error.
+<p>
+
+However, if the <tt/--auto-deconfigure/ (<tt/-B/) option is used
+<tt/dpkg/ will automatically `deconfigure' the package with the
+problematic dependency, so that the conflicting package can be removed
+and the package we're trying to install can be installed. If
+<tt/dpkg/ is being asked to install packages (rather than just
+unpacking them) it will try to reconfigure the package when it has
+unpacked all its arguments, in the hope that one of the other packages
+it is installing will satisfy the problematic dependency.
+<p>
+
+<tt/dselect/ supplies this argument to <tt/dpkg/ when it invokes it,
+so that bulk installations proceed smoothly.
+
+<sect1>Alternative packages - <tt/Conflicts/ and <tt/Replaces/<label id="conflicts">
+<p>
+
+When one package declares a conflict with another <tt/dpkg/ will
+refuse to allow them to be installed on the system at the same time.
+<p>
+
+If one package is to be installed, the other must be removed first -
+if the package being installed is marked as replacing (<ref
+id="replaces">) the one on the system, or the one on the system is
+marked as deselected, or both packages are marked <tt/Essential/, then
+<tt/dpkg/ will automatically remove the package which is causing the
+conflict, otherwise it will halt the installation of the new package
+with an error.
+<p>
+
+<tt/dselect/ makes it hard to select conflicting packages, though the
+user can override this if they wish. If they do not override it then
+<tt/dselect/ will select one of the packages for removal, and the user
+must make sure it is the right one. In the future <tt/dselect/ will
+look for the presence of a <tt/Replaces/ field to help decide which
+package should be installed and which removed.
+<p>
+
+A package will not cause a conflict merely because its configuration
+files are still installed; it must be at least half-installed.
+<p>
+
+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.
+<p>
+
+A <tt/Conflicts/ entry should almost never have an `earlier than'
+version clause. This would prevent <tt/dpkg/ from upgrading or
+installing the package which declared such a conflict until the
+upgrade or removal of the conflicted-with package had been completed.
+This aspect of installation ordering is not handled by <tt/dselect/,
+so that the use <tt/Conflicts/ in this way is likely to cause problems
+for `bulk run' upgrades and installations.
+<p>
+
-**** WRITE THIS
-<sect1>Virtual packages - <tt/Provides/
+<sect1>Virtual packages - <tt/Provides/<label id="virtual">
+<p>
-**** WRITE THIS
+As well as the names of actual (`concrete') packages, the package
+relationship fields <tt/Depends/, <tt/Recommends/, <tt/Suggests/ and
+<tt/Conflicts/ may mention virtual packages.
+<p>
-<sect1>Overwriting files - <tt/Replaces/<label id="replaces">
+A virtual package is one which appears in the <tt/Provides/ control
+file field of another package. The effect is as if the package(s)
+which provide a particular virtual package name had been listed by
+name everywhere were the virtual package name appears.
+<p>
-**** 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
+<p>
+
+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 <tt/Provides/ field may not contain version numbers, and the
+version number of the concrete package which provides a particular
+virtual package will not be looked at when considering a dependency on
+or conflict with the virtual package name.
+<p>
+
+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.
+<p>
+
+<sect1>Defaults for satisfying dependencies - ordering
+<p>
+
+Ordering is significant in dependency fields.
+<p>
+
+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.
+<p>
+
+However, in the absence of other information <tt/dselect/ will offer a
+default selection of the first named package in a list of
+alternatives.
+<p>
+
+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.
+<p>
+
+Therefore a dependency on a virtual package should contain a concrete
+package name as the first alternative, so that this is the default.
+<p>
+
+For example, consider the set of packages:
+
+<example>
+Package: glibcdoc
+Recommends: info-browser
+
+Package: info
+Provides: info-browser
+
+Package: emacs
+Provides: info-browser
+</example>
+
+If <tt/emacs/ and <tt/info/ both have the same priority then
+<tt/dselect/'s choice is essentially random. Better would be
+<example>
+Package: glibcdoc
+Recommends: info | info-browser
+</example>
+so that <tt/dselect/ defaults to selecting the lightweight standalone
+info browser.
+
+<sect1><tt/Replaces/ - overwriting files and replacing packages<label id="replaces">
+<p>
+
+The <tt/Replaces/ control file field has two purposes, which come into
+play in different situations.
+<p>
+
+Virtual packages (<ref id="virtual">) are not considered when looking
+at a <tt/Replaces/ field - the packages declared as being replaced
+must be mentioned by their real names.
+
+<sect2>Overwriting files in other packages
+<p>
+
+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 <tt/--force-overwrite/ flag is enabled by default,
+downgrading the error to a warning,
+<p>
+
+If the overwriting package declares that it replaces the one
+containing the file being overwritten then <tt/dpkg/ will proceed, and
+replace the file from the old package with that from the new. The
+file will no longer be listed as `owned' by the old package.
+<p>
+
+If a package is completely replaced in this way, so that <tt/dpkg/
+does not know of any files it still contains, it is considered to have
+disappeared. It will be marked as not wanted on the system (selected
+for removal) and not installed. Any conffiles details noted in the
+package will be ignored, as they will have been taken over by the
+replacing package(s). The package's <tt/postrm/ script will be run to
+allow the package to do any final cleanup required.
+See <ref id="maintscripts-instact">.
+<p>
+
+In the future <tt/dpkg/ will discard files which overwrite those from
+another package which declares that it replaces the one being
+installed (so that you can install an older version of a package
+without problems).
+<p>
+
+This usage of <tt/Replaces/ only takes effect when both packages are
+at least partially on the system at once, so that it can only happen
+if they do not conflict or if the conflict has been overridden.
+
+<sect2>Replacing whole packages, forcing their removal
+<p>
+
+Secondly, <tt/Replaces/ allows <tt/dpkg/ and <tt/dselect/ to resolve
+which package should be removed when a conflict - see
+<ref id="conflicts">. This usage only takes effect when the two
+packages <em/do/ conflict, so that the two effects do not interfere
+with each other.
+<p>
<sect>Order of processing steps and maintainer script arguments<label id="maintscripts-instact">
+<p>
<sect1>Summary of ways maintainer scripts are called
<p>
<item>
If a version the package is already
installed, call
-<tscreen><verb>
+<example>
<var/old-prerm/ <tt/upgrade/ <var/new-version/
-</verb></tscreen>
+</example>
<item>
If this gives an error (ie, a non-zero exit status), dpkg will
attempt instead:
-<tscreen><verb>
+<example>
<var/new-prerm/ <tt/failed-upgrade/ <var/old-version/
-</verb></tscreen>
+</example>
Error unwind, for both the above cases:
-<tscreen><verb>
+<example>
<var/old-postinst/ <tt/abort-upgrade/ <var/new-version/
-</verb></tscreen>
+</example>
</enum>
<item>
If any packages depended on that conflicting package and
<tt/--auto-deconfigure/ is specified, call, for each such package:
-<tscreen><verb>
+<example>
<var/deconfigured's-prerm/ <tt/deconfigure/
<tt/in-favour/ <var/package-being-installed/ <var/version/
<tt/removing/ <var/conflicting-package/ <var/version/
-</verb></tscreen>
+</example>
Error unwind:
-<tscreen><verb>
+<example>
<var/deconfigured's-postinst/ <tt/abort-deconfigure/
<tt/in-favour/ <var/package-being-installed-but-failed/ <var/version/
<tt/removing/ <var/conflicting-package/ <var/version/
-</verb></tscreen>
+</example>
The deconfigured packages are marked as requiring configuration, so
that if <tt/--install/ is used they will be configured again if
possible.
<item>
To prepare for removal of the conflicting package, call:
-<tscreen><verb>
+<example>
<var/conflictor's-prerm/ <tt/remove/
<tt/in-favour/ <var/package/ <var/new-version/
-</verb></tscreen>
+</example>
Error unwind:
-<tscreen><verb>
+<example>
<var/conflictor's-postinst/ <tt/abort-remove/
<tt/in-favour/ <var/package/ <var/new-version/
-</verb></tscreen>
+</example>
</enum>
<enum>
<item>
If the package is being upgraded, call:
-<tscreen><verb>
+<example>
<var/new-preinst/ <tt/upgrade/ <var/old-version/
-</verb></tscreen>
+</example>
<item>
Otherwise, if the package had some configuration files from a previous
version installed (ie, it is in the `configuration files only' state):
-<tscreen><verb>
+<example>
<var/new-preinst/ <tt/install/ <var/old-version/
-</verb></tscreen>
+</example>
<item>
Otherwise (ie, the package was completely purged):
-<tscreen><verb>
+<example>
<var/new-preinst/ <tt/install/
-</verb></tscreen>
+</example>
Error unwind versions, respectively:
-<tscreen><verb>
+<example>
<var/new-postrm/ <tt/abort-upgrade/ <var/old-version/
<var/new-postrm/ <tt/abort-install/ <var/old-version/
<var/new-postrm/ <tt/abort-install/
-</verb></tscreen>
+</example>
</enum>
<enum>
<item>
If the package is being upgraded, call
-<tscreen><verb>
+<example>
<var/old-postrm/ <tt/upgrade/ <var/new-version/
-</verb></tscreen>
+</example>
<item>
If this fails, <tt/dpkg/ will attempt:
-<tscreen><verb>
+<example>
<var/new-postrm/ <tt/failed-upgrade/ <var/old-version/
-</verb></tscreen>
+</example>
Error unwind, for both cases:
-<tscreen><verb>
+<example>
<var/old-preinst/ <tt/abort-upgrade/ <var/new-version/
-</verb></tscreen>
+</example>
</enum>
<enum>
<item>
<tt/dpkg/ calls:
-<tscreen><verb>
+<example>
<var/disappearer's-postrm/ <tt/disappear/ <var/overwriter/ <var/overwriter-version/
-</verb></tscreen>
+</example>
<item>
The package's maintainer scripts are removed.
<item>
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
-<tt/dpkg/ doesn't know in advance that the package is going to vanish.
+not installed (any conffiles it may have are ignored, rather than
+being removed by <tt/dpkg/). Note that disappearing packages do not
+have their prerm called, because <tt/dpkg/ doesn't know in advance
+that the package is going to vanish.
</enum>
When we configure a package (this happens with <tt/dpkg --install/, or
with <tt/--configure/), we first update the conffiles and then call:
-<tscreen><verb>
+<example>
<var/postinst/ <tt/configure/ <var/most-recently-configured-version/
-</verb></tscreen>
+</example>
<p>
No attempt is made to unwind after errors during configuration.
<enum>
<item>
-<tscreen><verb>
+<example>
<var/prerm/ <tt/remove/
-</verb></tscreen>
+</example>
<item>
The package's files are removed (except conffiles).
<item>
-<tscreen><verb>
+<example>
<var/postrm/ <tt/remove/
-</verb></tscreen>
+</example>
<item>
All the maintainer scripts except the postrm are removed.
<tt/%/-files, <tt/.dpkg-{old,new,tmp}/, etc.) are removed.
<item>
-<tscreen><verb>
+<example>
<var/postrm/ <tt/purge/
-</verb></tscreen>
+</example>
<item>
The package's file list is removed.
No attempt is made to unwind after errors during removal.
+<sect>Configuration file handling<label id="conffiles">
+
+<tt/dpkg/ can do a certain amount of automatic handling of package
+configuration files.
+<p>
+
+Whether this mechanism is appropriate depends on a number of factors,
+but basically there are two approaches to any particular configuration
+file.
+<p>
+
+The easy method is to ship a best-effort configuration in the package,
+and use <tt/dpkg/'s conffile mechanism to handle updates. If the user
+is unlikely to want to edit the file, but you need them to be able to
+without losing their changes, and a new package with a changed version
+of the file is only released infrequently, this is a good approach.
+<p>
+
+The hard method is to build the configuration file from scratch in the
+<tt/postinst/ script, and to take the responsibility for fixing any
+mistakes made in earlier versions of the package automatically. This
+will be appropriate if the file is likely to need to be different on
+each system.
+
+<sect1>Automatic handling of configuration files by <tt/dpkg/
+<p>
+
+A package may contain a control area file called <tt/conffiles/. This
+file should be a list of filenames of configuration files needing
+automatic handling, separated by newlines. The filenames should be
+absolute pathnames, and the files referred to should actually exist in
+the package.
+<p>
+
+When a package is upgraded, during the configuration state shortly
+before <tt/dpkg/ runs the package's <tt/postinst/ script, it will
+process the configuration files.
+<p>
+
+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.
+<p>
+
+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.
+<p>
+
+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.
+<p>
+
+When a package is installed for the first time <tt/dpkg/ will install
+the file that comes with it, unless that would mean overwriting a file
+already on the filesystem.
+<p>
+
+However, note that <tt/dpkg/ will <em/not/ replace a conffile file
+that was removed by the user (or by a script). This is necessary
+because for some programs' configuration files a missing file produces
+an effect hard or impossible to achieve in another way, so that a
+missing file needs to be kept that way if the user did it.
+<p>
+
+Note that a package should <em/not/ modify a <tt/dpkg/-handled
+conffile in its maintainer scripts. Doing this will lead to <tt/dpkg/
+asking the user confusing and possibly dangerous questions when the
+package is upgraded.
+
+<sect2>Fully-featured maintainer script configuration handling
+<p>
+
+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 <tt/postinst/ script.
+<p>
+
+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.
+<p>
+
+When using this method there are a number of important issues which
+should be considered:
+<p>
+
+The package's <tt/postinst/ should be written so that
+
+
<sect>Dangling references
+<p>
<sect1>Would dangle to conffiles<label id="conffiles">
+<p>
There would be a dangling xref here. Instead I've just put this dummy
text in.
<sect1>Would dangle to descriptions<label id="descriptions">
+<p>
There would be a dangling xref here. Instead I've just put this dummy
text in.
&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);
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;
# Copyright (C) 1994 Ian Murdock <imurdock@debian.org>
-# Copyright (C) 1994,1995 Ian Jackson <ijackson@nyx.cs.du.edu>
+# Copyright (C) 1994,1995,1996 Ian Jackson <ijackson@nyx.cs.du.edu>
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
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
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"'";
--- /dev/null
+.\" This manpage is copyright (C) 1996 Michael Shields <shields@crosslink.net>.
+.\"
+.\" 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).
-#!/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
-# <package> <priority> <section> <maintainer>
-# where the <maintainer> field is optional. Fields are separated by
-# whitespace. The <maintainer> field may be <old-maintainer> => <new-maintainer>
-# (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 (<F>) {
chop($fn=$_);
- substr($fn,0,length($binarydir)) eq $binarydir || die $fn;
- open(C,"dpkg-deb -I $fn control |") || die "$fn $!";
- $t=''; while (<C>) { $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($_=<C>); 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($_=<C>); 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);
@samemaint=();
-open(O,"<$override") || die $!;
-while(<O>) {
+open(O, $override)
+ or die "Couldn't open override file $override: $!\n";
+while (<O>) {
+ 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 $!;
$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=();
}
$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);
@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 $!;
-#define DPKG_VERSION "1.2.11" /* This line modified by Makefile */
+#define DPKG_VERSION "1.2.13" /* This line modified by Makefile */