diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2010-05-17 16:46:08 +0200 |
---|---|---|
committer | Raphaël Hertzog <hertzog@debian.org> | 2010-05-17 18:38:38 +0200 |
commit | aa26f83c4b1a0f85d65dc0b6a5f642c3e609c42c (patch) | |
tree | a192448f41be15778c2717708e43d2763a59184e | |
parent | 85a55d82432b8e035a7175f33b6e8c27366b9983 (diff) | |
download | dpkg-aa26f83c4b1a0f85d65dc0b6a5f642c3e609c42c.tar.gz |
Rename /usr/lib/dpkg/maintscript-helper in /usr/bin/dpkg-maintscript-helper
It is a public interface even if working around known limitations.
-rw-r--r-- | debian/changelog | 3 | ||||
-rw-r--r-- | debian/dpkg.install | 4 | ||||
-rw-r--r-- | man/Makefile.am | 4 | ||||
-rw-r--r-- | man/dpkg-maintscript-helper.1 (renamed from man/maintscript-helper.1) | 23 | ||||
-rw-r--r-- | man/po/po4a.cfg | 10 | ||||
-rw-r--r-- | scripts/.gitignore | 1 | ||||
-rw-r--r-- | scripts/Makefile.am | 11 | ||||
-rwxr-xr-x | scripts/dpkg-maintscript-helper.sh (renamed from scripts/maintscript-helper) | 2 |
8 files changed, 33 insertions, 25 deletions
diff --git a/debian/changelog b/debian/changelog index c37f3c5ef..a2053c399 100644 --- a/debian/changelog +++ b/debian/changelog @@ -23,6 +23,9 @@ dpkg (1.15.7.2) UNRELEASED; urgency=low to match the new location. Closes: #580774 * Drop mention of PKG_CONFIG_LIBDIR in dpkg-buildpackage(1), the feature has been removed in 1.15.6. + * Rename /usr/lib/dpkg/maintscript-helper into + /usr/bin/dpkg-maintscript-helper, it is a public interface even if working + around known limitations. [ Guillem Jover ] * Add powerpcspe support to ostable and triplettable. diff --git a/debian/dpkg.install b/debian/dpkg.install index fd86914b3..1b1b99873 100644 --- a/debian/dpkg.install +++ b/debian/dpkg.install @@ -6,25 +6,25 @@ etc/alternatives usr/bin/dpkg usr/bin/dpkg-deb usr/bin/dpkg-divert +usr/bin/dpkg-maintscript-helper usr/bin/dpkg-query usr/bin/dpkg-split usr/bin/dpkg-statoverride usr/bin/dpkg-trigger usr/bin/update-alternatives -usr/lib/dpkg/maintscript-helper usr/lib/dpkg/mksplit usr/sbin usr/share/dpkg usr/share/locale/*/LC_MESSAGES/dpkg.mo usr/share/man/{*/*,*}/dpkg-deb.1 usr/share/man/{*/*,*}/dpkg-divert.8 +usr/share/man/{*/*,*}/dpkg-maintscript-helper.1 usr/share/man/{*/*,*}/dpkg-query.1 usr/share/man/{*/*,*}/dpkg-split.1 usr/share/man/{*/*,*}/dpkg-statoverride.8 usr/share/man/{*/*,*}/dpkg-trigger.1 usr/share/man/{*/*,*}/dpkg.cfg.5 usr/share/man/{*/*,*}/dpkg.1 -usr/share/man/{*/*,*}/maintscript-helper.1 usr/share/man/{*/*,*}/start-stop-daemon.8 usr/share/man/{*/*,*}/update-alternatives.8 usr/share/perl5/Dpkg.pm diff --git a/man/Makefile.am b/man/Makefile.am index da654d7e9..494c0ed5a 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -106,6 +106,7 @@ dist_man_MANS = \ dpkg-genchanges.1 \ dpkg-gencontrol.1 \ dpkg-gensymbols.1 \ + dpkg-maintscript-helper.1 \ dpkg-mergechangelogs.1 \ dpkg-name.1 \ dpkg-parsechangelog.1 \ @@ -119,8 +120,7 @@ dist_man_MANS = \ dpkg-trigger.1 \ dpkg-vendor.1 \ dpkg.1 \ - dpkg.cfg.5 \ - maintscript-helper.1 + dpkg.cfg.5 if WITH_DSELECT dist_man_MANS += \ diff --git a/man/maintscript-helper.1 b/man/dpkg-maintscript-helper.1 index 0804e3068..c65db2a97 100644 --- a/man/maintscript-helper.1 +++ b/man/dpkg-maintscript-helper.1 @@ -1,9 +1,9 @@ -.TH maintscript\-helper 1 "2010-04-16" "Debian Project" "dpkg suite" +.TH dpkg\-maintscript\-helper 1 "2010-04-16" "Debian Project" "dpkg suite" .SH NAME -maintscript\-helper \- works around known dpkg limitations in maintainer scripts +dpkg\-maintscript\-helper \- works around known dpkg limitations in maintainer scripts . .SH SYNOPSIS -.B $DPKG_LIBDIR/maintscript\-helper +.B dpkg\-maintscript\-helper .IR command " [" parameters "...] \-\- " maint-script-parameters . .SH COMMANDS AND PARAMETERS @@ -37,8 +37,9 @@ dpkg\-maintained conffile to a file maintained by the package's maintainer scripts, usually with a tool like debconf or ucf. .P This means that if a package is intended to rename or remove a conffile, -it must explicitly do so and \fBmaintscript\-helper\fP can be used to implement -graceful deletion and moving of conffiles within maintainer scripts. +it must explicitly do so and \fBdpkg\-maintscript\-helper\fP can be used +to implement graceful deletion and moving of conffiles within maintainer +scripts. . .SS REMOVING A CONFFILE .P @@ -50,10 +51,8 @@ conffile should not disappear. All of this is implemented by putting the following shell snippet in the \fBpreinst\fP, \fBpostinst\fP and \fBpostrm\fP maintainer scripts: .P - if [ \-x $DPKG_LIBDIR/maintscript\-helper ]; then - $DPKG_LIBDIR/maintscript\-helper rm_conffile \\ - \fIconffile\fP \fIlastversion\fP \fIpackage\fP \-\- "$@" - fi + dpkg\-maintscript\-helper rm_conffile \\ + \fIconffile\fP \fIlastversion\fP \fIpackage\fP \-\- "$@" .P \fIconffile\fP is the filename of the conffile to remove. \fIlastversion\fP is the last version of the package that contained the @@ -82,10 +81,8 @@ Graceful renaming can be implemented by putting the following shell snippet in the \fBpreinst\fP, \fBpostinst\fP and \fBpostrm\fP maintainer scripts: .P - if [ \-x $DPKG_LIBDIR/maintscript\-helper ]; then - $DPKG_LIBDIR/maintscript\-helper mv_conffile \\ - \fIoldconffile\fP \fInewconffile\fP \fIlastversion\fP \fIpackage\fP \-\- "$@" - fi + dpkg\-maintscript\-helper mv_conffile \\ + \fIoldconffile\fP \fInewconffile\fP \fIlastversion\fP \fIpackage\fP \-\- "$@" .P \fIoldconffile\fP and \fInewconffile\fP are the old and new name of the conffile to rename. \fIlastversion\fP is the last version of the package diff --git a/man/po/po4a.cfg b/man/po/po4a.cfg index 3c0abd74e..398b337ff 100644 --- a/man/po/po4a.cfg +++ b/man/po/po4a.cfg @@ -128,6 +128,11 @@ add_$lang:po/$lang.add +[type:man] dpkg-maintscript-helper.1 \ + $lang:$(builddir)/$lang/dpkg-maintscript-helper.1 \ + add_$lang:po/$lang.add + + [type:man] dpkg-mergechangelogs.1 \ $lang:$(builddir)/$lang/dpkg-mergechangelogs.1 \ add_$lang:po/$lang.add @@ -198,11 +203,6 @@ add_$lang:po/$lang.add -[type:man] maintscript-helper.1 \ - $lang:$(builddir)/$lang/maintscript-helper.1 \ - add_$lang:po/$lang.add - - [type:man] start-stop-daemon.8 \ $lang:$(builddir)/$lang/start-stop-daemon.8 \ add_$lang:po/$lang.add diff --git a/scripts/.gitignore b/scripts/.gitignore index 39aaea969..e37404369 100644 --- a/scripts/.gitignore +++ b/scripts/.gitignore @@ -7,6 +7,7 @@ dpkg-divert dpkg-genchanges dpkg-gencontrol dpkg-gensymbols +dpkg-maintscript-helper dpkg-mergechangelogs dpkg-name dpkg-parsechangelog diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 6871280fe..7f5318b33 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -12,6 +12,7 @@ bin_SCRIPTS = \ dpkg-genchanges \ dpkg-gencontrol \ dpkg-gensymbols \ + dpkg-maintscript-helper \ dpkg-mergechangelogs \ dpkg-name \ dpkg-parsechangelog \ @@ -25,8 +26,6 @@ if WITH_UPDATE_ALTERNATIVES bin_SCRIPTS += update-alternatives endif -dist_pkglib_SCRIPTS = maintscript-helper - changelogdir = $(pkglibdir)/parsechangelog changelog_SCRIPTS = \ changelog/debian @@ -41,6 +40,7 @@ EXTRA_DIST = \ dpkg-genchanges.pl \ dpkg-gencontrol.pl \ dpkg-gensymbols.pl \ + dpkg-maintscript-helper.sh \ dpkg-mergechangelogs.pl \ dpkg-name.pl \ dpkg-parsechangelog.pl \ @@ -123,12 +123,19 @@ do_perl_subst = $(AM_V_GEN) \ -e "s:\$$admindir[[:space:]]*=[[:space:]]*['\"][^'\"]*['\"]:\$$admindir=\"$(admindir)\":" \ -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" +do_shell_subst = $(AM_V_GEN) \ + sed -e "s:\$$version[[:space:]]*=[[:space:]]*['\"][^'\"]*[\"']:\$$version=\"$(PACKAGE_VERSION)\":" %: %.pl Makefile @test -d `dirname $@` || $(mkdir_p) `dirname $@` $(do_perl_subst) <$< >$@ $(AM_V_at) chmod +x $@ +%: %.sh Makefile + @test -d `dirname $@` || $(mkdir_p) `dirname $@` + $(do_shell_subst) <$< >$@ + $(AM_V_at) chmod +x $@ + install-data-local: if BUILD_POD_DOC # Install manual pages for perl modules manually as make can't deal diff --git a/scripts/maintscript-helper b/scripts/dpkg-maintscript-helper.sh index d8f81bbd9..db7ac3a18 100755 --- a/scripts/maintscript-helper +++ b/scripts/dpkg-maintscript-helper.sh @@ -21,7 +21,7 @@ # The conffile related functions are inspired by # http://wiki.debian.org/DpkgConffileHandling -# This script is documented in maintscript-helper(1) +# This script is documented in dpkg-maintscript-helper(1) ## ## Functions to remove an obsolete conffile during upgrade |