if (pkg->available.architecture && *pkg->available.architecture &&
strcmp(pkg->available.architecture,"all") &&
strcmp(pkg->available.architecture,architecture))
forcibleerr(fc_architecture,
_("package architecture (%s) does not match system (%s)"),
pkg->available.architecture,architecture);
or the dependencies to avoid conflicts:
for (dsearch= pkg->available.depends; dsearch; dsearch= dsearch->next) {
switch (dsearch->type) {
case dep_conflicts:
/* Look for things we conflict with. */
check_conflict(dsearch, pkg, pfilename);
break;
case dep_breaks:
/* Look for things we break. */
check_breaks(dsearch, pkg, pfilename);
break;
case dep_provides:
/* Look for things that conflict with what we provide. */
if (dsearch->list->ed->installed.valid) {
for (psearch= dsearch->list->ed->installed.depended;
psearch;
psearch= psearch->nextrev) {
if (psearch->up->type != dep_conflicts) continue;
check_conflict(psearch->up, pkg, pfilename);
}
}
break;
case dep_suggests:
case dep_recommends:
case dep_depends:
case dep_replaces:
case dep_enhances:
/* Ignore these here. */
break;
case dep_predepends:
if (!depisok(dsearch,&depprobwhy,0,1)) {
varbufaddc(&depprobwhy,0);
fprintf(stderr, _("dpkg: regarding %s containing %s, pre-dependency problem:\n%s"),
pfilename, pkg->name, depprobwhy.buf);
if (!force_depends(dsearch->list))
ohshit(_("pre-dependency problem - not installing %.250s"),pkg->name);
fprintf(stderr, _("dpkg: warning - ignoring pre-dependency problem !\n"));
}
}
}
Then the data is extracted and installed. Final step is installing the maintainer scripts (pre- and post- install).
This is only the big picture. For more informations, read proccessarc.c from the src/ directory of dpkg .
Now, let's see how to create a DEB package from a higher point of view.