Просмотр исходного кода

Merge commit 'origin/master' into v3

Frank Lichtenheld лет назад: 18
Родитель
Сommit
4fdfd56bd3
100 измененных файлов с 13710 добавлено и 11057 удалено
  1. 0 1
      .gitignore
  2. 572 0
      ChangeLog
  3. 3 2
      Makefile.am
  4. 22 0
      README.api
  5. 94 0
      README.feature-removal-schedule
  6. 100 1
      THANKS
  7. 35 24
      TODO
  8. 10 9
      configure.ac
  9. 153 3
      debian/changelog
  10. 8 8
      debian/control
  11. 2 0
      debian/dpkg.docs
  12. 0 1
      debian/dpkg.install
  13. 4 2
      debian/rules
  14. 4 1
      dpkg-deb/Makefile.am
  15. 10 8
      dpkg-deb/build.c
  16. 23 17
      dpkg-deb/extract.c
  17. 5 5
      dpkg-deb/info.c
  18. 27 25
      dpkg-deb/main.c
  19. 6 2
      dpkg-split/Makefile.am
  20. 2 1
      dpkg-split/join.c
  21. 2 1
      dpkg-split/queue.c
  22. 7 2
      dselect/Makefile.am
  23. 1 0
      dselect/bindings.cc
  24. 15 0
      dselect/pkgcmds.cc
  25. 2 0
      dselect/pkgkeys.cc
  26. 1 0
      dselect/pkglist.h
  27. 8 0
      dselect/po/ChangeLog
  28. 15 39
      dselect/po/eu.po
  29. 7 10
      dselect/po/ro.po
  30. 0 17
      getopt/Makefile.am
  31. 0 60
      getopt/closeout.c
  32. 0 10
      getopt/closeout.h
  33. 0 62
      getopt/error.h
  34. 0 83
      getopt/long-options.c
  35. 0 32
      getopt/long-options.h
  36. 3 2
      lib/Makefile.am
  37. 1 3
      lib/database.c
  38. 11 6
      lib/dpkg.h
  39. 19 4
      lib/mlib.c
  40. 4 5
      lib/myopt.c
  41. 1 2
      lib/parse.c
  42. 3 5
      lib/parsedump.h
  43. 3 3
      lib/showpkg.c
  44. 9 28
      lib/tarfn.c
  45. 0 36
      lib/vercmp.c
  46. 0 0
      libcompat/.gitignore
  47. 22 0
      libcompat/Makefile.am
  48. 0 0
      libcompat/getopt.c
  49. 0 0
      libcompat/getopt.h
  50. 0 0
      libcompat/getopt1.c
  51. 0 0
      libcompat/obstack.c
  52. 0 0
      libcompat/obstack.h
  53. 2 2
      m4/arch.m4
  54. 14 0
      m4/funcs.m4
  55. 2 2
      m4/libs.m4
  56. 22 0
      man/ChangeLog
  57. 15 7
      man/dpkg-buildpackage.1
  58. 6 0
      man/dpkg-checkbuilddeps.1
  59. 7 5
      man/dpkg-genchanges.1
  60. 31 2
      man/dpkg-gensymbols.1
  61. 2 2
      man/dpkg-parsechangelog.1
  62. 1 2
      man/dpkg-source.1
  63. 7 0
      man/dselect.1
  64. 474 203
      man/po/de.po
  65. 368 140
      man/po/dpkg-man.pot
  66. 411 185
      man/po/es.po
  67. 415 179
      man/po/fr.po
  68. 389 174
      man/po/hu.po
  69. 400 177
      man/po/ja.po
  70. 417 172
      man/po/pl.po
  71. 399 174
      man/po/pt_BR.po
  72. 393 177
      man/po/ru.po
  73. 467 198
      man/po/sv.po
  74. 61 22
      man/start-stop-daemon.8
  75. 0 4
      man/update-alternatives.8
  76. 26 3
      po/ChangeLog
  77. 0 1
      po/POTFILES.in
  78. 354 360
      po/bs.po
  79. 357 360
      po/ca.po
  80. 358 361
      po/cs.po
  81. 358 361
      po/da.po
  82. 358 362
      po/de.po
  83. 354 360
      po/dpkg.pot
  84. 358 361
      po/dz.po
  85. 354 360
      po/el.po
  86. 358 361
      po/es.po
  87. 354 360
      po/et.po
  88. 359 362
      po/eu.po
  89. 358 362
      po/fr.po
  90. 358 362
      po/gl.po
  91. 357 360
      po/hu.po
  92. 354 360
      po/id.po
  93. 357 360
      po/it.po
  94. 358 361
      po/ja.po
  95. 357 360
      po/km.po
  96. 677 1131
      po/ko.po
  97. 354 360
      po/ku.po
  98. 357 360
      po/mr.po
  99. 358 362
      po/nb.po
  100. 0 0
      po/ne.po

+ 0 - 1
.gitignore

@@ -1,6 +1,5 @@
 build-tree
 config
-intl
 ABOUT-NLS
 INSTALL
 Makefile

+ 572 - 0
ChangeLog

@@ -1,3 +1,575 @@
+2008-02-07  Guillem Jover  <guillem@debian.org>
+
+	* scripts/dpkg-gencontrol.pl: Do not output the Homepage field on udeb.
+
+2008-02-04  Guillem Jover  <guillem@debian.org>
+
+	* libcompat/Makefile.am (localedir): Remove unused variable.
+	(INCLUDES): Do not pass -DLOCALEDIR nor -I$(top_srcdir)/lib.
+
+2008-02-03  Guillem Jover  <guillem@debian.org>
+
+	* m4/funcs.m4 (DPKG_CHECK_COMPAT_FUNCS): New macro.
+	* configure.ac (DPKG_CHECK_COMPAT_FUNCS): Check getopt, getopt_long
+	and obstack_free.
+	* libcompat/Makefile.am (libcompat_a_SOURCES): Set empty by default.
+	Only add 'getopt.c getopt.h' if !HAVE_GETOPT. Only add 'getopt1.c'
+	if !HAVE_GETOPT_LONG. Only add 'obstack.c obstack.h' if
+	!HAVE_OBSTACK_FREE.
+	(INCLUDES): Add '-idirafter $(top_srcdir)/libcompat'.
+	* dpkg-deb/Makefile.am (INCLUDES): Likewise.
+	* dpkg-split/Makefile.am (INCLUDES): Likewise.
+	* dselect/Makefile.am (INCLUDES): Likewise.
+	* lib/Makefile.am (INCLUDES): Likewise.
+	* src/Makefile.am (INCLUDES): Likewise.
+	* utils/Makefile.am (INCLUDES): Use -idirafter instead of -I for
+	'$(top_srcdir)/libcompat'.
+
+	* src/Makefile.am (dpkg_LDADD): Add '../libcompat/libcompat.a'.
+	(dpkg_query_LDADD): Likewise.
+	* dpkg-deb/Makefile.am (dpkg_deb_LDADD): Likewise.
+	* dpkg-split/Makefile.am (dpkg_split_LDADD): Likewise.
+	* dselect/Makefile.am (dselect_LDADD): Likewise.
+
+2008-02-03  Guillem Jover  <guillem@debian.org>
+
+	* libcompat/Makefile.am (libcompat_a_SOURCES): Remove closeout.c,
+	closeout.h, error.h, long-options.c and long-options.h.
+	* libcompat/closeout.c: Remove unused file.
+	* libcompat/closeout.h: Likewise.
+	* libcompat/error.h: Likewise.
+	* libcompat/long-options.c: Likewise.
+	* libcompat/long-options.h: Likewise.
+
+2008-02-03  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-shlibdeps.pl: Handle better the case when the
+	library found has a different soname than the one used to look up
+	the library file. Properly affect symbols coming from it to the
+	soname wanted by the binary, thus avoiding invalid warnings about
+	unused library.
+
+2008-01-31  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-genchanges.pl: Always list all binary packages in
+	the Description field of generated .changes files.
+
+2008-01-30  Frank Lichtenheld  <djpig@debian.org>
+
+	* scripts/dpkg-buildpackage.pl: Warn if build-dependencies
+	are not satisfied during -S. Also warn that this might become
+	an error in the future.
+
+2008-01-30  Justin Pryzby  <jpryzby+d@quoininc.com>
+
+	* utils/start-stop-daemon.c (do_help): Clarify --name and --user
+	options.
+	(parse_options): Reword --make-pidfile badusage.
+	(pid_is_cmd): Fix typo in comment.
+	* man/start-stop-daemon.8: Cosmetic fixes. Document that --chuid
+	will change the group even if it has not been specified. Add EXIT
+	STATUS and EXAMPLE sections.
+
+2008-01-29  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-buildpackage.pl: Add a new -R option to be able to replace
+	"debian/rules" by something else. The replacement command can contain
+	parameters (and thus spaces). Fix -r option to also accept parameters.
+	* man/dpkg-buildpackage.1: Document the new option and the changed
+	behaviour of -r.
+
+2008-01-28  Guillem Jover  <guillem@debian.org>
+
+	* getopt: Rename to ...
+	* libcompat: ... this.
+	* configure.ac (AC_CONFIG_FILES): Likewise.
+	* Makefile.am (SUBDIRS): Likewise.
+	* utils/Makefile.am (INCLUDES): Likewise.
+	(start_stop_daemon_LDADD): Use '../libcompat/libcompat.a' instead of
+	'../getopt/libopt.a'.
+	* libcompat/Makefile.am (noinst_LIBRARIES): Rename 'libopt.a' to
+	'libcompat.a'.
+	(libopt_a_SOURCES): Rename to ...
+	(libcompat_a_SOURCES): ... this.
+
+2008-01-27  Raphael Hertzog  <hertzog@debian.org>
+
+	* README.feature-removal-schedule: Deprecate support of substvars
+	in dpkg-source and dpkg-genchanges.
+	* README.feature-removal-schedule, README.api: Deprecate support
+	of custom changelog parsers that understand only the -v option.
+	* README.feature-removal-schedule: Deprecate support of PGP.
+
+2008-01-27  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/Dpkg/Shlibs/SymbolFile.pm: Replace has_new_libs(),
+	has_lost_libs(), has_new_symbols() and has_lost_symbols() by
+	corresponding get_* functions.
+	* scripts/dpkg-gensymbsols.pl: Display list of new/lost libs. Also
+	display list of lost symbols when wildcards symbols have been
+	used.
+	* scripts/t/200_Dpkg_Shlibs.t: Adjust test suite to API change.
+
+2008-01-25  Andreas Påhlsson  <andreas.pahlsson@xcerion.com>
+
+	* utils/start-stop-daemon.c (tsub): Remove function.
+	(tmul): Fix normalization.
+	(run_stop_schedule): Use timersub instead of tsub.
+
+2008-01-24  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-genchanges.pl: Warn if the current version is
+	smaller than the previous one.
+
+	* scripts/dpkg-checkbuilddeps.pl: Add support of options -d and -c to use
+	build dependencies/conflicts given on the command line instead of those
+	retrieved from debian/control.
+	* man/dpkg-checkbuilddeps.1: Document the new options.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* dpkg-deb/extract.c (extracthalf): Refactor fflush and its buggy
+	fpos handling to ...
+	(safe_fflush): ... here. New function.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* lib/vercmp.c [0] (verrevcmp): Remove dead code.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* lib/dpkg.h [!offsetof] (offsetof): New compatibilty macro.
+	* lib/parsedump.h (PKGIFPOFF): Use offsetof instead of ad-hoc
+	calculation.
+	(FILEFOFF): Likewise.
+	(struct fieldinfo): Change integer member type to size_t.
+	* lib/tarfn.c (TarChecksumOffset): Use offsetof instead of ad-hoc
+	calculation.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac (AC_CHECK_HEADERS): Check for 'stddef.h'.
+
+2008-01-21  Colin Watson  <cjwatson@debian.org>
+
+	* dselect/pkgkeys.cc (packagelist_korgbindings): Add 'C'.
+	(packagelist_kinterps): Add 'revertinstalled'.
+	* dselect/bindings.cc (keybindings::descriptions): Likewise.
+	* dselect/pkglist.h (class packagelist): Add kd_revertinstalled.
+	* dselect/pkgcmds.cc (packagelist::kd_revertinstalled): New method.
+	* man/dselect.1: Document new 'C' keybinding.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* dpkg-deb/build.c (getfi): Use m_malloc instead of malloc.
+	(do_build): Likewise.
+	* dpkg-deb/extract.c (extracthalf): Likewise.
+	* lib/mlib.c (buffer_write): Likewise.
+	(buffer_copy): Likewise.
+	* lib/myopt.c (loadcfgfile): Likewise.
+	* lib/parse.c (parsedb): Likewise.
+	* lib/showpkg.c (alloclstitem): Likewise.
+	(parsefield): Likewise.
+	(parsestring): Likewise.
+	* lib/tarfn.c (StoC): Likewise.
+	(TarExtractor): Likewise.
+	* src/archives.c (try_deconfigure_can): Likewise.
+	* src/main.c (execbackend): Likewise.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* lib/mlib.c (m_strdup): New function.
+	* lib/dpkg.h (m_strdup): New declaration.
+	* lib/tarfn.c: Include <dpkg.h>.
+	(TarExtractor): Use m_strdup instead of strdup.
+	* lib/database.c (findpackage): Likewise.
+	* lib/myopt.c (myfileopt): Likewise.
+	* dpkg-deb/build.c (getfi): Likewise.
+	* src/configure.c (md5hash): Likewise.
+	* src/help.c (vbuildarglist): Likewis.
+	* src/main.c (execbackend): Likewise.
+	(commandfd): Likewise.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac: Bump version to 1.14.17~.
+
+2008-01-26  Raphael Hertzog  <hertzog@debian.org>
+
+	* configure.ac: Release 1.14.16.6.
+
+2008-01-26  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-gensymbols: Don't scan directories which are
+	symlinks. They might point outside of the package build dir which
+	results in addition of libraries which are not in the package.
+	The libc6 package on amd64 is affected with a symlink "lib64" ->
+	"/lib".
+
+2008-01-24  Raphael Hertzog  <hertzog@debian.org>
+
+	* configure.ac: Release 1.14.16.5.
+
+2008-01-24  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/Dpkg/Shlibs/SymbolFile.pm (load): Remove the loaded file
+	from the %$seen hash at the end so that it's possible to include
+	multiple times the same file (at the same level and not from any
+	nested file obviously).
+
+	* scripts/Dpkg/Shlibs/SymbolFile.pm: Blacklist many armel specific
+	symbols.
+
+2008-01-23  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac: Release 1.14.16.4.
+
+2008-01-23  Guillem Jover  <guillem@debian.org>
+
+	* scripts/Dpkg/Cdata.pm: Import capit from Dpkg::Fields.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac: Release 1.14.16.3.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (tvselector): Remove typedef.
+	(tvselector_sec): Remove function.
+	(tvselector_usec): Likewise.
+	(TVCALC_ELEM): Remove macro.
+	(TVCALC): Likewise.
+	(tsub): New function.
+	(tmul): Likewise.
+	(run_stop_schedule): Use tsub and tmul instead of TVCALC. Make sure
+	the time is not negative.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (main): Only call initgroups if changeuser
+	is not NULL.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (gid_in_current_groups): Remove function.
+	(main): Call initgroups if the real user or group are different than
+	the ones we should switch to. Call setgid before initgroups.
+
+2008-01-22  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-genchanges.pl, scripts/dpkg-gencontrol.pl,
+	scripts/dpkg-source.pl: Remove the IO-layer that converts to
+	UTF-8. It's not as smart as I expected.
+
+	* scripts/dpkg-genchanges.pl: Do not substitute variables on
+	the output.
+	* man/dpkg-genchanges.pl: Document this change.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac: Release 1.14.16.2.
+
+2008-01-22  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (main): Move setuid code after initgroups
+	and setgid.
+
+2008-01-21  Frank Lichtenheld  <djpig@debian.org>
+
+	* configure.ac: Release 1.14.16.1
+
+	* scripts/dpkg-source.pl: Fix "uninitialized value"
+	warning.
+
+	* debian/control: Add libtimedate-perl to
+	dpkg-dev's Depends and to Build-Depends (for
+	build-time tests). This introduces our first
+	run-time dependency on a perl module not shipped
+	with Perl itself. But to me it seems not worth
+	trying to replace that code.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac: Release 1.14.16.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* README.api: New file.
+	* README.feature-removal-schedule: Likewise.
+	* Makefile.am (EXTRA_DIST): Add README.feature-removal-schedule and
+	README.api.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac (AC_CHECK_FUNCS): Escape new lines.
+
+2008-01-21  Ian Jackson  <ian@davenant.greenend.org.uk>
+
+	* src/processarc.c (process_archive): Fix incorrect sizeof in a
+	memset call.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (main): Cast runas_uid and runas_gid to
+	uid_t and gid_t when comparing to getuid() and getgid().
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac (AC_CHECK_FUNCS): Merge arguments from both macro
+	calls.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac (AM_GNU_GETTEXT): Add external.
+	(AC_CHECK_FUNCS): Add strtoul.
+	(AC_CONFIG_FILES): Remove 'intl/Makefile'.
+	* .gitignore: Remove intl.
+	* Makefile.am (SUBDIRS): Likewise.
+	* dpkg-deb/Makefile.am (INCLUDES): Remove '-I$(top_srcdir)/intl'.
+	* dpkg-split/Makefile.am (INCLUDES): Likewise.
+	* dselect/Makefile.am (INCLUDES): Likewise.
+	* getopt/Makefile.am (INCLUDES): Likewise.
+	* lib/Makefile.am (INCLUDES): Likewise.
+	* src/Makefile.am (INCLUDES): Likewise.
+	* utils/Makefile.am (INCLUDES): Likewise.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac (AC_CHECK_FUNCS): Add getdtablesize.
+	* utils/start-stop-daemon.c (get_open_fd_max): New function.
+	(main) [OShpux]: Remove.
+	[!OShpux]: Use get_open_fd_max instead of hardcoded getdtablesize.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* man/start-stop-daemon.8: Fix quotation to get rid of a spurious
+	space between -c option and comma.
+
+2008-01-20  Guillem Jover  <guillem@debian.org>
+
+	* man/start-stop-daemon.8: Coalesce all matching options into a new
+	section. List matching options by reference in the description
+	section.
+
+2008-01-20  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (do_version): Change from 'Mandatory' to
+	'Matching'. Suggested by Justin Pryzby.
+
+2008-01-20  Frank Lichtenheld  <djpig@debian.org>
+
+	* scripts/dpkg-buildpackage.pl: Move most functions to end of file
+	to allow better reading of the program flow. This is a remnant of
+	the shell script past.
+
+2008-01-19  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-buildpackage.pl: Use
+	Dpkg::Changelog::parse_changelog() instead of calling
+	dpkg-parsechangelog.
+
+	* scripts/dpkg-checkbuilddeps.pl: Fix a bug left-over from the
+	switch to Dpkg::Control.
+
+2008-01-18  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/Dpkg/Shlibs/SymbolFile.pm,
+	scripts/Dpkg/Shlibs/Objdump.pm, scripts/Dpkg/Shlibs.pm: Update and
+	fix many syserr(), error(), warning() and subprocerr() calls to
+	the new style where the sprintf call is integrated. Uniformize
+	some error messages at the same time.
+
+2008-01-18  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/Dpkg/Shlibs/SymbolFile.pm (load): Parse *@<version>
+	symbols names as wildcards and not as regular symbols. They
+	provide the same dependency information for all symbols that share
+	the same version.
+	* scripts/Dpkg/Shlibs/SymbolFile.pm (merge_symbols): Use
+	information provided by wildcards entries when new symbols are
+	added.
+	* scripts/dpkg-gensymbols.pl: Disable some checks which can't be
+	done when symbols files have been generated with the help of
+	wildcard entries.
+	* man/dpkg-gensymbols.1: Update the manual page to explain how to
+	use wildcard entries.
+
+2008-01-18  Frank Lichtenheld  <djpig@debian.org>
+
+	* scripts/changelog/debian.pl: Don't hide failures inside eval().
+	* scripts/Dpkg/Changelog.pm (data2rfc822): Don't fail if argument
+	is undef.
+
+2008-01-18  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/Dpkg/Changelog.pm (parse_changelog): Rewrite it completely
+	to not call dpkg-parsechangelog but do the work of this program by itself.
+	* scripts/dpkg-parsechangelog.pl: Rewrote it to use the enhanced
+	parse_changelog() function.
+	* scripts/dpkg-genchanges.pl, script/dpkg-gencontrol.pl: Adapted to use
+	the modified parse_changelog().
+	* scripts/dpkg-gensymbols.pl, scripts/dpkg-source.pl: Likewise.
+
+	* scripts/dpkg-genchanges.pl: Change logic of -si option to
+	include the original tarball only if the current upstream version differs
+	from the upstream version of the previous changelog entry.
+
+	* scripts/dpkg-genchanges.pl: Some code refactoring. Also fix the
+	generation of the Description field to not have duplicate description
+	in case of udeb (a single description per binary package is enough).
+	Source only uploads will loose their Description: fields since they
+	have no associated binary packages and Descriptions are only added
+	for binary packages where we have a corresponding .deb to upload.
+
+2008-01-18  Guillem Jover  <guillem@debian.org>
+
+	* m4/arch.m4 (_DPKG_ARCHITECTURE): Do not use backticks inside double
+	quotes, to support ancient shells.
+	* m4/libs.m4 (DPKG_LIB_SELINUX): Likewise.
+
+2008-01-18  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (do_help): Coalesce mandatory options
+	into a single paragraph, and state that at least one is required.
+
+2008-01-18  Guillem Jover  <guillem@debian.org>
+
+	* configure.ac (AC_CHECK_SIZEOF): Quote parameters.
+
+2008-01-18  Guillem Jover  <guillem@debian.org>
+
+	* THANKS: Add all the people that have contributed until now.
+
+2008-01-18  Guillem Jover  <guillem@debian.org>
+
+	* src/remove.c (ensure_pathname_nonexisting): Additionally check if
+	errno is EEXIST after calling rmdir, per SUSv3 when the directory
+	is not empty errno can be ENOTEMPTY or EEXIST.
+	* src/help.c (removal_bulk_remove_files): Likewise.
+	(removal_bulk_remove_leftover_dirs): Likewise.
+
+2008-01-18  Guillem Jover  <guillem@debian.org>
+
+	* scripts/update-alternatives.pl: Stop parsing '--test' as a valid
+	option.
+	($testmode): Remove variable.
+	(usage): Remove '--test' option help.
+	* man/update-alternatives.8: Remove '--test' documentation.
+
+2008-01-18  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (do_help): Add missing semicolon.
+
+2008-01-17  Guillem Jover  <guillem@debian.org>
+
+	* THANKS: Convert to UTF-8.
+
+2008-01-17  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (do_help): Move version printing to ...
+	(do_version): ... here. New function.
+	(main): Call do_version instead of printf.
+
+2008-01-17  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-genchanges.pl: Reinstate support of the ${Format}
+	substvars.
+
+2008-01-17  Samuel Thibault  <samuel.thibault@ens-lyon.org>,
+            Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (gid_in_current_groups): New function.
+	(main): Call setuid only if requested to run as a different user
+	than the current one. Call setgid only if requested to run as a group
+	different than the current one, and initgroups only if the groups is
+	not part of the supplementary groups.
+
+2008-01-16  Frank Lichtenheld  <djpig@debian.org>
+
+	* scripts/changelog/debian.pl: Restore the old default behaviour
+	to parse STDIN. Also fix the -l option to specify a label for the
+	parsed input, but the actual file. Still allow --file to be used for
+	that. Use the new inhandle option of parse() to pass STDIN directly.
+	This should be faster and removes the implicit dependency on
+	IO::String.
+
+	* scripts/Dpkg/Changelog/Debian.pm (parse): Accept input in
+	configuration item 'inhandle'. Allow to override the name of the
+	file (used for reporting) with configuration item 'reportfile'.
+	* scripts/Dpkg/Changelog.pm (init): Call parse if 'inhandle' is given.
+
+	* scripts/dpkg-parsechangelog.pl: Remove one superfluous %s from a
+	formatstring which was used to output $! before syserr() was used
+	instead.
+
+2008-01-16  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (do_stop): Do not print messages when
+	running on quiet and test modes.
+	(run_stop_schedule): Likewise.
+	(main): Likewise.
+
+2008-01-16  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c (do_pidfile): Cache pid value over
+	multiple calls.
+
+2008-01-16  Guillem Jover  <guillem@debian.org>
+
+	* utils/start-stop-daemon.c: Fix indentation.
+
+2008-01-16  Guillem Jover  <guillem@debian.org>
+
+	* scripts/dpkg-divert.pl: Use :errno_h from POSIX.
+	($enoent): Remove variable.
+	(ENOENT): Remove function.
+	* scripts/update-alternatives.pl: Likewise.
+	* utils/Makefile.am (pkglib_PROGRAMS): Remove variable.
+	(enoent_SOURCES): Likewise.
+	* utils/enoent.c: Remove file.
+
+2008-01-16  Guillem Jover  <guillem@debian.org>
+
+	* dpkg-deb/build.c (do_build): Use NULL instead of 0.
+	* dpkg-deb/extract.c (extracthalf, do_fsystarfile): Likewise.
+	* dpkg-deb/info.c (info_prepare, info_spew): Likewise.
+	(do_contents, do_field): Likewise.
+	* dpkg-deb/main.c (cipaction, action, cmdinfos, main): Likewise.
+	* dpkg-split/join.c (do_join): Likewise.
+	* dpkg-split/queue.c (do_auto): Likewise.
+	* lib/dpkg.h (standard_startup, standard_shutdown): Likewise.
+	* src/archives.c (destroyobstack, deconfigure, addfiletolist)
+	(tarobject, check_breaks, check_conflict, archivefiles)
+	(newconff_append): Likewise.
+	* src/configure.c (deferred_configure, conffderef, md5hash): Likewise.
+	* src/depcon.c (findbreakcyclerecursive, findbreakcycle)
+	(depisok): Likewise.
+	* src/enquiry.c (limiteddescription, badstatinfos, unpackchk)
+	(assertversion, assertpredep, assertepoch, assertlongfilenames)
+	(assertmulticonrep, predeppackage, cmpversions): Likewise.
+	* src/errors.c (reports, print_error_perpackage): Likewise.
+	* src/filesdb.c (diversions, diversionsfile, statoverridefile)
+	(ensure_packagefiles_available, ensure_allinstfiles_available)
+	(write_filelist_except, reversefilelist_init, reversefilelist_next)
+	(ensure_diversions, iterfilestart, iterfilenext, filesdbinit)
+	(findnamenode): Likewise.
+	* src/help.c (checkpath, ensure_package_clientdata
+	(vbuildarglist, cu_restorescriptsignals, script_catchsignals)
+	(clear_istobes): Likewise.
+	* src/main.c (cipaction, ignoredepends, forceinfos)
+	(ACTION, OBSOLETE, ACTIONBACKEND, cmdinfos)
+	(execbackend, commandfd, main): Likewise.
+	* src/packages.c (queuehead, add_to_queue, packages, process_queue)
+	(breakses_ok, dependencies_ok): Likewise.
+	* src/processarc.c (process_archive): Likewise.
+	* src/remove.c (deferred_remove, removal_bulk_remove_files)
+	(removal_bulk_remove_leftover_dirs, removal_bulk_remove_configfiles)
+	(removal_bulk): Likewise.
+	* src/update.c (updateavailable): Likewise.
+	* utils/start-stop-daemon.c (xgettimeofday, run_stop_schedule)
+	(parse_options): Likewise.
+	(pid_is_cmd, pid_is_user, pid_is_exec) [HAVE_KVM_H]: Likewise.
+
 2008-01-15  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/dpkg-shlibdeps.pl (filter_deps): Fix filtering of

+ 3 - 2
Makefile.am

@@ -5,8 +5,7 @@ if WITH_DSELECT
 endif
 
 SUBDIRS = \
-	intl \
-	getopt \
+	libcompat \
 	lib \
 	src \
 	$(MAYBE_DSELECT) \
@@ -24,6 +23,8 @@ ACLOCAL_AMFLAGS = -I m4
 dist_pkgdata_DATA = cputable ostable triplettable
 
 EXTRA_DIST = \
+	README.api \
+	README.feature-removal-schedule \
 	README.translators \
 	debian/archtable \
 	debian/changelog \

+ 22 - 0
README.api

@@ -0,0 +1,22 @@
+This is an (incomplete) list of currently provided APIs by dpkg, and
+their supported status.
+
+
+What: Dpkg (perl modules)
+Status: testing
+Description:
+ The API provided by these modules is not yet stable, it's only supposed to
+ be used internally by dpkg for now.
+
+What: custom changelog parsers in /usr/lib/dpkg/parsechangelog
+Status: stable
+Version: 2.0
+Description:
+ Since dpkg 1.14.16, the set of command-line options that custome
+ changelog parsers must support has been expanded (see
+ dpkg-parsechangelog(1)). For compatibility, changelog parsers supporting
+ only the old options are supported in lenny. In lenny+1, that support
+ will be dropped.
+ .
+ For reference, only the -v option was supported in version 1.0 of this
+ API.

+ 94 - 0
README.feature-removal-schedule

@@ -0,0 +1,94 @@
+This is a list of features that are scheduled to be removed from dpkg.
+
+
+What: 822-date (program)
+Status: obsolete
+When: lenny+1
+Warning: program
+Why:
+ Should switch to use 'date -R'.
+
+What: cleanup-info (program)
+Status: deprecated
+When: lenny
+Warning: none
+Why:
+ This program was needed long time ago to fixup broken info dir files
+ generated by buggy install-info programs. Should not be needed anymore.
+
+What: Source-Version (substvar)
+Status: obsolete
+When: lenny+1
+Warning: lintian (substvar-source-version-is-deprecated)
+Why:
+ The semantics of Source-Version are missleading when applied to binNMUs.
+ Should switch to use binary:Version or source:Version substvars.
+
+What: Revision, Package-Revision, Package_Revision, Class, Recommended,
+      Optional (field)
+Status: obsolete
+When: lenny+1
+Warning: program
+Why:
+ These fields have been superseded by either other fields with better names
+ or values in other fields.
+
+What: recommended, contrib, base (priority)
+Status: obsolete
+When: lenny+1
+Warning: none
+Why:
+ These priorities have been superseded by either other fields or values in
+ other fields.
+
+What: --force-auto-install (dpkg option)
+Status: obsolete
+When: lenny+1
+Warning: program
+
+What: --largemem, --smallmem (dpkg option)
+Status: obsolete
+When: lenny+1
+Warning: program
+
+What: --no-auto-select (dpkg option)
+Status: deprecated
+When: lenny+1
+Warning: none
+
+What: -u, --udeb (dpkg-scanpackages option)
+Status: deprecated
+When: lenny+1
+Warning: none
+Why:
+ This option has been superseded by -tudeb.
+
+What: substvars support in dpkg-source and dpkg-genchanges
+Status: deprecated
+When: lenny+1
+Warning: program
+Why:
+ substvars do not make sense during generation of .dsc and .changes files.
+ This also means that it won't be possible anymore to override the Format
+ field output by dpkg-genchanges.
+
+What: support of custom changelog parsers understanding only -v
+Status: obsolete
+When: lenny+1
+Warning: none
+Why:
+ The debian changelog parser has been enhanced. It supports new options
+ that enable more fine-grained retrieval of information. Those new options
+ will be used by scripts (like dpkg-genchanges).
+ .
+ Custom changelog parsers must be updated to support the new API (see
+ dpkg-parsechangelog(1) and README.api).
+
+What: support of PGP
+Status: deprecated
+When: lenny+1
+Warning: program
+Why:
+ PGP is not part of Debian and GnuPG has been the standard tool for digital
+ signatures for several years already. Supporting only GnuPG enables us to
+ rely on some of its features.

+ 100 - 1
THANKS

@@ -1,64 +1,163 @@
+A Costa <agcosta@gis.net>
+Aaron M. Ucko <ucko@debian.org>
 Adam Heath <doogie@debian.org>
+Adeodato Simó <adeodato@debian.org>
 Alberto Garcia <berto@gpul.org>
+Anand Kumria <wildfire@progsoc.org>
+Andreas Barth <aba@not.so.argh.org>
+Andreas Metzler <ametzler@debian.org>
+Andreas PÃ¥hlsson <andreas.pahlsson@xcerion.com>
+Andrew Ferrier <andrew@new-destiny.co.uk>
 Andrew Hobson <ahobson@eng.mindspring.net>
 Andrew Suffield <asuffield@debian.org>
+Anthony Towns <aj@azure.humbug.org.au>
+Aurelien Jarno <aurel32@debian.org>
+Bart Cornelis <cobaco@skolelinux.no>
+Bart Martens <bart.martens@advalvas.be>
+Bastian Kleineidam <calvin@debian.org>
 Ben Collins <bcollins@debian.org>
+Ben Pfaff <blp@cs.stanford.edu>
+Branden Robinson <branden@debian.org>
 Branko Lankester
 Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
 Bruce Perens <bruce@pixar.com>
 Carl Streeter <streeter@cae.wisc.edu>
 Carlos Laviola <claviola@brfree.com.br>
+Carlos Z.F. Liu <carlosliu@users.sourceforge.net>
+Changwoo Ryu <cwryu@debian.org>
 Charles Briscoe-Smith <cpbs@debian.org>
 Christian Haggstrom <chm@c00.info>
+Christoph Maser <cm@financial.com>
 Christophe Le Bars <clebars@teaser.fr>
+Claus Hindsgaul <claus.hindsgaul@gmail.com>
+Clytie Siddall <clytie@riverland.net.au>
 Colin Plumb <colin@nyx.net>
 Colin Watson <cjwatson@debian.org>
+Dafydd Harries <daf@muse.19inch.net>
 Dan Gohman <gohmandj@mrs.umn.edu>
 Daniel Jacobowitz <dan@debian.org>
+Daniel Leidert <daniel.leidert@wgdd.de>
+Daniel Nylander <yeager@lidkoping.net>
 Darren Stalder <torin@daft.com>
 David Huggins-Daines <dhd@debian.org>
+David Lopez Moreno <david.lopez.moreno@hispalinux.es>
+Denis Barbier <barbier@debian.org>
+Don Armstrong <don@debian.org>
+Eddy Petrișor <eddy.petrisor@gmail.com>
 Erick Branderhorst <branderhorst@heel.fgg.eur.nl>
+Flavio Stanchina <flavio@stanchina.net>
+Frank S. Thomas <frank@thomas-alfeld.de>
+Frédéric Bothamy <frederic.bothamy@free.fr>
 Galen Hazelwood <galenh@debian.org>
 Goswin Brederlow <brederlo@informatik.uni-tuebingen.de>
 Guy Maor <maor@debian.org>
+Hans Fredrik Nordhaug <hans@nordhaug.priv.no>
 Hartmut Koptein <koptein@naffel.de>
 Heiko Schlittermann <heiko@lotte.sax.de>
+Helge Kreutzmann <debian@helgefjell.de>
 Hiroshi KISE <fuyuneko@ryukyu.ne.jp>
+Ian Eure <ieure@debian.org>
 Ian Jackson <ian@chiark.greenend.org.uk>
 Ian Murdock <imurdock@debian.org>
+Ian Zimmerman <itz@buug.org>
+Ingo Saitz <ingo@debian.org>
+Ivar Smolin <okul@linux.ee>
 Ivo Timmermans <itimmermans@bigfoot.com>
 J.H.M. Dassen <jdassen@cistron.nl>
+Jacobo Tarrio <jtarrio@debian.org>
+James R. Van Zandt <jrvz@comcast.net>
+James Troup <troup@debian.org>
+Jared Spiegel <jrrs@frontiernet.net>
+Jari Aalto <jari.aalto@cante.net>
+Javier Fernández-Sanguino Peña <jfs@debian.org>
+Jeffrey W. Baker <jwbaker@acm.org>
+Jeroen van Wolffelaar <jeroen@wolffelaar.nl>
 Jim Pick <jim@jimpick.com>
 Jim Van Zandt <jrv@vanzandt.mv.com>
+Jiří Pale�ek <jpalecek@web.de>
 Joel Klecker <jk@espy.org>
 Joey Hess <joeyh@debian.org>
+Johannes Veser <veser@gmx.de>
+John Wright <jsw@debian.org>
+John Zaitseff <J.Zaitseff@zap.org.au>
+Jordi Mallach <jordi@debian.org>
 Josip Rodin <jrodin@jagor.srce.hr>
 Juan Cespedes <cespedes@debian.org>
 Juergen Menden <menden@morgana.camelot.de>
 Juho Vuori <javuori@cc.helsinki.fi>
+Julian Gilbey <jdg@debian.org>
+Julien Cristau <jcristau@debian.org>
+Junichi Uekawa <dancer@debian.org>
+Justin Pryzby <justinpryzby@users.sourceforge.net>
+Ken Bloom <kbloom@gmail.com>
+Kenshi Muto <kmuto@debian.org>
+Kevin Ryde <user42@zip.com.au>
 Kim-Minh Kaplan <kkaplan@cdfhp3.in2p3.fr>
 Klee Dienes <klee@debian.org>
+Koblinger Egmont <egmont@uhulinux.hu>
+Kurt B. Kaiser <kbk@shore.net>
+Kylan Robinson <Kylan_Robinson@selinc.com>
 Lele Gaifax <lele@seldati.it>
+Lennert Buytenhek <buytenh+debian@wantstofly.org>
+Ludovic Rousseau <rousseau@debian.org>
+Manoj Srivastava <srivasta@debian.org>
+Marc Dequènes <duck@duckcorp.org>
+Marc Haber <mh+debian-packages@zugschlus.de>
+Marcel Toele <mtoele@kern.nl>
 Marco d'Itri <md@linux.it>
 Marcus Brinkmann <brinkmd@debian.org> 
+Mark Rosenstand <mark@borkware.net>
 Masato Taruishi <taru@debian.or.jp>
+Mathias Weidner <mathias@weidner.in-bad-schmiedeberg.de>
+Matt Kraai <kraai@ftbfs.org>
 Matt Welsh <mdw@sunsite.unc.edu>
+Matt Zimmerman <mdz@debian.org>
+Maximilian Attems <debian@sternwelten.at>
 Michael Alan Dorman <mdorman@calder.med.miami.edu>
 Michael Shields <shields@crosslink.net>
 Michael Sobolev <mss@transas.com>
+Michael Vogt <mvo@ubuntu.com>
+Miguel Figueiredo <elmig@debianpt.org>
 Miquel van Smoorenburg <miquels@cistron.nl>
-Nicolás Lichtmaier <nick@debian.org>
+Miroslav Kure <kurem@debian.cz>
+Moritz Muehlenhoff <jmm@inutil.org>
+NIIBE Yutaka <gniibe@fsij.org>
+Nicolas Bonifas
+Nicolas François <nicolas.francois@centraliens.net>
+Nicolás Lichtmaier <nick@debian.org>
 Nils Rennebarth <nils@debian.org>
 Peter Karlsson <peterk@debian.org>
+Peter Mann <Peter.Mann@tuke.sk>
+Peter van Dijk <peter@dataloss.nl>
 Petr Cech <cech@atrey.karlin.mff.cuni.cz>
 Philippe Batailler <pbatailler@teaser.fr>
+Piotr Engelking <inkerman42@gmail.com>
 Piotr Roszatycki <dexter@fnet.pl>
+Rakesh 'arky' Ambati <rakesh_ambati@yahoo.com>
 Raphael Hertzog <hertzog@debian.org>
 Richard Kettlewell <rjk@sfere.greenend.org.uk>
+Riku Voipio <riku.voipio@iki.fi>
+Robert Luberda <robert@debian.org>
 Robert Millan <rmh@debian.org>
 Roderick Schertler <roderick@argon.org>
 Roman Hodek <Roman.Hodek@informatik.uni-erlangen.de>
+SZERV�C Attila <sas@321.hu>
+Samuel Thibault <samuel.thibault@ens-lyon.org>
 Scott Barker <scott@mostlylinux.ab.ca>
+Scott James Remnant <scott@netsplit.com>
+Sergio Gelato <Sergio.Gelato@astro.su.se>
+Stefano Canepa <sc@linux.it>
+Stepan Golosunov <stepan@golosunov.pp.ru>
+Stephane Bortzmeyer <stephane@sources.org>
+Steve Langasek <vorlon@debian.org>
+Sven Joachim <sven_joachim@web.de>
+Sven Rudolph <sr1@loom.sax.de>
+Thomas Morin <thomas.morin@enst-bretagne.fr>
 Tom Lees <tom@lpsg.demon.co.uk>
+Tomas Pospisek <tpo_deb@sourcepole.ch>
 Topi Miettinen <Topi.Miettinen@nic.fi>
+Vasilis Vasaitis <v.vasaitis@sms.ed.ac.uk>
+Wayne Davison <wayned@users.sourceforge.net>
 Wichert Akkerman <wakkerma@debian.org>
+Yuri Kozlov <kozlov.y@gmail.com>
+Zefram <zefram@fysh.org>

+ 35 - 24
TODO

@@ -9,6 +9,8 @@ lenny
  * Triage as much bugs as possible to get the bug count below 300 ;) and
    merge as much patches as possible.
 
