+2006-08-08 Ian Jackson <iwj@ubuntu.com>
+
+ * lib/dpkg-db.h (deptype): Add dep_breaks.
+ * lib/fields.c (f_dependency): Bail out if the Breaks field has an
+ alternative through a '|'.
+ * lib/parse.c (fieldinfos): Add support for the Breaks field when
+ parsing them as a depedency field.
+ * src/depcon.c (describedepcon): Support displaying the Breaks
+ relationship.
+ (depisok): Ignore the Breaks field by adding dep_breaks to the assert
+ and returning as succeeded.
+ * src/processarc.c (process_archive): Print a message stating that
+ current dpkg does not support the Breaks field. Do not bail out in
+ case the Breaks references packages to ignore for dependency handling.
+ * src/packages.c (dependencies_ok): Add a place holder comment to
+ be replaced by the code to prevent configuration of Broken packages.
+
2006-07-07 Nicolas François <nicolas.francois@centraliens.net>
* dpkg-deb/build.c: Specify --null before the -T option to avoid
dpkg (1.13.23~) UNRELEASED; urgency=low
+ [ Guillem Jover ]
+ * Add initial support for the Breaks field, by parsing but rejecting it.
+ Thanks to Ian Jackson <iwj@ubuntu.com>. Closes: #375703
+
[ Added dpkg Translations ]
* Dzongkha (Kinley Tshering)
dep_recommends,
dep_depends,
dep_predepends,
+ dep_breaks,
dep_conflicts,
dep_provides,
dep_replaces,
" error after reference to package `%.255s'"),
fip->name, dop->ed->name);
if (fip->integer == dep_conflicts ||
+ fip->integer == dep_breaks ||
fip->integer == dep_provides ||
fip->integer == dep_replaces)
parseerr(NULL,filename,lno, warnto,warncount,pigp,0,
{ "Pre-Depends", f_dependency, w_dependency, dep_predepends },
{ "Recommends", f_dependency, w_dependency, dep_recommends },
{ "Suggests", f_dependency, w_dependency, dep_suggests },
+ { "Breaks", f_dependency, w_dependency, dep_breaks },
{ "Conflicts", f_dependency, w_dependency, dep_conflicts },
{ "Enhances", f_dependency, w_dependency, dep_enhances },
{ "Conffiles", f_conffiles, w_conffiles },
case dep_depends: varbufaddstr(addto, _(" depends on ")); break;
case dep_predepends: varbufaddstr(addto, _(" pre-depends on ")); break;
case dep_recommends: varbufaddstr(addto, _(" recommends ")); break;
+ case dep_breaks: varbufaddstr(addto, _(" breaks ")); break;
case dep_conflicts: varbufaddstr(addto, _(" conflicts with ")); break;
case dep_suggests: varbufaddstr(addto, _(" suggests ")); break;
case dep_enhances: varbufaddstr(addto, _(" enhances ")); break;
char linebuf[1024];
assert(dep->type == dep_depends || dep->type == dep_predepends ||
- dep->type == dep_conflicts || dep->type == dep_recommends ||
- dep->type == dep_suggests || dep->type == dep_enhances );
+ dep->type == dep_breaks || dep->type == dep_conflicts ||
+ dep->type == dep_recommends || dep->type == dep_suggests ||
+ dep->type == dep_enhances);
/* The dependency is always OK if we're trying to remove the depend*ing*
* package.
internerr("unknown istobe depending");
}
+ if (dep->type == dep_breaks)
+ /* We don't implement this and we can only be in this state
+ * if either a Breaks-ignorant or a Breaks-supporting dpkg
+ * installed the package. In both cases it's probably too
+ * late to do anything useful about it now in this version
+ * so we just ignore it and hope.
+ * FIXME: implement Breaks
+ */
+ return 1;
+
/* Describe the dependency, in case we have to moan about it. */
varbufreset(whynot);
varbufaddc(whynot, ' ');
debug(dbg_depcon,"checking dependencies of %s (- %s)",
pkg->name, removing ? removing->name : "<none>");
assert(pkg->installed.valid);
+ /* To implement Breaks we need to add code here which prevents
+ * configuration of Broken packages.
+ * FIXME: implement Breaks */
for (dep= pkg->installed.depends; dep; dep= dep->next) {
if (dep->type != dep_depends && dep->type != dep_predepends) continue;
debug(dbg_depcondetail," checking group ...");
}
}
break;
+ case dep_breaks:
+ fprintf(stderr, _("dpkg: regarding %s containing %s:\n"
+ " package uses Breaks; not supported in this dpkg\n"),
+ pfilename, pkg->name);
+ if (!force_depends(dsearch->list))
+ ohshit(_("unsupported dependency problem - not installing %.250s"),
+ pkg->name);
+ fprintf(stderr, _("dpkg: warning - ignoring Breaks !\n"));
+ /* FIXME: implement Breaks */
+ break;
case dep_suggests:
case dep_recommends:
case dep_depends: