"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "deb.c" between
epm-4.5.tar.gz and epm-4.5.1.tar.gz

About: EPM is a complete, cross-platform Linux/UNIX software and file packaging program that generates distribution archives from a list of files.

deb.c  (epm-4.5):deb.c  (epm-4.5.1)
/* /*
* Debian package gateway for the ESP Package Manager (EPM). * Debian package gateway for the ESP Package Manager (EPM).
* *
* Copyright 1999-2017 by Michael R Sweet * Copyright © 1999-2020 by Michael R Sweet
* Copyright 1999-2010 by Easy Software Products. * Copyright © 1999-2010 by Easy Software Products.
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option) * the Free Software Foundation; either version 2, or (at your option)
* any later version. * any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
skipping to change at line 166 skipping to change at line 166
const char *header; /* Dependency header string */ const char *header; /* Dependency header string */
FILE *fp; /* Control file */ FILE *fp; /* Control file */
char prodfull[255], /* Full name of product */ char prodfull[255], /* Full name of product */
name[1024], /* Full product name */ name[1024], /* Full product name */
filename[1024]; /* Destination filename */ filename[1024]; /* Destination filename */
command_t *c; /* Current command */ command_t *c; /* Current command */
depend_t *d; /* Current dependency */ depend_t *d; /* Current dependency */
file_t *file; /* Current distribution file */ file_t *file; /* Current distribution file */
struct passwd *pwd; /* Pointer to user record */ struct passwd *pwd; /* Pointer to user record */
struct group *grp; /* Pointer to group record */ struct group *grp; /* Pointer to group record */
const char *runlevels, /* Run levels */
*rlptr; /* Pointer into runlevels */
static const char *depends[] = /* Dependency names */ static const char *depends[] = /* Dependency names */
{ {
"Depends:", "Depends:",
"Conflicts:", "Conflicts:",
"Replaces:", "Replaces:",
"Provides:" "Provides:"
}; };
/* /*
* Figure out the full name of the distribution... * Figure out the full name of the distribution...
skipping to change at line 276 skipping to change at line 274
fprintf(fp, "%s %s", header, d->product); fprintf(fp, "%s %s", header, d->product);
if (d->vernumber[0] == 0) if (d->vernumber[0] == 0)
{ {
if (d->vernumber[1] < INT_MAX) if (d->vernumber[1] < INT_MAX)
fprintf(fp, " (<= %s)", d->version[1]); fprintf(fp, " (<= %s)", d->version[1]);
} }
else else
{ {
if (d->vernumber[1] < INT_MAX) if (d->vernumber[1] < INT_MAX)
fprintf(fp, " (>= %s, <= %s)", d->version[0], d->version[1]); fprintf(fp, " (>= %s), %s (<= %s)", d->version[0], d->product, d->v ersion[1]);
else else
fprintf(fp, " (>= %s)", d->version[0]); fprintf(fp, " (>= %s)", d->version[0]);
} }
} }
putc('\n', fp); putc('\n', fp);
} }
} }
for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++)
skipping to change at line 372 skipping to change at line 370
fputs("#!/bin/sh\n", fp); fputs("#!/bin/sh\n", fp);
fputs("# " EPM_VERSION "\n", fp); fputs("# " EPM_VERSION "\n", fp);
for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++)
if (c->type == COMMAND_POST_INSTALL && c->subpackage == subpackage) if (c->type == COMMAND_POST_INSTALL && c->subpackage == subpackage)
fprintf(fp, "%s\n", c->command); fprintf(fp, "%s\n", c->command);
for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) for (i = dist->num_files, file = dist->files; i > 0; i --, file ++)
if (tolower(file->type) == 'i' && file->subpackage == subpackage) if (tolower(file->type) == 'i' && file->subpackage == subpackage)
{ {
runlevels = get_runlevels(file, "02345"); /*
* Debian's update-rc.d has changed over the years; current practice is
* to let update-rc.d choose the runlevels and ordering...
*/
fprintf(fp, "update-rc.d %s start %02d", file->dst, fprintf(fp, "update-rc.d %s defaults\n", file->dst);
get_start(file, 99));
for (rlptr = runlevels; isdigit(*rlptr & 255); rlptr ++)
if (*rlptr != '0')
fprintf(fp, " %c", *rlptr);
if (strchr(runlevels, '0') != NULL)
fprintf(fp, " . stop %02d 0", get_stop(file, 0));
fputs(" . >/dev/null\n", fp);
fprintf(fp, "/etc/init.d/%s start\n", file->dst); fprintf(fp, "/etc/init.d/%s start\n", file->dst);
} }
fclose(fp); fclose(fp);
} }
/* /*
* Write the prerm file for DPKG... * Write the prerm file for DPKG...
*/ */
skipping to change at line 472 skipping to change at line 463
fputs("# " EPM_VERSION "\n", fp); fputs("# " EPM_VERSION "\n", fp);
for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++) for (i = dist->num_commands, c = dist->commands; i > 0; i --, c ++)
if (c->type == COMMAND_POST_REMOVE && c->subpackage == subpackage) if (c->type == COMMAND_POST_REMOVE && c->subpackage == subpackage)
fprintf(fp, "%s\n", c->command); fprintf(fp, "%s\n", c->command);
for (i = dist->num_files, file = dist->files; i > 0; i --, file ++) for (i = dist->num_files, file = dist->files; i > 0; i --, file ++)
if (tolower(file->type) == 'i' && file->subpackage == subpackage) if (tolower(file->type) == 'i' && file->subpackage == subpackage)
{ {
fputs("if [ purge = \"$1\" ]; then\n", fp); fputs("if [ purge = \"$1\" ]; then\n", fp);
fprintf(fp, " update-rc.d %s remove >/dev/null\n", file->dst); fprintf(fp, " update-rc.d %s remove\n", file->dst);
fputs("fi\n", fp); fputs("fi\n", fp);
} }
fclose(fp); fclose(fp);
} }
/* /*
* Write the conffiles file for DPKG... * Write the conffiles file for DPKG...
*/ */
 End of changes. 6 change blocks. 
18 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)