2
* install-info.c - transitional ginstall-info wrapper
4
* Copyright © 2009 Raphaël Hertzog <hertzog@debian.org>
6
* This is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; either version 2 of the License, or
9
* (at your option) any later version.
11
* This is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see <http://www.gnu.org/licenses/>.
29
#define SELF "/usr/sbin/install-info"
30
#define WRAPPED "/usr/bin/install-info"
32
#define warn(...) fprintf(stderr, "install-info: warning: " __VA_ARGS__)
33
#define error(...) fprintf(stderr, "install-info: error: " __VA_ARGS__)
36
main(int argc, char **argv)
38
if (strcmp(argv[0], SELF) == 0) {
39
warn("don't call programs like install-info with an absolute path,\n");
40
warn("%s provided by dpkg is deprecated and will go away soon;\n",
42
warn("its replacement lives in /usr/bin/.\n");
46
if (errno == ENOENT) {
47
if (getenv("DPKG_RUNNING_VERSION") != NULL) {
50
pkg = getenv("DPKG_MAINTSCRIPT_PACKAGE");
52
warn("maintainer scripts should not call install-info anymore,\n");
53
warn("this is handled now by a dpkg trigger provided by the\n");
54
warn("install-info package; package %s should be updated.\n",
57
warn("nothing done since %s doesn't exist,\n", WRAPPED);
58
warn("you might want to install an info-browser package.\n");
61
error("can't execute %s: %s\n", WRAPPED, strerror(errno));