[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Transition from dpkg to GNU install-info



On Fri, 2009-03-13 at 19:07:12 +0100, Raphael Hertzog wrote:
> On Fri, 13 Mar 2009, Norbert Preining wrote:
> I just wrote it. I had to do it in C otherwise I couldn't do the check
> on how it's called.

Cool!

> > Why? What would change? info-browsers (see below) should depend on
> > install-info, but if they don't well, then we file a bug to fix that.
> > But we should have install-info first in sid.
> 
> When we upload dpkg to sid, if it contains the Breaks dep,
> it will effectively break all info-browsers that have not been updated
> yet. It's best to avoid that if possible by doing the dpkg upload after
> the info-browsers update.

Yes.

> > Anyway, does that mean with the ok of more people here that after
> > testing dpkg (hopefully after the weekend with your patch) I should
> > upload to sid?
> 
> I guess so. Asking for review/test on -devel is certainly a good idea at
> this point.

Once we have hammered those last decisions, we should update the wiki
page and send something like what Norbert proposed to -devel. Probably
add also an item to the DeveloperNews.

Some minor comments, the rest is on my previous mail about the
warnings on the other conditions:

>  debian/dpkg.install           |    1 -
>  debian/dpkg.lintian-overrides |    2 +
>  man/Makefile.am               |    1 -
>  man/install-info.8            |  295 -----------------------
>  man/po/po4a.cfg               |    5 -
>  po/POTFILES.in                |    1 -
>  scripts/Makefile.am           |   16 +--
>  scripts/install-info.pl       |  524 -----------------------------------------

Missing removals in “scripts/.gitignore”.

>  utils/.gitignore              |    1 +
>  utils/Makefile.am             |   14 +-
>  utils/install-info.c          |   34 +++
>  11 files changed, 51 insertions(+), 843 deletions(-)

And there's an entry in the TODO list, you can remove it now.

> diff --git a/utils/.gitignore b/utils/.gitignore
> index bf5714e..ee8689b 100644
> --- a/utils/.gitignore
> +++ b/utils/.gitignore
> @@ -1 +1,2 @@
>  start-stop-daemon
> +install-info

A missing install-info-stamp.

> diff --git a/utils/Makefile.am b/utils/Makefile.am
> index cd1e4f1..2de2b0c 100644
> --- a/utils/Makefile.am
> +++ b/utils/Makefile.am
> @@ -6,7 +6,6 @@ INCLUDES = \
>  	-idirafter $(top_srcdir)/libcompat \
>  	-I$(top_srcdir)/lib
>  
> -

Spurious line removal. :)

>  if WITH_START_STOP_DAEMON
>    sbin_PROGRAMS = start-stop-daemon
>  
> diff --git a/utils/install-info.c b/utils/install-info.c
> new file mode 100644
> index 0000000..ee8758b
> --- /dev/null
> +++ b/utils/install-info.c

Even if temporary, probably better to add a license header.

> @@ -0,0 +1,34 @@
> +
> +#include <unistd.h>
> +#include <errno.h>
> +#include <string.h>
> +#include <stdio.h>
> +
> +#define WARN "install-info: warning: "
> +#define FAIL "install-info: failure: "
> +
> +int
> +main(int argc, char **argv)
> +{
> +    if (strcmp(argv[0], "/usr/sbin/install-info") == 0) {
> +	fprintf(stderr, WARN "/usr/sbin/install-info provided by "
> +	                "dpkg is deprecated\n");
> +	fprintf(stderr, WARN "its replacement lives in /usr/bin/\n");
> +    }
> +
> +    if (access("/usr/bin/install-info", X_OK) == 0) {
> +	execv("/usr/bin/install-info", argv);

Print an error message here as well.

> +	return 1; /* exec failed */
> +    } else {
> +	if (errno == ENOENT) {
> +	    fprintf(stderr, WARN "nothing done since /usr/bin/install-info "
> +	                    "doesn't exist\n");
> +	} else {
> +	    fprintf(stderr, FAIL "can't execute /usr/bin/install-info: %s\n",
> +	            strerror(errno));
> +	    return 1;
> +	}
> +    }
> +
> +    return 0;
> +}

regards,
guillem


Reply to: