Deleted Added
full compact
perform.c (96066) perform.c (96076)
1/*
2 * FreeBSD install - a package for the installation and maintainance
3 * of non-core utilities.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 5 unchanged lines hidden (view full) ---

14 * Jordan K. Hubbard
15 * 18 July 1993
16 *
17 * This is the main body of the create module.
18 *
19 */
20
21#include <sys/cdefs.h>
1/*
2 * FreeBSD install - a package for the installation and maintainance
3 * of non-core utilities.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 5 unchanged lines hidden (view full) ---

14 * Jordan K. Hubbard
15 * 18 July 1993
16 *
17 * This is the main body of the create module.
18 *
19 */
20
21#include <sys/cdefs.h>
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/create/perform.c 96066 2002-05-05 13:09:04Z sobomax $");
22__FBSDID("$FreeBSD: head/usr.sbin/pkg_install/create/perform.c 96076 2002-05-05 21:03:25Z sobomax $");
23
24#include "lib.h"
25#include "create.h"
26
27#include <err.h>
28#include <libgen.h>
29#include <signal.h>
30#include <stdlib.h>

--- 65 unchanged lines hidden (view full) ---

96 cleanup(0);
97 errx(2, __FUNCTION__ ": unable to open contents file '%s' for input", Contents);
98 }
99 }
100 plist.head = plist.tail = NULL;
101
102 /* Stick the dependencies, if any, at the top */
103 if (Pkgdeps) {
23
24#include "lib.h"
25#include "create.h"
26
27#include <err.h>
28#include <libgen.h>
29#include <signal.h>
30#include <stdlib.h>

--- 65 unchanged lines hidden (view full) ---

96 cleanup(0);
97 errx(2, __FUNCTION__ ": unable to open contents file '%s' for input", Contents);
98 }
99 }
100 plist.head = plist.tail = NULL;
101
102 /* Stick the dependencies, if any, at the top */
103 if (Pkgdeps) {
104 char **deps;
104 char **deps, *deporigin;
105 int i;
106 int ndeps = 0;
107
108 if (Verbose && !PlistOnly)
109 printf("Registering depends:");
110
111 /* Count number of dependencies */
112 for (cp = Pkgdeps; cp != NULL && *cp != '\0';

--- 15 unchanged lines hidden (view full) ---

128 i++;
129 }
130 }
131 ndeps = i;
132 deps[ndeps] = NULL;
133
134 sortdeps(deps);
135 for (i = 0; i < ndeps; i++) {
105 int i;
106 int ndeps = 0;
107
108 if (Verbose && !PlistOnly)
109 printf("Registering depends:");
110
111 /* Count number of dependencies */
112 for (cp = Pkgdeps; cp != NULL && *cp != '\0';

--- 15 unchanged lines hidden (view full) ---

128 i++;
129 }
130 }
131 ndeps = i;
132 deps[ndeps] = NULL;
133
134 sortdeps(deps);
135 for (i = 0; i < ndeps; i++) {
136 deporigin = strchr(deps[i], ':');
137 if (deporigin != NULL) {
138 *deporigin = '\0';
139 add_plist_top(&plist, PLIST_DEPORIGIN, ++deporigin);
140 }
136 add_plist_top(&plist, PLIST_PKGDEP, deps[i]);
137 if (Verbose && !PlistOnly)
138 printf(" %s", deps[i]);
139 }
140 }
141
142 if (Verbose && !PlistOnly)
143 printf(".\n");

--- 303 unchanged lines hidden ---
141 add_plist_top(&plist, PLIST_PKGDEP, deps[i]);
142 if (Verbose && !PlistOnly)
143 printf(" %s", deps[i]);
144 }
145 }
146
147 if (Verbose && !PlistOnly)
148 printf(".\n");

--- 303 unchanged lines hidden ---