+ * Remove Conflicts on dpkg-dev exact versions before the release.
+
 1.14.x
 ------
 
@@ -17,21 +19,45 @@ lenny
 1.14.y
 ------
 
- * Add Wig&Pen source package support.
+ * Code cleanup:
+   - Coalesce status_pipe handling.
+   - blankfoo embedded code.
+   - static variables inside functions.
+   - Coalesce admindir / infodir / foodir generation.
+   - Get rid of setjmp (at least in the general case, keep for dpkg itself?)
+   - Coalesce hash and checksum functions.
+   - Move parseerr arguments into a struct.
+   - Move fd and block function out of mlib.
+   - Cleanup status chars -> strings hardcoded mappings all over the place.
+     (Fix tied field enum with its dselect description (pkgdisplay.cc))
+   - Refactor src/processarc.c.
+   - Make sure all vsnprintf callers are checking the return value, as the
+     system version will not ohsite on us.
+
+ * Cleanup libcompat:
+   - Add fnmatch, IRIX5 doesn't have it.
+   - Add strnlen (GNU extension).
+   - Cut lib/compat.c into little pieces and move them here.
+
+ * Add Wig&Pen source package generation support.
 
  * Get rid of install-info.
 
  * Add multiarch support.
 
+ * Merge debconf support (add new status).
+   - dpkg --reconfigure <pkg> <pkg>
+     <pkg>.postinst reconfigure <ver>
+     Fail if pkg is not in the configured state.
+   - Merge dpkg-reconfigure.
+
  * Merge dpkg-cross functionality.
 
  * Merge dpkg-sig?
 
  * Start exposing libdpkg.
-
- * Convert controllib.pl to a new style perl module(s).
-
- * Fix tied field enum with its dselect description (pkgdisplay.cc).
+   - Split dpkg.h into dpkg-priv.h.
+   - Add needed includes to all header files.
 
  * Add example to dpkg-scanfoo manpages?
 
@@ -39,7 +65,9 @@ lenny
 
  * Add UTF-8 support to all programs.
 
- * Add md5sums and/or sha1sums package support. (#155676)
+ * Modify database to store per-file flags.
+   - Store checksums and stat data in per-file flags.
+   - Add md5sums and/or sha1sums package support. (#155676)
 
  * Allow packages to register additional files, declare ownership of files for
    dpkg -S and -L without having dpkg act on this (.psuedolist?).
@@ -54,14 +82,10 @@ lenny
 
  * Remove conffile background support? (#38334)
 
- * Make dpkg-build --build check for duped conffiles. (#131633)
+ * Make dpkg-deb --build check for duped conffiles. (#131633)
 
  * Make update-alternatives --display support --quiet. (#336091)
 
- * Make dpkg-checkbuilddeps check build-essential. (#402901)
-
- * Fix pointless use of strdup. (#379027)
-
  * Propagate --admindir to programs run from maintainer scritpts. (#97076)
 
  * Fix quotes? <http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html>
@@ -72,29 +96,16 @@ TODO
 
 Old TODO entries from Scott:
 
-libdpkg:
-* cut compat.c into little pieces and move them to optlib
-* modify database to store per-file flags
-* store checksums and stat data in per-file flags
-
-optlib:
-* add fnmatch, IRIX5 doesn't have it
-
 start-stop-daemon
 * capabilities support
 * don't close FD's
 
 dpkg
-* integrate debconf (add new status)
 * allow external program to specify how to handle conffiles
 * try to remove directories again after removing conffiles
 * verify Enhances works (ie don't trigger some assertion)
-* refactor processarc.c
 * add test to see if a file should really be installed and optionally
   skip it
-* dpkg --reconfigure <pkg> <pkg>
-    <pkg>.postinst reconfigure <ver>
-    Fail if pkg is not in the configured state.
 * dpkg --call-maint-script=<script> --maint-script-arg=<arg>
   --maint-script-arg=<arg> <pkg> <pkg>
     dpkg will not allow <script> to be one of {pre,post}{inst,rm}.  Only

+ 10 - 9
configure.ac

@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.59)
-AC_INIT([dpkg], [1.14.16~], [debian-dpkg@lists.debian.org])
+AC_INIT([dpkg], [1.14.17~], [debian-dpkg@lists.debian.org])
 AC_CONFIG_SRCDIR([lib/dpkg.h])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_AUX_DIR([config])
@@ -13,7 +13,7 @@ DPKG_ARCHITECTURE
 AM_INIT_AUTOMAKE([1.8 gnu])
 
 AM_GNU_GETTEXT_VERSION([0.16.1])
-AM_GNU_GETTEXT()
+AM_GNU_GETTEXT([external])
 
 # Allow compilation without dselect
 AC_ARG_WITH(dselect,
@@ -72,7 +72,7 @@ fi
 
 # Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS([error.h locale.h sys/cdefs.h kvm.h])
+AC_CHECK_HEADERS([stddef.h error.h locale.h sys/cdefs.h kvm.h])
 DPKG_CHECK_DEFINE(TIOCNOTTY, [sys/ioctl.h])
 
 # Checks for typedefs, structures, and compiler characteristics.
@@ -85,15 +85,17 @@ AC_TYPE_MODE_T
 AC_TYPE_PID_T
 AC_TYPE_SIZE_T
 DPKG_TYPE_PTRDIFF_T
-AC_CHECK_SIZEOF(unsigned int)
-AC_CHECK_SIZEOF(unsigned long)
+AC_CHECK_SIZEOF([unsigned int])
+AC_CHECK_SIZEOF([unsigned long])
 DPKG_DECL_SYS_SIGLIST
 DPKG_C_ATTRIBUTE
 
 # Checks for library functions.
 DPKG_FUNC_VA_COPY
-AC_CHECK_FUNCS([vsnprintf snprintf strerror strsignal scandir alphasort])
-AC_CHECK_FUNCS([unsetenv lchown setsid bcopy isascii memcpy]) 
+DPKG_CHECK_COMPAT_FUNCS([getopt getopt_long obstack_free])
+AC_CHECK_FUNCS([vsnprintf snprintf strtoul strerror strsignal alphasort \
+                isascii bcopy memcpy scandir unsetenv lchown setsid \
+                getdtablesize])
 
 SJR_COMPILER_WARNINGS
 SJR_COMPILER_OPTIMISATIONS
@@ -105,8 +107,7 @@ AC_CONFIG_FILES([ Makefile
 		  dselect/Makefile
 		  dselect/methods/Makefile
 		  dselect/po/Makefile.in
-		  getopt/Makefile
-		  intl/Makefile
+		  libcompat/Makefile
 		  lib/Makefile
 		  man/Makefile
 		  origins/Makefile

+ 153 - 3
debian/changelog

@@ -1,10 +1,148 @@
-dpkg (1.14.16) UNRELEASED; urgency=low
+dpkg (1.14.17) UNRELEASED; urgency=low
+
+  [ Guillem Jover ]
+  * Replace strdup plus error checking usage with a new m_strdup function.
+    Closes: #379028
+  * Add new keybinding in dselect to restore all selections back to
+    whatever's currently installed. Closes: #151540
+    Thanks to Colin Watson.
+  * Use system timersub and fix timeval normalization in multiplication in
+    start-stop-daemon. Thanks to Andreas Påhlsson. Closes: #462225
+  * Cosmetic fixes to start-stop-daemon output and man page. Document that
+    --chuid will change the group even if it has not been specified. Add
+    EXIT STATUS and EXAMPLE sections to man page. Thanks to Justin Pryzby.
+  * Add Raphael Hertzog to Uploaders, and remove Brendan O'Dea and
+    Christian Perrier with their permission.
+  * Use functions from libcompat when those are not provided by the system.
+  * Change dpkg-gencontrol to not output the Homapage field on udeb.
+
+  [ Raphael Hertzog ]
+  * Add a warning displayed by dpkg-genchanges if the current version is
+    smaller than the previous one. Closes: #4655
+  * Add -d and -c options in dpkg-checkbuilddeps to override
+    build-depends/conflicts. Closes: #114774
+  * Include list of libraries in dpkg-gensymbols' warning about new/lost
+    libraries.
+  * Add -R option to dpkg-buildpackage so that one can replace the usual
+    "debian/rules" by something else. Closes: #355654
+  * Always list all binary packages in the Description: field of .changes
+    files. It's nice for reviewers and mentors.debian.net was using this field
+    on source only uploads to display short description of what the package is
+    about.
+  * Handle the case when the library has a different SONAME than the one used
+    to find it. Closes: #462413
+
+  [ Frank Lichtenheld ]
+  * Add a warning in dpkg-buildpackage if the build-dependencies are not
+    satisfied during -S. Closes: #445552
+  * Add a missing space in the German scripts translation. Closes: #463398
+
+  [ Updated dpkg translations ]
+  * Korean (Changwoo Ryu).
+  * Romanian (Eddy Petrișor).
+
+  [ Updated manpages translations ]
+  * German (Helge Kreutzmann).
+
+  [ Updated scripts translations ]
+  * German (Helge Kreutzmann).
+  * Swedish (Peter Karlsson).
+
+  [ Updated dselect translations ]
+  * Romanian (Eddy Petrișor).
+
+ -- Eddy Petrișor <eddy.petrisor@gmail.com>  Sat, 09 Feb 2008 13:22:38 +0200
+
+dpkg (1.14.16.6) unstable; urgency=medium
+
+  * Let dpkg-gensymbols skip directories which are just symlinks when scanning
+    the package build dir.
+  * Bump urgency to medium to compensate lost days in testing migration due to
+    the two last uploads.
+
+ -- Raphael Hertzog <hertzog@debian.org>  Sat, 26 Jan 2008 19:20:40 +0100
+
+dpkg (1.14.16.5) unstable; urgency=low
+
+  * Fix dpkg-gensymbols handling of #include so that one can include multiple
+    times the same file and have it properly taken into account.
+  * Add many armel-specific symbols to dpkg-gensymbols' blacklist.
+    Closes: #462318
+
+ -- Raphael Hertzog <hertzog@debian.org>  Thu, 24 Jan 2008 14:20:10 +0100
+
+dpkg (1.14.16.4) unstable; urgency=low
+
+  * Import capit in Dpkg::Cdata from Dpkg::Fields. Closes: #462172
+
+ -- Guillem Jover <guillem@debian.org>  Wed, 23 Jan 2008 08:44:32 +0200
+
+dpkg (1.14.16.3) unstable; urgency=low
+
+  [ Raphael Hertzog ]
+  * Remove the ":utf8" layer that utf8-encodes already valid utf8.
+    Closes: #462098
+  * Disable variable substitution in dpkg-genchanges. Closes: #462079, #462089
+
+  [ Guillem Jover ]
+  * Make start-stop-daemon set the supplementary groups if the real user or
+    group are different than the ones we should switch to. Closes: #462075
+  * Fix segfault in start-stop-daemon when using --group w/o --chuid (as
+    a side effect, using --group alone works for the first time in years).
+    Closes: #462072
+  * Fix timeout computations for start-stop-daemon --retry option. This has
+    not worked properly for a long time (maybe never), but came to light
+    due to #460903's fix. Closes: #462104
+
+ -- Guillem Jover <guillem@debian.org>  Tue, 22 Jan 2008 23:39:59 +0200
+
+dpkg (1.14.16.2) unstable; urgency=low
+
+  * Change uid after changing gid and initializing supplementary groups in
+    start-stop-daemon. Closes: #462018
+  * Change temporary dpkg Breaks on dpkg-dev (= 1.14.13) and (= 1.14.14)
+    to Conflicts, so that users from etch can upgrade to sid (or lenny
+    once dpkg has migrated).
+
+ -- Guillem Jover <guillem@debian.org>  Tue, 22 Jan 2008 13:05:22 +0200
+
+dpkg (1.14.16.1) unstable; urgency=low
+
+  * Add libtimedate-perl to dpkg-dev's Depends and to Build-Depends.
+    Reported by Aurelien Jarno. Closes: #461875
+
+ -- Frank Lichtenheld <djpig@debian.org>  Mon, 21 Jan 2008 12:48:51 +0100
+
+dpkg (1.14.16) unstable; urgency=low
 
   [ Guillem Jover ]
   * Add build-essential as an implicit Build-Depends in dpkg-checkbuilddeps.
     Closes: #402901
+  * Add build-essential to dpkg-dev Recommends.
   * Do not warn about unrecognized Homepage field in binary package stanzas
     in dpkg-genchanges and dpkg-source. Closes: #460309
+  * Do not use the enoent helper binary, and use perl POSIX module instead.
+  * Keep checking for the process when start-stop-daemon is called with
+    --retry even if the daemon removed the pidfile. Closes: #460903
+    Thanks to Justin Pryzby for the analysis.
+  * Make --quiet silence --test in start-stop-daemon. Closes: #367998
+  * Check current uid and gid in start-stop-daemon before calling setuid,
+    setgid and initgroups. Closes: #222524
+    Based on a patch by Samuel Thibault.
+  * Remove unimplemented --test option from update-alternatives.
+    Closes: #392432, #461247
+  * Additionally check if errno is EEXIST after rmdir(2), as SUSv3 specifies
+    that on non-empty directories it can either return that or ENOTEMPTY.
+    This fixes run time problems on Solaris.
+  * Fix start-stop-daemon --help output to state that --name is one of the
+    possible required options to use. Closes: #354999
+  * Demote dselect from priority important to optional. Closes: #461327
+  * Fix portability issues on HP-UX, by not using backticks inside double
+    quotes in m4 files. Closes: #24514
+  * Switch Maintainer address to <debian-dpkg@lists.debian.org> from
+    <team@dpkg.org>.
+  * Add README.feature-removal-schedule describing the features to be removed
+    and README.api describing the provided APIs.
 
   [ Frank Lichtenheld ]
   * Make the -L option of dpkg-parsechangelog actually work (it's
@@ -35,6 +173,17 @@ dpkg (1.14.16) UNRELEASED; urgency=low
     lesser priority (when -d is used).
   * Fix behaviour of dpkg-shlibdeps when the same binary was passed multiple
     times for use in different dependency fields (-d option).
+  * Change logic of -si option of dpkg-genchanges to include the original
+    tarball only if the current upstream version differs from the upstream
+    version of the previous changelog entry. Replaces the heuristic based
+    on revision number (-0, -0.1 or -1). Closes: #28701
+  * Some code refactoring on dpkg-genchanges and bug fixes in the generation
+    of the Description: field. As a result, source only uploads will no more
+    have Description fields.
+  * Add support of wildcard entries in symbols files. This makes it much
+    simpler to write symbols files for well managed libraries but in that case
+    dpkg-gensymbols can't check any more if symbols have disappeared.
+    Closes: #459359
 
   [ Updated manpages translations ]
   * Fix typo in French. Closes: #460021
@@ -48,9 +197,10 @@ dpkg (1.14.16) UNRELEASED; urgency=low
   * Russian (Yuri Kozlov). Closes: #460708
 
   [ Updated scripts translations ]
-  * Russian (Yuri Kozlov). Closes: #460708
+  * Russian (Yuri Kozlov). Closes: #460709
+  * Swedish (Peter Karlsson).
 
- -- Jacobo Tarrio <jtarrio@debian.org>  Sat, 12 Jan 2008 12:27:22 +0000
+ -- Guillem Jover <guillem@debian.org>  Mon, 21 Jan 2008 10:00:45 +0200
 
 dpkg (1.14.15) unstable; urgency=low
 

+ 8 - 8
debian/control

@@ -1,8 +1,9 @@
 Source: dpkg
 Section: admin
 Priority: required
-Maintainer: Dpkg Developers <team@dpkg.org>
-Uploaders: Frank Lichtenheld <djpig@debian.org>, Guillem Jover <guillem@debian.org>, Brendan O'Dea <bod@debian.org>, Christian Perrier <bubulle@debian.org>
+Maintainer: Dpkg Developers <debian-dpkg@lists.debian.org>
+Uploaders: Frank Lichtenheld <djpig@debian.org>,
+ Guillem Jover <guillem@debian.org>, Raphael Hertzog <hertzog@debian.org>
 Origin: debian
 Bugs: debbugs://bugs.debian.org
 Homepage: http://wiki.debian.org/Teams/Dpkg
@@ -12,15 +13,14 @@ Standards-Version: 3.7.3
 Build-Depends: debhelper (>= 4.1.81), pkg-config, po4a (>= 0.23),
  libncurses5-dev | libncurses-dev, zlib1g-dev (>= 1:1.1.3-19.1), libbz2-dev,
  libselinux1-dev (>= 1.28-4) [!hurd-i386 !kfreebsd-i386 !kfreebsd-amd64],
- libio-string-perl
+ libtimedate-perl, libio-string-perl
 
 Package: dpkg
 Architecture: any
 Essential: yes
 Pre-Depends: ${shlibs:Depends}, coreutils (>= 5.93-1)
-Breaks: dpkg-dev (= 1.14.13), dpkg-dev (= 1.14.14)
 Conflicts: sysvinit (<< 2.82-1), dpkg-iasearch (<< 0.11), dpkg-static,
- dpkg-dev (<< 1.14.6)
+ dpkg-dev (<< 1.14.6), dpkg-dev (= 1.14.13), dpkg-dev (= 1.14.14)
 Replaces: dpkg-doc-ja, dpkg-static, manpages-de (<= 0.4-3),
  manpages-pl (<= 20051117-1)
 Suggests: apt, lzma
@@ -36,8 +36,8 @@ Section: utils
 Priority: optional
 Architecture: all
 Depends: dpkg (>= 1.14.6), perl5, perl-modules, cpio (>= 2.4.2-2), bzip2, lzma,
- patch (>= 2.2-1), make, binutils
-Recommends: gcc | c-compiler
+ patch (>= 2.2-1), make, binutils, libtimedate-perl
+Recommends: gcc | c-compiler, build-essential
 Suggests: gnupg, debian-keyring
 Conflicts: dpkgname, dpkg-cross (<< 2.0.0)
 Replaces: dpkgname, dpkg (<< 1.4.1.8), dpkg-doc-ja, manpages-pl (<= 20051117-1)
@@ -49,7 +49,7 @@ Description: package building tools for Debian
  for example, most packages need the `make' and the C compiler `gcc'.
 
 Package: dselect
-Priority: important
+Priority: optional
 Architecture: any
 Depends: ${shlibs:Depends}, dpkg (>= 1.13.1)
 Replaces: dpkg (<< 1.10.3)

+ 2 - 0
debian/dpkg.docs

@@ -1,3 +1,5 @@
 AUTHORS
 THANKS
 debian/usertags
+README.api
+README.feature-removal-schedule

+ 0 - 1
debian/dpkg.install

@@ -7,7 +7,6 @@ usr/bin/dpkg
 usr/bin/dpkg-deb
 usr/bin/dpkg-query
 usr/bin/dpkg-split
-usr/lib/dpkg/enoent
 usr/lib/dpkg/mksplit
 usr/sbin
 usr/share/dpkg

+ 4 - 2
debian/rules

@@ -2,8 +2,10 @@
 # debian/rules for the dpkg suite.
 # Copyright © 2004 Scott James Remnant <scott@netsplit.com>
 
-CFLAGS = -Wall -g
-CXXFLAGS = -Wall -g
+WFLAGS := -Wall -Wextra -Wno-unused-parameter -Wno-missing-field-initializers
+
+CFLAGS = -g $(WFLAGS)
+CXXFLAGS = -g $(WFLAGS)
 
 # Disable optimisations if ‘noopt’ found in $DEB_BUILD_OPTIONS
 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))

+ 4 - 1
dpkg-deb/Makefile.am

@@ -2,7 +2,9 @@
 
 localedir = $(datadir)/locale
 INCLUDES = \
-	-DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl -I$(top_srcdir)/lib
+	-DLOCALEDIR=\"$(localedir)\" \
+	-idirafter $(top_srcdir)/libcompat \
+	-I$(top_srcdir)/lib
 
 
 bin_PROGRAMS = dpkg-deb
@@ -15,4 +17,5 @@ dpkg_deb_SOURCES = \
 	main.c
 
 dpkg_deb_LDADD = \
+	../libcompat/libcompat.a \
 	$(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS)

+ 10 - 8
dpkg-deb/build.c

@@ -101,7 +101,7 @@ static struct _finfo* getfi(const char* root, int fd) {
 
   if (fn == NULL) {
     fnlen = rl + MAXFILENAME;
-    fn=(char*)malloc(fnlen);
+    fn = m_malloc(fnlen);
   } else if (fnlen < (rl + MAXFILENAME)) {
     fnlen = rl + MAXFILENAME;
     fn=(char*)realloc(fn,fnlen);
@@ -131,9 +131,9 @@ static struct _finfo* getfi(const char* root, int fd) {
       ohshit(_("file name '%.50s...' is too long"), fn + rl + 1);
   }
 
-  fi=(struct _finfo*)malloc(sizeof(struct _finfo));
+  fi = m_malloc(sizeof(struct _finfo));
   lstat(fn, &(fi->st));
-  fi->fn=strdup(fn+rl+1);
+  fi->fn = m_strdup(fn + rl + 1);
   fi->next=NULL;
   return fi;
 }
@@ -169,7 +169,7 @@ static void free_filist(struct _finfo* fi) {
  */
 void do_build(const char *const *argv) {
   static const char *const maintainerscripts[]= {
-    PREINSTFILE, POSTINSTFILE, PRERMFILE, POSTRMFILE, 0
+    PREINSTFILE, POSTINSTFILE, PRERMFILE, POSTRMFILE, NULL
   };
   
   char *m;
@@ -193,11 +193,12 @@ void do_build(const char *const *argv) {
   /* template for our tempfiles */
   if ((envbuf= getenv("TMPDIR")) == NULL)
     envbuf= P_tmpdir;
-  tfbuf = (char *)malloc(strlen(envbuf)+13);
+  tfbuf = m_malloc(strlen(envbuf) + 13);
   strcpy(tfbuf,envbuf);
   strcat(tfbuf,"/dpkg.XXXXXX");
   subdir= 0;
-  if ((debar= *argv++) !=0) {
+  debar = *argv++;
+  if (debar != NULL) {
     if (*argv) badusage(_("--build takes at most two arguments"));
     if (debar) {
       if (stat(debar,&debarstab)) {
@@ -340,7 +341,8 @@ void do_build(const char *const *argv) {
    * build something. Lets start by making the ar-wrapper.
    */
   if (!(ar=fopen(debar,"wb"))) ohshite(_("unable to create `%.255s'"),debar);
-  if (setvbuf(ar, 0, _IONBF, 0)) ohshite(_("unable to unbuffer `%.255s'"),debar);
+  if (setvbuf(ar, NULL, _IONBF, 0))
+    ohshite(_("unable to unbuffer `%.255s'"), debar);
   /* Fork a tar to package the control-section of the package */
   m_pipe(p1);
   if (!(c1= m_fork())) {
@@ -379,7 +381,7 @@ void do_build(const char *const *argv) {
     if (fprintf(ar, "%-8s\n%ld\n", OLDARCHIVEVERSION, (long)controlstab.st_size) == EOF)
       werr(debar);
   } else {
-    thetime= time(0);
+    thetime = time(NULL);
     if (fprintf(ar,
                 "!<arch>\n"
                 "debian-binary   %-12lu0     0     100644  %-10ld`\n"

+ 23 - 17
dpkg-deb/extract.c

@@ -85,6 +85,24 @@ parseheaderlength(const char *inh, size_t len,
   return (size_t)r;
 }
 
+static int
+safe_fflush(FILE *f)
+{
+#if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
+  /* XXX: Glibc 2.1 and some versions of Linux want to make fflush()
+   * move the current fpos. Remove this code some time. */
+  fpos_t fpos;
+
+  if (fgetpos(f, &fpos))
+    ohshit(_("failed getting the current file position"));
+  fflush(f);
+  if (fsetpos(f, &fpos))
+    ohshit(_("failed setting the current file position"));
+#else
+  fflush(f);
+#endif
+}
+
 void extracthalf(const char *debar, const char *directory,
                  const char *taroption, int admininfo) {
   char versionbuf[40];
@@ -93,7 +111,7 @@ void extracthalf(const char *debar, const char *directory,
   size_t ctrllennum, memberlen= 0;
   int dummy, l= 0;
   pid_t c1=0,c2,c3;
-  unsigned char *ctrlarea= 0;
+  unsigned char *ctrlarea = NULL;
   int p1[2], p2[2];
   FILE *ar, *pi;
   struct stat stab;
@@ -101,9 +119,6 @@ void extracthalf(const char *debar, const char *directory,
   char *cur;
   struct ar_hdr arh;
   int readfromfd, oldformat= 0, header_done, adminmember;
-#if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
-  fpos_t fpos;
-#endif
   enum compress_type compress_type = compress_type_gzip;
   
   ar= fopen(debar,"r"); if (!ar) ohshite(_("failed to read archive `%.255s'"),debar);
@@ -210,9 +225,7 @@ void extracthalf(const char *debar, const char *directory,
                  (long) (stab.st_size - ctrllennum - strlen(ctrllenbuf) - l)) == EOF ||
           fflush(stdout)) werr("stdout");
     
-    ctrlarea = malloc(ctrllennum);
-    if (!ctrlarea)
-      ohshite(_("failed allocating memory for variable `ctrlarea'"));
+    ctrlarea = m_malloc(ctrllennum);
 
     errno=0; if (fread(ctrlarea,1,ctrllennum,ar) != ctrllennum)
       readfail(ar, debar, _("control area"));
@@ -230,15 +243,8 @@ void extracthalf(const char *debar, const char *directory,
 
   }
 
-#if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
-  if (fgetpos(ar, &fpos))
-    ohshit(_("failed getting the current file position"));
-#endif
-  fflush(ar);
-#if defined(__GLIBC__) && (__GLIBC__ == 2) && (__GLIBC_MINOR__ > 0)
-  if (fsetpos(ar, &fpos))
-    ohshit(_("failed setting the current file position"));
-#endif
+  safe_fflush(ar);
+
   if (oldformat) {
     if (admininfo) {
       m_pipe(p1);
@@ -344,7 +350,7 @@ void do_fsystarfile(const char *const *argv) {
     badusage(_("--%s needs a .deb filename argument"),cipaction->olong);
   if (*argv)
     badusage(_("--%s takes only one argument (.deb filename)"),cipaction->olong);
-  extracthalf(debar,0,0,0);
+  extracthalf(debar, NULL, NULL, 0);
 }
    
 void do_control(const char *const *argv) { controlextractvextract(1, "x", argv); }

+ 5 - 5
dpkg-deb/info.c

@@ -76,7 +76,7 @@ static void info_prepare(const char *const **argvp,
     ohshite(_("failed to exec rm -rf"));
   }
   waitsubproc(c1,"rm -rf",0);
-  push_cleanup(cu_info_prepare,-1, 0,0, 1, (void*)dbuf);
+  push_cleanup(cu_info_prepare, -1, NULL, 0, 1, (void *)dbuf);
   extracthalf(*debarp, dbuf, "mx", admininfo);
 }
 
@@ -92,7 +92,7 @@ static void info_spew(const char *debar, const char *directory,
   FILE *co;
   int re= 0;
 
-  while ((component= *argv++) != 0) {
+  while ((component = *argv++) != NULL) {
     pathlen = strlen(directory) + strlen(component) + 2;
     controlfile = (void *) realloc((void *) controlfile, pathlen);
     if (!controlfile)
@@ -256,9 +256,9 @@ void do_field(const char *const *argv) {
 
   info_prepare(&argv,&debar,&directory,1);
   if (*argv) {
-    info_field(debar, directory, argv, argv[1]!=0);
+    info_field(debar, directory, argv, argv[1] != NULL);
   } else {
-    static const char *const controlonly[]= { "control", 0 };
+    static const char *const controlonly[] = { "control", NULL };
     info_spew(debar,directory, controlonly);
   }
 }
@@ -267,7 +267,7 @@ void do_contents(const char *const *argv) {
   const char *debar;
   
   if (!(debar= *argv++) || *argv) badusage(_("--contents takes exactly one argument"));
-  extracthalf(debar, 0, "tv", 0);
+  extracthalf(debar, NULL, "tv", 0);
 }
 /* vi: sw=2
  */

+ 27 - 25
dpkg-deb/main.c

@@ -118,8 +118,8 @@ const char printforhelp[]=
 int debugflag=0, nocheckflag=0, oldformatflag=BUILDOLDPKGFORMAT;
 const char* compression=NULL;
 enum compress_type compress_type = compress_type_gzip;
-const struct cmdinfo *cipaction=0;
-dofunction *action=0;
+const struct cmdinfo *cipaction = NULL;
+dofunction *action = NULL;
 
 static void helponly(const struct cmdinfo *cip, const char *value) NONRETURNING;
 static void helponly(const struct cmdinfo *cip, const char *value) {
@@ -149,27 +149,29 @@ static dofunction *const dofunctions[]= {
  * same order as dofunctions:
  */
 static const struct cmdinfo cmdinfos[]= {
-  { "build",        'b',  0,  0, 0,               setaction        },
-  { "contents",     'c',  0,  0, 0,               setaction        },
-  { "control",      'e',  0,  0, 0,               setaction        },
-  { "info",         'I',  0,  0, 0,               setaction        },
-  { "field",        'f',  0,  0, 0,               setaction        },
-  { "extract",      'x',  0,  0, 0,               setaction        },
-  { "vextract",     'X',  0,  0, 0,               setaction        },
-  { "fsys-tarfile",  0,   0,  0, 0,               setaction        },
-  { "show",         'W',  0,  0, 0,               setaction        },
-  { "new",           0,   0,  &oldformatflag, 0,  0,            0  },
-  { "old",           0,   0,  &oldformatflag, 0,  0,            1  },
-  { "debug",        'D',  0,  &debugflag,     0,  0,            1  },
-  { "nocheck",       0,   0,  &nocheckflag,   0,  0,            1  },
-  { "compression",  'z',  1,  0,   &compression,  0,            1  },
-  { "compress_type",'Z',  1,  0, 0,               setcompresstype  },
-  { "showformat",    0,   1,  0, &showformat,     0                },
-  { "help",         'h',  0,  0, 0,               helponly         },
-  { "version",       0,   0,  0, 0,               versiononly      },
-  { "licence",       0,   0,  0, 0,               showcopyright    }, /* UK spelling */
-  { "license",       0,   0,  0, 0,               showcopyright    }, /* US spelling */
-  {  0,              0                                             }
+  { "build",         'b', 0, NULL,           NULL,         setaction        },
+  { "contents",      'c', 0, NULL,           NULL,         setaction        },
+  { "control",       'e', 0, NULL,           NULL,         setaction        },
+  { "info",          'I', 0, NULL,           NULL,         setaction        },
+  { "field",         'f', 0, NULL,           NULL,         setaction        },
+  { "extract",       'x', 0, NULL,           NULL,         setaction        },
+  { "vextract",      'X', 0, NULL,           NULL,         setaction        },
+  { "fsys-tarfile",  0,   0, NULL,           NULL,         setaction        },
+  { "show",          'W', 0, NULL,           NULL,         setaction        },
+  { "new",           0,   0, &oldformatflag, NULL,         NULL,          0 },
+  { "old",           0,   0, &oldformatflag, NULL,         NULL,          1 },
+  { "debug",         'D', 0, &debugflag,     NULL,         NULL,          1 },
+  { "nocheck",       0,   0, &nocheckflag,   NULL,         NULL,          1 },
+  { "compression",   'z', 1, NULL,           &compression, NULL,          1 },
+  { "compress_type", 'Z', 1, NULL,           NULL,         setcompresstype  },
+  { "showformat",    0,   1, NULL,           &showformat,  NULL             },
+  { "help",          'h', 0, NULL,           NULL,         helponly         },
+  { "version",       0,   0, NULL,           NULL,         versiononly      },
+  /* UK spelling. */
+  { "licence",       0,   0, NULL,           NULL,         showcopyright    },
+  /* US spelling. */
+  { "license",       0,   0, NULL,           NULL,         showcopyright    },
+  {  NULL,           0,   0, NULL,           NULL,         NULL             }
 };
 
 static void setaction(const struct cmdinfo *cip, const char *value) {
@@ -198,12 +200,12 @@ int main(int argc, const char *const *argv) {
   jmp_buf ejbuf;
 
   setlocale(LC_NUMERIC, "POSIX");
-  standard_startup(&ejbuf, argc, &argv, NULL, 0, cmdinfos);
+  standard_startup(&ejbuf, argc, &argv, NULL, NULL, cmdinfos);
   if (!cipaction) badusage(_("need an action option"));
 
   unsetenv("GZIP");
   action(argv);
-  standard_shutdown(0);
+  standard_shutdown(NULL);
   exit(0);
 }
 

+ 6 - 2
dpkg-split/Makefile.am

@@ -2,8 +2,9 @@
 
 localedir = $(datadir)/locale
 INCLUDES = \
-	-DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl \
+	-DLOCALEDIR=\"$(localedir)\" \
 	-DADMINDIR=\"$(admindir)\" -DMKSPLITSCRIPT=\"$(pkglibdir)/mksplit\" \
+	-idirafter $(top_srcdir)/libcompat \
 	-I$(top_srcdir)/lib
 
 
@@ -17,7 +18,10 @@ dpkg_split_SOURCES = \
 	queue.c \
 	split.c
 
-dpkg_split_LDADD = $(LIBINTL) ../lib/libdpkg.a
+dpkg_split_LDADD = \
+	../libcompat/libcompat.a \
+	$(LIBINTL) \
+	../lib/libdpkg.a
 
 
 pkglib_SCRIPTS = mksplit

+ 2 - 1
dpkg-split/join.c

@@ -114,7 +114,8 @@ void do_join(const char *const *argv) {
     if (!refi || pq->info.thispartn < refi->thispartn) refi= &pq->info;
   assert(refi);
   partlist= nfmalloc(sizeof(struct partinfo*)*refi->maxpartn);
-  for (i=0; i<refi->maxpartn; i++) partlist[i]= 0;
+  for (i = 0; i < refi->maxpartn; i++)
+    partlist[i] = NULL;
   for (pq= queue; pq; pq= pq->nextinqueue) {
     pi= &pq->info;
     addtopartlist(partlist,pi,refi);

+ 2 - 1
dpkg-split/queue.c

@@ -120,7 +120,8 @@ void do_auto(const char *const *argv) {
   fclose(part);
   scandepot();
   partlist= nfmalloc(sizeof(struct partinfo*)*refi->maxpartn);
-  for (i=0; i<refi->maxpartn; i++) partlist[i]= 0;
+  for (i = 0; i < refi->maxpartn; i++)
+    partlist[i] = NULL;
   for (pq= queue; pq; pq= pq->nextinqueue) {
     pi= &pq->info;
     if (!partmatches(pi,refi)) continue;

+ 7 - 2
dselect/Makefile.am

@@ -4,8 +4,9 @@ SUBDIRS = methods po
 
 localedir = $(datadir)/locale
 INCLUDES = \
-	-DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl \
+	-DLOCALEDIR=\"$(localedir)\" \
 	-DADMINDIR=\"$(admindir)\" -DLIBDIR=\"$(pkglibdir)\" \
+	-idirafter $(top_srcdir)/libcompat \
 	-I$(top_srcdir)/lib
 
 
@@ -33,7 +34,11 @@ dselect_SOURCES = \
 	pkgsublist.cc \
 	pkgtop.cc
 
-dselect_LDADD = $(LIBINTL) ../lib/libdpkg.a $(CURSES_LIBS)
+dselect_LDADD = \
+	../libcompat/libcompat.a \
+	$(LIBINTL) \
+	$(CURSES_LIBS) \
+	../lib/libdpkg.a
 
 
 EXTRA_DIST = keyoverride mkcurkeys.pl

+ 1 - 0
dselect/bindings.cc

@@ -158,6 +158,7 @@ const keybindings::description keybindings::descriptions[]= {
   { "revert",          N_("Revert to old state for all packages")                },
   { "revertsuggest",   N_("Revert to suggested state for all packages")          },
   { "revertdirect",    N_("Revert to directly requested state for all packages") },
+  { "revertinstalled", N_("Revert to currently installed state for all packages") },
   
   // Actions which apply only to lists of methods.
   { "select-and-quit", N_("Select currently-highlighted access method")          },

+ 15 - 0
dselect/pkgcmds.cc

@@ -264,6 +264,21 @@ void packagelist::kd_revertsuggest() {
   refreshlist(); redrawthisstate();
 }
 
+void
+packagelist::kd_revertinstalled()
+{
+  int i;
+
+  for (i = 0; i < nitems; i++) {
+    if (table[i]->pkg->name)
+      table[i]->selected = reallywant(pkginfo::want_sentinel, table[i]);
+    ldrawnstart = ldrawnend = -1;
+  }
+
+  refreshlist();
+  redrawthisstate();
+}
+
 /* fixme: configurable purge/deselect */
 
 void packagelist::kd_toggleinfo() {

+ 2 - 0
dselect/pkgkeys.cc

@@ -72,6 +72,7 @@ const keybindings::interpretation packagelist_kinterps[] = {
   { "revert",           0,  &packagelist::kd_revert_abort,     qa_noquit           },
   { "revertsuggest",    0,  &packagelist::kd_revertsuggest,    qa_noquit           },
   { "revertdirect",     0,  &packagelist::kd_revertdirect,     qa_noquit           },
+  { "revertinstalled",  0,  &packagelist::kd_revertinstalled,  qa_noquit           },
   {  0,                 0,  0,                                qa_noquit           }
 };
 
@@ -144,6 +145,7 @@ const keybindings::orgbinding packagelist_korgbindings[]= {
   { 'R',            "revert"           },
   { 'U',            "revertsuggest"    },
   { 'D',            "revertdirect"     },
+  { 'C',            "revertinstalled"  },
                                        
   {  -1,             0                 }
 };

+ 1 - 0
dselect/pkglist.h

@@ -183,6 +183,7 @@ protected:
   void kd_revert_abort();
   void kd_revertsuggest();
   void kd_revertdirect();  
+  void kd_revertinstalled();
   void kd_morespecific();
   void kd_lessspecific();
   void kd_swaporder();

+ 8 - 0
dselect/po/ChangeLog

@@ -1,3 +1,11 @@
+2008-02-09  Eddy Petrișor <eddy.petrisor@gmail.com>
+
+	* ro.po: 285t
+
+2008-01-25  Piarres Beobide  <pi@beobide.net>
+
+	* eu.po: 286t
+
 2008-01-07  Guillem Jover  <guillem@debian.org>
 
 	* dselect.pot: Regenerated.

+ 15 - 39
dselect/po/eu.po

@@ -1,20 +1,20 @@
-# translation of eu.po to librezale.org
-# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+# translation of eu.po to Euskara
+# Copyright (C) 2004, 2005, 2006, 2008 Free Software Foundation, Inc.
 #
 # Jordi Blasi <valpur@euskalnet.net>, 2004.
-# Piarres Beobide <pi@beobide.net>, 2004, 2005, 2006.
+# Piarres Beobide <pi@beobide.net>, 2004, 2005, 2006, 2008.
 msgid ""
 msgstr ""
 "Project-Id-Version: eu\n"
 "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
 "POT-Creation-Date: 2008-01-07 11:58+0200\n"
-"PO-Revision-Date: 2006-02-17 08:56+0200\n"
+"PO-Revision-Date: 2008-01-24 13:36+0100\n"
 "Last-Translator: Piarres Beobide <pi@beobide.net>\n"
-"Language-Team: librezale.org <librezale@librezale.org>\n"
+"Language-Team: Euskara <Librezale@librezale.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"X-Generator: KBabel 1.11.2\n"
+"X-Generator: KBabel 1.11.4\n"
 "Plural-Forms: nplurals=2; plural=(n != 1)\n"
 
 #: dselect/basecmds.cc:121
@@ -141,9 +141,8 @@ msgstr ""
 "\n"
 
 #: dselect/baselist.cc:260
-#, fuzzy
 msgid "Keybindings"
-msgstr "laster-teklak"
+msgstr "Laster-teklak"
 
 #: dselect/baselist.cc:308
 #, c-format
@@ -302,7 +301,6 @@ msgid "Keystrokes"
 msgstr "Tekla-sakatzeak"
 
 #: dselect/helpmsgs.cc:25
-#, fuzzy
 msgid ""
 "Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:\n"
 "  j, Down-arrow         k, Up-arrow             move highlight\n"
@@ -346,8 +344,8 @@ msgstr ""
 "                                                    karaktere bat\n"
 "\n"
 "Markatu paketeak geroago prozesatzeko:\n"
-" +, Txert  instalatu edo bertsio-berritu    =, H  atxiki uneko egoeran\n"
-" -, Ezab   kendu                            :, G  desatxiki: bertsio-"
+" +, Txert  instalatu edo bertsio-berritu    =, H  hizoztu uneko egoeran\n"
+" -, Ezab   kendu                            :, G  deshizoztu: bertsio-"
 "berritu\n"
 "                                                   edo utzi instalatu gabe\n"
 " _         kendu eta purgatu konfigurazioa\n"
@@ -703,7 +701,6 @@ msgid "Keystrokes for method selection"
 msgstr "Metodoa hautatzeko tekla-sakatzeak"
 
 #: dselect/helpmsgs.cc:191
-#, fuzzy
 msgid ""
 "Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:\n"
 "  j, Down-arrow         k, Up-arrow             move highlight\n"
@@ -742,8 +739,7 @@ msgstr ""
 "(Mugitzeko tekla hauek paketeen zerrendako pantailako berak dira.)\n"
 "\n"
 "Irten:\n"
-" Itzulera-tekla, Sartu  hautatu metodo hau eta joan bere konf. "
-"elkarrizketara\n"
+" Enter, Sartu  hautatu metodo hau eta joan bere konf. elkarrizketara\n"
 " x, X                   irten, instalazio-metodoa aldatu edo konfiguratu "
 "gabe\n"
 "\n"
@@ -1057,9 +1053,8 @@ msgid "[none]"
 msgstr "[bat ere ez]"
 
 #: dselect/methlist.cc:191
-#, fuzzy
 msgid "Explanation"
-msgstr "honen azalpena: "
+msgstr "Azalpena"
 
 #: dselect/methlist.cc:200
 msgid "No explanation available."
@@ -1393,7 +1388,7 @@ msgstr "honen aurremendekoa da:"
 
 #: dselect/pkgdisplay.cc:75
 msgid "breaks with"
-msgstr ""
+msgstr "honekin hondatzen da: "
 
 #: dselect/pkgdisplay.cc:76
 msgid "conflicts with"
@@ -1608,24 +1603,20 @@ msgstr ""
 "desberdinetako paketeak markatzeko."
 
 #: dselect/pkginfo.cc:95
-#, fuzzy
 msgid "Interrelationships"
 msgstr "interrelazioak"
 
 #: dselect/pkginfo.cc:112
-#, fuzzy
 msgid "No description available."
-msgstr "azalpen erabilgarririk ez."
+msgstr "Ez dago azalpen erabilgarririk."
 
 #: dselect/pkginfo.cc:130
-#, fuzzy
 msgid "Installed control file information"
-msgstr "instalatutako kontrol-informazioa: "
+msgstr "instalatutako kontrol fitxategiaren informazioa"
 
 #: dselect/pkginfo.cc:146
-#, fuzzy
 msgid "Available control file information"
-msgstr "kontrol-fitxategiaren informazioaren bertsio erabilgarria"
+msgstr "Kontrol fitxategiaren informazio erabilgarria"
 
 #: dselect/pkglist.cc:123 dselect/pkglist.cc:124
 msgid "<null>"
@@ -1724,18 +1715,3 @@ msgstr "Inst. berts."
 #: dselect/pkgtop.cc:295
 msgid "Avail.ver"
 msgstr "Berts. erabilg."
-
-#~ msgid "interrelationships affecting "
-#~ msgstr "hauen arteko interrelazioak: "
-
-#~ msgid "description of "
-#~ msgstr "honen azalpena: "
-
-#~ msgid "description"
-#~ msgstr "azalpena"
-
-#~ msgid "currently installed control info"
-#~ msgstr "instalatutako kontrol-informazioa"
-
-#~ msgid "available version of control info for "
-#~ msgstr "kontrol-informazioaren bertsio erabilgarria: "

+ 7 - 10
dselect/po/ro.po

@@ -12,21 +12,20 @@
 # Copyright (C) 2005 THE PACKAGE'S COPYRIGHT HOLDER
 #
 # Rușeț Zeno <rzeno@cwazy.co.uk>, 2005.
-# Eddy Petrișor <eddy.petrisor@gmail.com>, 2005, 2006, 2007.
+# Eddy Petrișor <eddy.petrisor@gmail.com>, 2005, 2006, 2007, 2008.
 # Sorin Batariuc <sorin@bonbon.net>, 2005.
 msgid ""
 msgstr ""
 "Project-Id-Version: ro\n"
 "Report-Msgid-Bugs-To: debian-dpkg@lists.debian.org\n"
 "POT-Creation-Date: 2008-01-07 11:58+0200\n"
-"PO-Revision-Date: 2007-06-12 12:39+0300\n"
+"PO-Revision-Date: 2008-02-09 13:28+0200\n"
 "Last-Translator: Eddy Petrișor <eddy.petrisor@gmail.com>\n"
 "Language-Team: Romanian <debian-l10n-romanian@lists.debian.org>\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms:  nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
-"20)) ? 1 : 2;\n"
+"Plural-Forms:  nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\n"
 "X-Generator: KBabel 1.11.4\n"
 
 #  spațiile sunt necesare!!
@@ -315,7 +314,6 @@ msgid "Keystrokes"
 msgstr "Combinații taste"
 
 #: dselect/helpmsgs.cc:25
-#, fuzzy
 msgid ""
 "Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:\n"
 "  j, Down-arrow         k, Up-arrow             move highlight\n"
@@ -347,7 +345,7 @@ msgid ""
 "   D     set all to Directly requested state  n, \\  repeat last search\n"
 msgstr ""
 "Taste de deplasare: Următor/Anterior, Cap/Coadă, Sus/Jos, Înainte/Înapoi:\n"
-"  Săgeată-jos, j        Săgeată-sus, k          mută cursorul\n"
+"  j, Săgeată-jos        k, Săgeată-sus          mută cursorul\n"
 "  N, Page-down, Space   P, Page-up, Backspace   derulează lista cu 1 pagină\n"
 "  ^n                    ^p                      derulează lista cu 1 linie\n"
 "  t, Home               e, End                  sari la capul/coada listei\n"
@@ -732,7 +730,6 @@ msgid "Keystrokes for method selection"
 msgstr "Combinații de taste pentru selectarea metodei"
 
 #: dselect/helpmsgs.cc:191
-#, fuzzy
 msgid ""
 "Motion keys: Next/Previous, Top/End, Up/Down, Backwards/Forwards:\n"
 "  j, Down-arrow         k, Up-arrow             move highlight\n"
@@ -758,7 +755,7 @@ msgid ""
 msgstr ""
 "Taste de deplasare: Următor/Anterior, Început/Sfârșit, Sus/Jos, Înapoi/"
 "Înainte:\n"
-"  n, Down-arrow         p, Up-arrow             mută selecția\n"
+"  j, Down-arrow         k, Up-arrow             mută selecția\n"
 "  N, Page-down, Space   P, Page-up, Backspace   derulează lista cu 1 pagină\n"
 "  ^n                    ^p                      derulează lista cu 1 linie\n"
 "  t, Home               e, End                  sari la începutul/sfârșitul "
@@ -1134,8 +1131,7 @@ msgstr "nu pot aștepta după %.250s"
 #: dselect/method.cc:175
 #, c-format
 msgid "got wrong child's status - asked for %ld, got %ld"
-msgstr ""
-"am recepționat o stare greșită a procesului-fiu - cerut %ld, recepționat %ld"
+msgstr "am recepționat o stare greșită a procesului-fiu - cerut %ld, recepționat %ld"
 
 #: dselect/method.cc:186
 #, c-format
@@ -1763,3 +1759,4 @@ msgstr "Ver.disp"
 
 #~ msgid "available version of control info for "
 #~ msgstr "versiune disponibilă a informației de control pentru"
+

+ 0 - 17
getopt/Makefile.am

@@ -1,17 +0,0 @@
-## Process this file with automake to produce Makefile.in
-
-localedir = $(datadir)/locale
-INCLUDES = \
-	-DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl \
-	-I$(top_srcdir)/lib
-
-
-noinst_LIBRARIES = libopt.a
-
-libopt_a_SOURCES = \
-	closeout.c closeout.h \
-	error.h \
-	getopt.c getopt.h \
-	getopt1.c \
-	long-options.c long-options.h \
-	obstack.c obstack.h

+ 0 - 60
getopt/closeout.c

@@ -1,60 +0,0 @@
-/* closeout.c - close standard output
-   Copyright (C) 1998 Free Software Foundation, Inc.
-
-   This program is free software; you can 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 program 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 this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#if ENABLE_NLS
-# include <libintl.h>
-# define _(Text) gettext (Text)
-#else
-# define _(Text) Text
-#endif
-
-#if HAVE_STDLIB_H
-# include <stdlib.h>
-#endif
-#ifndef EXIT_FAILURE
-# define EXIT_FAILURE 1
-#endif
-
-#include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
-#include <stdio.h>
-#include "closeout.h"
-#include "error.h"
-
-/* Close standard output, exiting with status STATUS on failure.  */
-void
-close_stdout_status (int status)
-{
-  if (ferror (stdout))
-    error (status, 0, _("write error"));
-  if (fclose (stdout) != 0)
-    error (status, errno, _("write error"));
-}
-
-/* Close standard output, exiting with status EXIT_FAILURE on failure.  */
-void
-close_stdout (void)
-{
-  close_stdout_status (EXIT_FAILURE);
-}

+ 0 - 10
getopt/closeout.h

@@ -1,10 +0,0 @@
-#ifndef PARAMS
-# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
-void close_stdout PARAMS ((void));
-void close_stdout_status PARAMS ((int status));

+ 0 - 62
getopt/error.h

@@ -1,62 +0,0 @@
-/* Declaration for error-reporting function
-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
-
-   NOTE: The canonical source of this file is maintained with the GNU C
-   Library.  Bugs can be reported to bug-glibc@prep.ai.mit.edu.
-
-   This program is free software; you can 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 program 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 this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-   USA.  */
-
-#ifndef _ERROR_H
-#define _ERROR_H 1
-
-#ifdef	__cplusplus
-extern "C" {
-#endif
-
-#if defined (__STDC__) && __STDC__
-
-/* Print a message with `fprintf (stderr, FORMAT, ...)';
-   if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
-   If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
-
-extern void error (int status, int errnum, const char *format, ...);
-
-extern void error_at_line (int status, int errnum, const char *fname,
-			   unsigned int lineno, const char *format, ...);
-
-/* If NULL, error will flush stdout, then print on stderr the program
-   name, a colon and a space.  Otherwise, error will call this
-   function without parameters instead.  */
-extern void (*error_print_progname) (void);
-
-#else
-void error ();
-void error_at_line ();
-extern void (*error_print_progname) ();
-#endif
-
-/* This variable is incremented each time `error' is called.  */
-extern unsigned int error_message_count;
-
-/* Sometimes we want to have at most one error per line.  This
-   variable controls whether this mode is selected or not.  */
-extern int error_one_per_line;
-
-#ifdef	__cplusplus
-}
-#endif
-
-#endif /* error.h */

+ 0 - 83
getopt/long-options.c

@@ -1,83 +0,0 @@
-/* Utility to accept --help and --version options as unobtrusively as possible.
-   Copyright (C) 1993, 1994, 1998 Free Software Foundation, Inc.
-
-   This program is free software; you can 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 program 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 this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* Written by Jim Meyering.  */
-
-#if HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <getopt.h>
-#include "closeout.h"
-#include "long-options.h"
-
-static struct option const long_options[] =
-{
-  {"help", no_argument, 0, 'h'},
-  {"version", no_argument, 0, 'v'},
-  {0, 0, 0, 0}
-};
-
-/* Process long options --help and --version, but only if argc == 2.
-   Be careful not to gobble up `--'.  */
-
-void
-parse_long_options (argc, argv, command_name, package, version, usage)
-     int argc;
-     char **argv;
-     const char *command_name;
-     const char *package;
-     const char *version;
-     void (*usage)(int);
-{
-  int c;
-  int saved_opterr;
-
-  saved_opterr = opterr;
-
-  /* Don't print an error message for unrecognized options.  */
-  opterr = 0;
-
-  if (argc == 2
-      && (c = getopt_long (argc, argv, "+", long_options, NULL)) != -1)
-    {
-      switch (c)
-	{
-	case 'h':
-	  (*usage) (0);
-
-	case 'v':
-	  printf ("%s (%s) %s\n", command_name, package, version);
-	  close_stdout (); /* FIXME: output failure exit status
-			      should be settable via an arg.  */
-	  exit (0);
-
-	default:
-	  /* Don't process any other long-named options.  */
-	  break;
-	}
-    }
-
-  /* Restore previous value.  */
-  opterr = saved_opterr;
-
-  /* Reset this to zero so that getopt internals get initialized from
-     the probably-new parameters when/if getopt is called later.  */
-  optind = 0;
-}

+ 0 - 32
getopt/long-options.h

@@ -1,32 +0,0 @@
-/* long-options.h -- declaration for --help- and --version-handling function.
-   Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
-
-   This program is free software; you can 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 program 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 this program; if not, write to the Free Software Foundation,
-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
-
-/* Written by Jim Meyering.  */
-
-#ifndef PARAMS
-# if defined PROTOTYPES || (defined __STDC__ && __STDC__)
-#  define PARAMS(Args) Args
-# else
-#  define PARAMS(Args) ()
-# endif
-#endif
-
-void
-  parse_long_options PARAMS ((int _argc, char **_argv,
-			      const char *_command_name,
-			      const char *_package,
-			      const char *_version, void (*_usage) (int)));

+ 3 - 2
lib/Makefile.am

@@ -3,9 +3,10 @@
 localedir = $(datadir)/locale
 pkgconfdir = $(sysconfdir)/@PACKAGE@
 INCLUDES = \
-	-DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl \
+	-DLOCALEDIR=\"$(localedir)\" \
 	-DCONFIGDIR=\"$(pkgconfdir)\" \
-	-DCOPYINGFILE=\"$(datadir)/common-licenses/GPL-2\"
+	-DCOPYINGFILE=\"$(datadir)/common-licenses/GPL-2\" \
+	-idirafter $(top_srcdir)/libcompat
 
 
 noinst_LIBRARIES = libdpkg.a

+ 1 - 3
lib/database.c

@@ -118,10 +118,8 @@ int informative(struct pkginfo *pkg, struct pkginfoperfile *info) {
 
 struct pkginfo *findpackage(const char *inname) {
   struct pkginfo **pointerp, *newpkg;
-  char *name = strdup(inname), *p;
+  char *name = m_strdup(inname), *p;
 
-  if (name == NULL)
-    ohshite(_("couldn't allocate memory for strdup in findpackage(%s)"),inname);
   p= name;
   while(*p) { *p= tolower(*p); p++; }
   

+ 11 - 6
lib/dpkg.h

@@ -175,7 +175,7 @@ extern const char printforhelp[];
   if (setjmp(*ejbuf)) { /* expect warning about possible clobbering of argv */\
     error_unwind(ehflag_bombout); exit(2);\
   }\
-  push_error_handler(ejbuf,print_error_fatal,0);\
+  push_error_handler(ejbuf, print_error_fatal, NULL); \
   umask(022); /* Make sure all our status databases are readable. */\
   if (loadcfg)\
     loadcfgfile(prog, cmdinfos);\
@@ -183,7 +183,7 @@ extern const char printforhelp[];
 } while (0)
 
 #define standard_shutdown(freemem) do {\
-  set_error_display(0,0);\
+  set_error_display(NULL, NULL); \
   error_unwind(ehflag_normaltidy);\
   if (freemem)\
     nffreeall();\
@@ -222,6 +222,7 @@ void warningf(const char *fmt, ...) PRINTFFORMAT(1, 2);
 void setcloexec(int fd, const char* fn);
 void *m_malloc(size_t);
 void *m_realloc(void*, size_t);
+char *m_strdup(const char *str);
 int m_fork(void);
 void m_dup2(int oldfd, int newfd);
 void m_pipe(int fds[2]);
@@ -284,14 +285,14 @@ struct buffer_data {
 	if (lseek(fd, limit, SEEK_CUR) == -1) { \
 	    if(errno != ESPIPE) ohshite(__VA_ARGS__); \
 	    buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, NULL, \
-				     0, BUFFER_WRITE_NULL, NULL, \
+	                             NULL, BUFFER_WRITE_NULL, NULL, \
 				     limit, __VA_ARGS__);\
 	}
 # define stream_null_copy(file, limit, ...) \
 	if (fseek(file, limit, SEEK_CUR) == -1) { \
 	    if(errno != EBADF) ohshite(__VA_ARGS__); \
 	    buffer_copy_setup_PtrPtr(file, BUFFER_READ_STREAM, NULL, \
-				     0, BUFFER_WRITE_NULL, NULL, \
+	                             NULL, BUFFER_WRITE_NULL, NULL, \
 				     limit, __VA_ARGS__);\
 	}
 # define stream_fd_copy(file, fd, limit, ...)\
@@ -323,14 +324,14 @@ struct buffer_data {
 	if (lseek(fd, limit, SEEK_CUR) == -1) { \
 	    if(errno != ESPIPE) ohshite(desc); \
 	    buffer_copy_setup_IntPtr(fd, BUFFER_READ_FD, NULL, \
-				     0, BUFFER_WRITE_NULL, NULL, \
+	                             NULL, BUFFER_WRITE_NULL, NULL, \
 				     limit, desc);\
 	}
 # define stream_null_copy(file, limit, desc...) \
 	if (fseek(file, limit, SEEK_CUR) == -1) { \
 	    if(errno != EBADF) ohshite(desc); \
 	    buffer_copy_setup_PtrPtr(file, BUFFER_READ_STREAM, NULL, \
-				     0, BUFFER_WRITE_NULL, NULL, \
+	                             NULL, BUFFER_WRITE_NULL, NULL, \
 				     limit, desc);\
 	}
 # define stream_fd_copy(file, fd, limit, desc...)\
@@ -413,6 +414,10 @@ void unsetenv(const char *x);
 
 /*** other compatibility functions ***/
 
+#ifndef offsetof
+#define offsetof(st, m) ((size_t)&((st *)NULL)->m)
+#endif
+
 #ifndef HAVE_STRTOUL
 #define strtoul strtol
 #endif

+ 19 - 4
lib/mlib.c

@@ -67,6 +67,20 @@ void *m_realloc(void *r, size_t amount) {
   return r;
 }
 
+char *
+m_strdup(const char *str)
+{
+  char *new_str;
+
+  onerr_abort++;
+  new_str = strdup(str);
+  if (!new_str)
+    ohshite(_("failed to allocate memory"));
+  onerr_abort--;
+
+  return new_str;
+}
+
 static void print_error_forked(const char *emsg, const char *contextstring) {
   fprintf(stderr, _("%s (subprocess): %s\n"), thisname, emsg);
 }
@@ -157,7 +171,9 @@ off_t buffer_write(buffer_data_t data, void *buf, off_t length, const char *desc
     switch(data->type ^ BUFFER_WRITE_SETUP) {
       case BUFFER_WRITE_MD5:
 	{
-	  struct buffer_write_md5ctx *ctx = malloc(sizeof(struct buffer_write_md5ctx));
+	  struct buffer_write_md5ctx *ctx;
+
+	  ctx = m_malloc(sizeof(struct buffer_write_md5ctx));
 	  ctx->hash = data->data.ptr;
 	  data->data.ptr = ctx;
 	  MD5Init(&ctx->ctx);
@@ -173,7 +189,7 @@ off_t buffer_write(buffer_data_t data, void *buf, off_t length, const char *desc
 	  int i;
 	  unsigned char digest[16], *p = digest;
 	  struct buffer_write_md5ctx *ctx = (struct buffer_write_md5ctx *)data->data.ptr;
-	  unsigned char *hash = *ctx->hash = malloc(33);
+	  unsigned char *hash = *ctx->hash = m_malloc(33);
 	  MD5Final(digest, &ctx->ctx);
 	  for (i = 0; i < 16; ++i) {
 	    sprintf((char *)hash, "%02x", *p++);
@@ -302,8 +318,7 @@ off_t buffer_copy(buffer_data_t read_data, buffer_data_t write_data, off_t limit
   if((limit!=-1) && (limit < bufsize)) bufsize= limit;
   if(bufsize == 0)
     return 0;
-  writebuf= buf= malloc(bufsize);
-  if(buf== NULL) ohshite(_("failed to allocate buffer in buffer_copy (%s)"), desc);
+  writebuf = buf= m_malloc(bufsize);
 
   while(bytesread >= 0 && byteswritten >= 0 && bufsize > 0) {
     bytesread= read_data->proc(read_data, buf, bufsize, desc);

+ 4 - 5
lib/myopt.c

@@ -75,7 +75,8 @@ void myfileopt(const char* fn, const struct cmdinfo* cmdinfos) {
     if (cip->takesvalue) {
       if (!opt) ohshite(_("configuration error: %s needs a value"), linebuf);
       if (cip->call) cip->call(cip,opt);
-      else *cip->sassignto= strdup(opt);
+      else
+        *cip->sassignto = m_strdup(opt);
     } else {
       if (opt) ohshite(_("configuration error: %s does not take a value"), linebuf);
       if (cip->call) cip->call(cip,NULL);
@@ -90,16 +91,14 @@ void loadcfgfile(const char *prog, const struct cmdinfo* cmdinfos) {
   char *home, *file;
   int l1, l2;
   l1 = strlen(CONFIGDIR "/.cfg") + strlen(prog);
-  file = malloc(l1 + 1);
-  if (file==NULL) ohshite(_("Error allocating memory for cfgfilename"));
+  file = m_malloc(l1 + 1);
   sprintf(file, CONFIGDIR "/%s.cfg", prog);
   myfileopt(file, cmdinfos);
   if ((home = getenv("HOME")) != NULL) {
     l2 = strlen(home) + 1 + strlen("/.cfg") + strlen(prog);
     if (l2 > l1) {
       free(file);
-      file = malloc(l2 + 1);
-      if (file==NULL) ohshite(_("Error allocating memory for cfgfilename"));
+      file = m_malloc(l2 + 1);
     }
     sprintf(file, "%s/.%s.cfg", home, prog);
     myfileopt(file, cmdinfos);

+ 1 - 2
lib/parse.c

@@ -115,8 +115,7 @@ int parsedb(const char *filename, enum parsedbflags flags,
     if ((dataptr= (char *)mmap(NULL, stat.st_size, PROT_READ, MAP_SHARED, fd, 0)) == MAP_FAILED)
       ohshite(_("can't mmap package info file `%.255s'"),filename);
 #else
-    if ((dataptr= malloc(stat.st_size)) == NULL)
-      ohshite(_("failed to malloc for info file `%.255s'"),filename);
+    dataptr = m_malloc(stat.st_size);
 
     fd_buf_copy(fd, dataptr, stat.st_size, _("copy info file `%.255s'"),filename);
 #endif

+ 3 - 5
lib/parsedump.h

@@ -25,12 +25,10 @@
 
 struct fieldinfo;
 
-#define PKGIFPOFF(f) ((char*)(&(((struct pkginfoperfile *)0x1000)->f)) - \
-                      (char*)(struct pkginfoperfile *)0x1000)
+#define PKGIFPOFF(f) (offsetof(struct pkginfoperfile, f))
 #define PKGPFIELD(pifp,of,type) (*(type*)((char*)(pifp)+(of)))
 
-#define FILEFOFF(f) ((char*)(&(((struct filedetails *)0x1000)->f)) - \
-                     (char*)(struct filedetails *)0x1000)
+#define FILEFOFF(f) (offsetof(struct filedetails, f))
 #define FILEFFIELD(filedetail,of,type) (*(type*)((char*)(filedetail)+(of)))
 
 typedef void freadfunction(struct pkginfo *pigp, struct pkginfoperfile *pifp,
@@ -56,7 +54,7 @@ struct fieldinfo {
   const char *name;
   freadfunction *rcall;
   fwritefunction *wcall;
-  unsigned int integer;
+  size_t integer;
 };
 
 void parseerr(FILE *file, const char *filename, int lno, FILE *warnto, int *warncount,

+ 3 - 3
lib/showpkg.c

@@ -43,7 +43,7 @@ struct lstitem {
 static struct lstitem* alloclstitem(void) {
 	struct lstitem*	buf;
 
-	buf=(struct lstitem*)malloc(sizeof(struct lstitem));
+	buf = m_malloc(sizeof(struct lstitem));
 	buf->type=invalid;
 	buf->next=NULL;
 	buf->data=NULL;
@@ -81,7 +81,7 @@ static int parsefield(struct lstitem* cur, const char* fmt, const char* fmtend)
 	}
 
 	cur->type=field;
-	cur->data=(char*)malloc(len+1);
+	cur->data = m_malloc(len + 1);
 	memcpy(cur->data, fmt, len);
 	cur->data[len]='\0';
 
@@ -96,7 +96,7 @@ static int parsestring(struct lstitem* cur, const char* fmt, const char* fmtend)
 	len=fmtend-fmt+1;
 
 	cur->type=string;
-	write=cur->data=(char*)malloc(len+1);
+	write = cur->data = m_malloc(len + 1);
 	while (fmt<=fmtend) {
 		if (*fmt=='\\') {
 			fmt++;

+ 9 - 28
lib/tarfn.c

@@ -14,6 +14,7 @@
 #include <grp.h>
 #include <errno.h>
 #include <tarfn.h>
+#include <dpkg.h>
 
 struct TarHeader {
 	char Name[100];
@@ -33,8 +34,7 @@ struct TarHeader {
 };
 typedef struct TarHeader	TarHeader;
 
-static const unsigned int	TarChecksumOffset
-	= (unsigned int)&(((TarHeader *)NULL)->Checksum);
+static const size_t TarChecksumOffset = offsetof(TarHeader, Checksum);
 
 /* Octal-ASCII-to-long */
 static long
@@ -61,7 +61,7 @@ StoC(const char *s, int size)
 	char *	str;
 
 	len = strnlen(s, size);
-	str = malloc(len + 1);
+	str = m_malloc(len + 1);
 	memcpy(str, s, len);
 	str[len] = 0;
 
@@ -137,7 +137,7 @@ TarExtractor(
        next_long_name = NULL;
        next_long_link = NULL;
        long_read = 0;
-	symListBottom = symListPointer = symListTop = malloc(sizeof(symlinkList));
+	symListBottom = symListPointer = symListTop = m_malloc(sizeof(symlinkList));
 	symListTop->next = NULL;
 
 	h.UserData = userData;
@@ -195,24 +195,10 @@ TarExtractor(
 			break;
 		case SymbolicLink:
 			memcpy(&symListBottom->h, &h, sizeof(TarInfo));
-			if ((symListBottom->h.Name = strdup(h.Name)) == NULL) {
-				status = -1;
-				errno = 0;
-				break;
-			}
-			if ((symListBottom->h.LinkName = strdup(h.LinkName)) == NULL) {
-				free(symListBottom->h.Name);
-				status = -1;
-				errno = 0;
-				break;
-			}
-			if ((symListBottom->next = malloc(sizeof(symlinkList))) == NULL) {
-				free(symListBottom->h.LinkName);
-				free(symListBottom->h.Name);
-				status = -1;
-				errno = 0;
-				break;
-			}
+			symListBottom->h.Name = m_strdup(h.Name);
+			symListBottom->h.LinkName = m_strdup(h.LinkName);
+			symListBottom->next = m_malloc(sizeof(symlinkList));
+
 			symListBottom = symListBottom->next;
 			symListBottom->next = NULL;
 			status = 0;
@@ -233,12 +219,7 @@ TarExtractor(
                  if (*longp)
                    free(*longp);
 
-                 if (NULL == (*longp = (char *)malloc(h.Size))) {
-                   /* malloc failed, so bail */
-                   errno = 0;
-		   status = -1;
-		   break;
-                 }
+		*longp = m_malloc(h.Size);
                  bp = *longp;
 
                  // the way the GNU long{link,name} stuff works is like this:  

+ 0 - 36
lib/vercmp.c

@@ -65,42 +65,6 @@ static int verrevcmp(const char *val, const char *ref) {
   return 0;
 }
 
-
-#if 0
-static int verrevcmp(const char *ival, const char *iref) {
-  static char empty[] = "";
-  int vc, rc;
-  long vl, rl;
-  char *vp, *rp;
-  char *val, *ref;
-  memcpy(&val,&ival,sizeof(char*));
-  memcpy(&ref,&iref,sizeof(char*));
-
-  if (!val) val= empty;
-  if (!ref) ref= empty;
-  for (;;) {
-    vp= val;  while (*vp && !isdigit(*vp)) vp++;
-    rp= ref;  while (*rp && !isdigit(*rp)) rp++;
-    for (;;) {
-      vc= val == vp ? 0 : *val++;
-      rc= ref == rp ? 0 : *ref++;
-      if (!rc && !vc) break;
-      if (vc && !isalpha(vc)) vc += 256; /* assumes ASCII character set */
-      if (rc && !isalpha(rc)) rc += 256;
-      if (vc != rc) return vc - rc;
-    }
-    val= vp;
-    ref= rp;
-    vl=0;  if (isdigit(*vp)) vl= strtol(val,&val,10);
-    rl=0;  if (isdigit(*rp)) rl= strtol(ref,&ref,10);
-    if (vl != rl) return vl - rl;
-    if (!*val && !*ref) return 0;
-    if (!*val) return -1;
-    if (!*ref) return +1;
-  }
-}
-#endif
-
 int versioncompare(const struct versionrevision *version,
                    const struct versionrevision *refversion) {
   int r;

getopt/.gitignore → libcompat/.gitignore


+ 22 - 0
libcompat/Makefile.am

@@ -0,0 +1,22 @@
+## Process this file with automake to produce Makefile.in
+
+INCLUDES = \
+	-idirafter $(top_srcdir)/libcompat
+
+
+noinst_LIBRARIES = libcompat.a
+
+libcompat_a_SOURCES =
+
+if !HAVE_GETOPT
+libcompat_a_SOURCES += getopt.c getopt.h
+endif
+
+if !HAVE_GETOPT_LONG
+libcompat_a_SOURCES += getopt1.c
+endif
+
+if !HAVE_OBSTACK_FREE
+libcompat_a_SOURCES += obstack.c obstack.h
+endif
+

getopt/getopt.c → libcompat/getopt.c


getopt/getopt.h → libcompat/getopt.h


getopt/getopt1.c → libcompat/getopt1.c


getopt/obstack.c → libcompat/obstack.c


getopt/obstack.h → libcompat/obstack.h


+ 2 - 2
m4/arch.m4

@@ -4,8 +4,8 @@
 # the target architecture, to avoid duplicating its logic.
 AC_DEFUN([_DPKG_ARCHITECTURE], [
 AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl
-$2="`cd $srcdir/scripts; \
-     PERL5LIB=$(pwd) ./dpkg-architecture.pl -t$target -q$1 2>/dev/null`"
+$2=`cd $srcdir/scripts; \
+    PERL5LIB=$(pwd) ./dpkg-architecture.pl -t$target -q$1 2>/dev/null`
 ])# _DPKG_ARCHITECURE
 
 # DPKG_CPU_TYPE

+ 14 - 0
m4/funcs.m4

@@ -1,3 +1,5 @@
+# Copyright © 2008 Guillem Jover <guillem@debian.org>
+
 # DPKG_FUNC_VA_COPY
 # -----------------
 # Define HAVE_VA_COPY if we have va_copy, fail if they can't be assigned
@@ -26,3 +28,15 @@ v1 = v2;
 		       [dpkg_cv_va_list_copy=yes],
 		       [dpkg_cv_va_list_copy=no])])])
 ])# DPKG_FUNC_VA_COPY
+
+# DPKG_CHECK_COMPAT_FUNCS(LIST)
+# -----------------------
+# Check each function and define an automake conditional
+AC_DEFUN([DPKG_CHECK_COMPAT_FUNCS],
+[
+  AC_CHECK_FUNCS([$1])
+  m4_foreach_w([ac_func], [$1], [
+    AM_CONDITIONAL(HAVE_[]AS_TR_CPP(ac_func),
+                   [test "x$ac_cv_func_[]AS_TR_SH(ac_func)" = "xyes"])
+  ])
+]) # DPKG_CHECK_COMPAT_FUNCS

+ 2 - 2
m4/libs.m4

@@ -71,9 +71,9 @@ if test "x$with_selinux" != "xno"; then
 		[AC_DEFINE(WITH_SELINUX, 1,
 			[Define to 1 to compile in SELinux support])
 		 if test "x$with_selinux" = "xstatic"; then
-			dpkg_selinux_libs="-Wl,-Bstatic `pkg-config --static --libs libselinux` -Wl,-Bdynamic"
+			dpkg_selinux_libs="-Wl,-Bstatic "`pkg-config --static --libs libselinux`" -Wl,-Bdynamic"
 		 else
-			dpkg_selinux_libs="`pkg-config --libs libselinux`"
+			dpkg_selinux_libs=`pkg-config --libs libselinux`
 		 fi
 		 SELINUX_LIBS="${SELINUX_LIBS:+$SELINUX_LIBS }$dpkg_selinux_libs"
 		 with_selinux="yes"],

+ 22 - 0
man/ChangeLog

@@ -1,3 +1,25 @@
+2008-01-22  Peter Karlsson  <peterk@debian.org>
+
+	* po/sv.po: Updated to 1422t.
+
+2008-01-22  Raphael Hertzog  <hertzog@debian.org>
+
+	* dpkg-parsechangelog.1: Fix typos reported by Helge Kreutzmann.
+	* po/*.po: Update all translations accordingly.
+
+2008-01-22  Helge Kreutzmann  <debian@helgefjell.de>
+
+	* po/de.po: Updated to 1389t0f33u.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* po/dpkg-man.pot: Regenerated.
+	* po/*.po: Merged with dpkg-man.pot.
+
+2008-01-17  Raphael Hertzog  <hertzog@debian.org>
+
+	* dpkg-source.1: Fix default value of -T parameter.
+
 2008-01-13  Frank Lichtenheld  <djpig@debian.org>
 
 	* dpkg-parsechangelog.1: Document the new

+ 15 - 7
man/dpkg-buildpackage.1

@@ -117,24 +117,32 @@ command it executes with
 if one has been specified. Otherwise, if none has been specified,
 \fBfakeroot\fP will be used by default, if the command is present.
 .I gain-root-command
-should be the name of a program on the
+should start with the name of a program on the
 .B PATH
 and will get as arguments the name of the real command to run and the
 arguments it should take.
 .I gain-root-command
-should not contain spaces or any other shell metacharacters.
-.\" what happens, if it contains spaces? (hs)
+can include parameters (they must be space-separated) but no shell
+metacharacters.
 .I gain-root-command
 might typically be
 .BR fakeroot ", " sudo ", " super " or " really .
 .B su
-is not suitable, since it requires a
-.B \-c
-option to run a command and even then it can only invoke the user's
-shell with
+is not suitable, since it can only invoke the user's shell with
 .B \-c
 instead of passing arguments individually to the command to be run.
 .TP
+.BI \-R rules-file
+Building a Debian package usually involves invoking
+.B debian/rules
+as a command with several standard parameters. With this option it's
+possible to use another program invocation to build the package (it can
+include space separated parameters).
+Alternatively it can be used to execute the standard rules file with
+another make program (for example by using
+.B /usr/local/bin/make -f debian/rules
+as \fIrules-file\fR).
+.TP
 .BI \-p sign-command
 When
 .B dpkg\-buildpackage

+ 6 - 0
man/dpkg-checkbuilddeps.1

@@ -25,6 +25,12 @@ Change the location of the \fBdpkg\fR database. The default location is
 Ignore \fIBuild\-Depends\-Indep\fR lines. Use when no arch-indep packages will
 be built.
 .TP
+.BI "\-d " build-depends-string
+.TP
+.BI "\-c " build-conflicts-string
+Use the given build dependencies/conflicts instead of those contained in the
+debian/control file.
+.TP
 .B \-h
 Show the usage message and exit.
 .

+ 7 - 5
man/dpkg-genchanges.1

@@ -35,11 +35,10 @@ included in the upload if any source is being generated (i.e.
 haven't been used).
 .TP
 .B \-si
-By default, or if specified, the original source will be included if the
-version number ends in
-.BR \-0 " or " \-1 ,
-i.e. if the Debian revision part of the version number is
-.BR 0 " or " 1 .
+By default, or if specified, the original source will be included only if
+the upstream version number (the version without epoch and without Debian
+revision) differs from the upstream version number of the previous
+changelog entry.
 .TP
 .B \-sa
 Forces the inclusion of the original source.
@@ -80,6 +79,9 @@ Read substitution variables in
 .IR substvarsfile ;
 the default is
 .BR debian/substvars .
+No variable substitution is done on any of the fields that are output,
+however the special variable \fIFormat\fR will override the field of the
+same name.
 .TP
 .BI \-D field = value
 Override or add an output control file field.

+ 31 - 2
man/dpkg-gensymbols.1

@@ -44,8 +44,14 @@ The symbols files are really useful only if they reflect the evolution of
 the package through several releases. Thus the maintainer has to update
 them every time that a new symbol is added so that its associated minimal
 version matches reality. To do this properly he can use the diffs contained
-in the build logs. In most cases, the diff can be directly applied to his
-debian/\fIpackage\fR.symbols file.
+in the build logs. In most cases, the diff applies directly to his
+debian/\fIpackage\fR.symbols file. That said, further tweaks are usually
+needed: it's recommended for example to drop the Debian revision
+from the minimal version so that backports with a lower version number
+but the same upstream version still satisfy the generated dependencies.
+If the Debian revision can't be dropped because the symbol really got
+added by the Debian specific change, then one should suffix the version
+with "~".
 .P
 Before applying any patch to the symbols file, the maintainer should
 double-check that it's sane. Public symbols are not supposed to disappear,
@@ -74,6 +80,29 @@ to do it is the following:
 .PP
 #include "libsomething1.symbols.common"
  arch_specific_symbol@Base 1.0
+.SS Using wildcards with versioned symbols
+.P
+Well maintained libraries have versioned symbols where each version
+corresponds to the upstream version where the symbol got added. If that's
+the case, it's possible to write a symbols file with wildcard entries like
+"*@GLIBC_2.0" that would match any symbol associated to the version
+GLIBC_2.0. It's still possible to include specific symbols in the file,
+they'll take precedence over any matching wildcard entry. An example:
+.PP
+libc.so.6 libc6 #MINVER#
+ *@GLIBC_2.0 2.0
+ [...]
+ *@GLIBC_2.7 2.7
+ access@GLIBC_2.0 2.2
+.P
+The symbol access@GLIBC_2.0 will lead to a minimal dependency on libc6
+version 2.2 despite the wildcard entry *@GLIBC_2.0 which associates
+symbols versioned as GLIBC_2.0 with the minimal version 2.0.
+.p
+Note that using wildcards means that \fBdpkg\-gensymbols\fR can't check
+for symbols that might have disappeared and can't generate a diff between
+the maintainer-supplied symbols file and the generated one in the binary
+package.
 .SS Good library management
 .P
 A well-maintained library has the following features:

+ 2 - 2
man/dpkg-parsechangelog.1

@@ -39,7 +39,7 @@ Show the version and exit.
 .SS Parser Options
 The following options can be used to influence the output of
 the changelog parser, e.g. the range of entries or the format
-of the output. They need to supported by the parser script
+of the output. They need to be supported by the parser script
 in question. See also \fBCAVEATS\fP.
 .TP
 .BI \-\-format " outputformat"
@@ -48,7 +48,7 @@ Set the output format. Currently supported values are
 \fIdpkg\fP is the classic output format (from before this
 option existed) and the default. It consists of one paragraph
 in Debian control format (see \fBdeb-control\fP(5)). If more
-than one entry is requested, most fields are taken from the
+than one entry is requested, then most fields are taken from the
 latest entry, except otherwise stated:
 .RS
 .TP

+ 1 - 2
man/dpkg-source.1

@@ -97,8 +97,7 @@ See \fBdeb\-substvars\fP(5) for a discussion of output substitution.
 .BI \-T substvarsfile
 Read substitution variables in
 .IR substvarsfile ;
-the default is
-.BR debian/substvars .
+the default is to not read any file.
 .TP
 .BI \-D field = value
 Override or add an output control file field.

+ 7 - 0
man/dselect.1

@@ -423,6 +423,13 @@ keys, any possibly detrimental changes to the requested package
 selections can be backed out completely to the last established
 settings.
 .sp
+If you mistakenly establish some settings and wish to revert all the
+selections to what is currently installed on the system, press the
+\fB'C'\fP key.
+This is somewhat similar to using the unhold command on all packages,
+but provides a more obvious panic button in cases where the user
+pressed \fBenter\fP by accident.
+.sp
 .
 .SH BUGS
 The

Разница между файлами не показана из-за своего большого размера
+ 474 - 203
man/po/de.po


Разница между файлами не показана из-за своего большого размера
+ 368 - 140
man/po/dpkg-man.pot


Разница между файлами не показана из-за своего большого размера
+ 411 - 185
man/po/es.po


Разница между файлами не показана из-за своего большого размера
+ 415 - 179
man/po/fr.po


Разница между файлами не показана из-за своего большого размера
+ 389 - 174
man/po/hu.po


Разница между файлами не показана из-за своего большого размера
+ 400 - 177
man/po/ja.po


Разница между файлами не показана из-за своего большого размера
+ 417 - 172
man/po/pl.po


Разница между файлами не показана из-за своего большого размера
+ 399 - 174
man/po/pt_BR.po


Разница между файлами не показана из-за своего большого размера
+ 393 - 177
man/po/ru.po


Разница между файлами не показана из-за своего большого размера
+ 467 - 198
man/po/sv.po


+ 61 - 22
man/start-stop-daemon.8

@@ -1,4 +1,4 @@
-.TH start\-stop\-daemon 8 "2007-09-08" "Debian Project" "dpkg utilities"
+.TH start\-stop\-daemon 8 "2008-01-30" "Debian Project" "dpkg utilities"
 .SH NAME
 start\-stop\-daemon \- start and stop system daemon programs
 .
@@ -10,9 +10,7 @@ start\-stop\-daemon \- start and stop system daemon programs
 .SH DESCRIPTION
 .B start\-stop\-daemon
 is used to control the creation and termination of system-level processes.
-Using the
-.BR \-\-exec ", " \-\-pidfile ", " \-\-user ", and " \-\-name " options,"
-.B start\-stop\-daemon
+Using one of the matching options, \fBstart\-stop\-daemon\fP
 can be configured to find existing instances of a running process.
 .PP
 Note: unless
@@ -31,7 +29,7 @@ sent the KILL signal if
 .BR \-\-stop
 is specified. For daemons which have long-lived children
 which need to live through a
-.BR \-\-stop
+.BR \-\-stop ,
 you must specify a pidfile.
 .
 .SH COMMANDS
@@ -45,9 +43,9 @@ does nothing, and exits with error status 1 (0 if
 is specified).
 If such a process does not exist, it starts an
 instance, using either the executable specified by
-.BR \-\-exec ,
-(or, if specified, by
-.BR \-\-startas ).
+.B \-\-exec
+or, if specified, by
+.BR \-\-startas .
 Any arguments given after
 .BR \-\-
 on the command line are passed unmodified to the program being
@@ -67,7 +65,7 @@ exits with error status 1
 .BR \-\-oknodo
 is specified). If
 .B \-\-retry
-is specified then
+is specified, then
 .B start\-stop\-daemon
 will check that the process(es) have terminated.
 .TP
@@ -77,31 +75,33 @@ Show usage information and exit.
 .BR \-V ", " \-\-version
 Show the program version and exit.
 .
-.SH OPTIONS
+.SH MATCHING OPTIONS
+.TP
+.BR \-p ", " \-\-pidfile " \fIpid-file\fP"
+Check whether a process has created the file
+.IR pid-file .
 .TP
 .BR \-x ", " \-\-exec " \fIexecutable\fP"
 Check for processes that are instances of this executable (according to
 \fB/proc/\fIpid\fP/exe\fR).
 .TP
-.BR \-p ", " \-\-pidfile " \fIpid-file\fP"
-Check whether a process has created the file
-.IR pid-file .
+.BR \-n ", " \-\-name " \fIprocess-name\fP"
+Check for processes with the name
+.I process-name
+(according to
+.BR /proc/\fIpid\fB/stat\fP ).
 .TP
 .BR \-u ", " \-\-user " \fIusername\fP|\fIuid\fP
 Check for processes owned by the user specified by
 .I username
 or
 .IR uid .
+.
+.SH OPTIONS
 .TP
 .BR \-g ", " \-\-group " \fIgroup\fP|\fIgid\fP"
 Change to \fIgroup\fP or \fIgid\fP when starting the process.
 .TP
-.BR \-n ", " \-\-name " \fIprocess-name\fP"
-Check for processes with the name
-.I process-name
-(according to
-.BR /proc/\fIpid\fB/stat\fP ).
-.TP
 .BR \-s ", " \-\-signal " \fIsignal\fP"
 With
 .BR \-\-stop ,
@@ -120,7 +120,7 @@ then take further action as determined by the schedule.
 If
 .I timeout
 is specified instead of
-.I schedule
+.IR schedule ,
 then the schedule
 .IB signal / timeout /KILL/ timeout
 is used, where
@@ -172,12 +172,13 @@ Return exit status 0 instead of 1 if no actions are (would be) taken.
 .BR \-q ", " \-\-quiet
 Do not print informational messages; only display error messages.
 .TP
-.BR "\-c ", " \-\-chuid " \fIusername\fR|\fIuid\fP
+.BR \-c ", " \-\-chuid " \fIusername\fR|\fIuid\fP"
 Change to this username/uid before starting the process. You can also
 specify a group by appending a
 .BR : ,
 then the group or gid in the same way
 as you would for the `chown' command (\fIuser\fP\fB:\fP\fIgroup\fP).
+If a user is specified without a group, the primary GID for that user is used.
 When using this option
 you must realize that the primary and supplemental groups are set as well,
 even if the
@@ -231,7 +232,7 @@ and place the pid into it just before executing the process. Note, the
 file will not be removed when stopping the program.
 .B NOTE:
 This feature may not work in all cases. Most notably when the program
-being executed forks from its main process. Because of this it is usually
+being executed forks from its main process. Because of this, it is usually
 only useful when combined with the
 .B \-\-background
 option.
@@ -239,6 +240,44 @@ option.
 .BR \-v ", " \-\-verbose
 Print verbose informational messages.
 .
+.SH EXIT STATUS
+.B start\-stop\-daemon
+returns 0 if the requested action was performed, or if
+.B \-\-oknodo
+is specified and either
+.B \-\-start
+was specified and a matching process was already running, or
+.B \-\-stop
+was specified and there were no matching processes. If
+.B \-\-oknodo
+was not specified and nothing was done, 1 is returned. If
+.B --stop
+and
+.B --retry
+were specified, but the end of the schedule was reached and the processes were
+still running, the error value is 2. For all other errors, the status is 3.
+.
+.SH EXAMPLE
+Start the \fBfood\fP daemon, unless one is already running (a process named
+food, running as user food, with pid in food.pid):
+.IP
+.nf
+start-stop-daemon --start --oknodo --user food --name food --pidfile /var/run/food.pid --startas /usr/sbin/food --chuid food -- --daemon
+.fi
+.PP
+Send \fBSIGTERM\fP to \fBfood\fP and wait up to 5 seconds for it to stop:
+.IP
+.nf
+start-stop-daemon --stop --oknodo --user food --name food --pidfile /var/run/food.pid --retry 5
+.fi
+.PP
+Demonstration of a custom schedule for stopping \fBfood\fP:
+.IP
+.nf
+start-stop-daemon --stop --oknodo --user food --name food --pidfile /var/run/food.pid --retry=TERM/30/KILL/5
+.fi
+.PP
+.
 .SH AUTHORS
 Marek Michalkiewicz <marekm@i17linuxb.ists.pwr.wroc.pl> based on
 a previous version by Ian Jackson <ian@chiark.greenend.org.uk>.

+ 0 - 4
man/update-alternatives.8

@@ -317,10 +317,6 @@ is doing.
 .B \-\-quiet
 Don't generate any comments unless errors occur.
 This option is not yet implemented.
-.TP
-.B \-\-test
-Don't actually do anything, just say what would be done.
-This option is not yet implemented.
 .
 .SH FILES
 .TP

+ 26 - 3
po/ChangeLog

@@ -1,15 +1,38 @@
+2008-02-09  Eddy Petrișor <eddy.petrisor@gmail.com>
+
+	* ro.po: Update to 927t.
+
+2008-02-04  Changwoo Ryu  <cwryu@debian.org>
+
+	* ko.po: Update to 927t.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* de.po, eu.po, fr.po, gl.po, nb.po, ru.po, sv.po: Update to 928t.
+	* vi.po, zh_CN.po: Likewise.
+
+2008-01-21  Guillem Jover  <guillem@debian.org>
+
+	* dpkg.pot: Regenerated.
+	* *.po: Merged with dpkg.pot.
+
+2008-01-19  Frank Lichtenheld  <djpig@debian.org>
+
+	* POTFILES.in: Remove utils/enoent.c
+	since it doesn't exist anymore.
+
 2008-01-14  Yuri Kozlov  <kozlov.y@gmail.com>
 
 	* ru.po: Updated to 928t.
 
 2008-01-12  Jacobo Tarrio  <jtarrio@debian.org>
 
-	* gl.po: Updated to 928f.
+	* gl.po: Updated to 928t.
 
 2008-01-07  Christian Perrier  <bubulle@debian.org>
 
-	* de.po, eu.po, fr.po, nb.po, sv.po, vi.po, zh_CN.po:
-	  Updated to 928f.
+	* de.po, eu.po, fr.po, nb.po, sv.po, vi.po: Updated to 928t.
+	* zh_CN.po: Likewise.
 
 2008-01-07  Piarres Beobide  <pi@beobide.net>
 

+ 0 - 1
po/POTFILES.in

@@ -48,7 +48,6 @@ dpkg-split/main.c
 dpkg-split/queue.c
 dpkg-split/split.c
 
-utils/enoent.c
 utils/start-stop-daemon.c
 
 scripts/cleanup-info.pl

Разница между файлами не показана из-за своего большого размера
+ 354 - 360
po/bs.po


Разница между файлами не показана из-за своего большого размера
+ 357 - 360
po/ca.po


Разница между файлами не показана из-за своего большого размера
+ 358 - 361
po/cs.po


Разница между файлами не показана из-за своего большого размера
+ 358 - 361
po/da.po


Разница между файлами не показана из-за своего большого размера
+ 358 - 362
po/de.po


Разница между файлами не показана из-за своего большого размера
+ 354 - 360
po/dpkg.pot


Разница между файлами не показана из-за своего большого размера
+ 358 - 361
po/dz.po


Разница между файлами не показана из-за своего большого размера
+ 354 - 360
po/el.po


Разница между файлами не показана из-за своего большого размера
+ 358 - 361
po/es.po


Разница между файлами не показана из-за своего большого размера
+ 354 - 360
po/et.po


Разница между файлами не показана из-за своего большого размера
+ 359 - 362
po/eu.po


Разница между файлами не показана из-за своего большого размера
+ 358 - 362
po/fr.po


Разница между файлами не показана из-за своего большого размера
+ 358 - 362
po/gl.po


Разница между файлами не показана из-за своего большого размера
+ 357 - 360
po/hu.po


Разница между файлами не показана из-за своего большого размера
+ 354 - 360
po/id.po


Разница между файлами не показана из-за своего большого размера
+ 357 - 360
po/it.po


Разница между файлами не показана из-за своего большого размера
+ 358 - 361
po/ja.po


Разница между файлами не показана из-за своего большого размера
+ 357 - 360
po/km.po


Разница между файлами не показана из-за своего большого размера
+ 677 - 1131
po/ko.po


Разница между файлами не показана из-за своего большого размера
+ 354 - 360
po/ku.po


Разница между файлами не показана из-за своего большого размера
+ 357 - 360
po/mr.po


Разница между файлами не показана из-за своего большого размера
+ 358 - 362
po/nb.po



Некоторые файлы не были показаны из-за большого количества измененных файлов