From ed194011a65e2a6468137a78257d1be3a4712b5e Mon Sep 17 00:00:00 2001 From: Wichert Akkerman Date: Thu, 15 Jun 2000 16:32:52 +0000 Subject: [PATCH] lib/parse.c: add Enhances to fieldinfos[] lib/fields.c: + initialize dop->backrev as well when creating new dependency + only allow exact version relations when dealing with provides TODO: remove versioned provides debian/rules: don't fail of make clean fails (which happens on a cvsclean tree) --- ChangeLog | 10 ++++++++++ TODO | 2 -- debian/rules | 2 +- lib/fields.c | 8 ++++++-- lib/parse.c | 1 + 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 699764f4..07ac8b0e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Thu Jun 15 13:41:28 CEST 2000 Wichert Akkerman + + * lib/parse.c: add Enhances to fieldinfos[] + * lib/fields.c: + + initialize dop->backrev as well when creating new dependency + + only allow exact version relations when dealing with provides + * TODO: remove versioned provides + * debian/rules: don't fail of make clean fails (which happens on a + cvsclean tree) + Thu Jun 15 10:09:03 EDT 2000 Ben Collins * main/depcon.c: remove if() that prevented versioned deps from checking diff --git a/TODO b/TODO index d0203dc1..dd81151a 100644 --- a/TODO +++ b/TODO @@ -15,12 +15,10 @@ dpkg * allow external program to specify how to handle conffiles * log our actions * try to remove directories again after removing conffiles -* allow versioned provides * verify Enhances works (ie don't trigger some assertion) dselect: * support Enhances (GNU/FSF) -* allow versioned provides * toggle for searching through descriptions dpkg-source diff --git a/debian/rules b/debian/rules index f72f2782..c9db2b3b 100755 --- a/debian/rules +++ b/debian/rules @@ -37,7 +37,7 @@ $(BUILD)/config.status: clean: $(checkdir) - $(MAKE) $(MFLAGS) -C $(BUILD) distclean + -$(MAKE) $(MFLAGS) -C $(BUILD) distclean rm -f debian/files debian/substvars rm -f debian/dpkg.substvars rm -fr $(BUILD) $(TMP) $(TMP_DPKG) $(TMP_DPKG_DEV) $(TMP_DPKG_DOC) diff --git a/lib/fields.c b/lib/fields.c index 36bc241d..2d0a10e4 100644 --- a/lib/fields.c +++ b/lib/fields.c @@ -289,8 +289,8 @@ void f_dependency(struct pkginfo *pigp, struct pkginfoperfile *pifp, dop->up= dyp; dop->ed= findpackage(depname.buf); dop->next= 0; *ldopp= dop; ldopp= &dop->next; - dop->nextrev= 0; /* Don't link this (which is after all only `newpig' from - dop->backrev= 0; * the main parsing loop in parsedb) into the depended on + dop->nextrev= 0; /* Don't link this (which is after all only `newpig' from */ + dop->backrev= 0; /* the main parsing loop in parsedb) into the depended on * packages' lists yet. This will be done later when we * install this (in parse.c). For the moment we do the * `forward' links in deppossi (`ed') only, and the backward @@ -334,6 +334,10 @@ void f_dependency(struct pkginfo *pigp, struct pkginfoperfile *pifp, fip->name,depname.buf); dop->verrel= dvr_exact; } + if ((dop->verrel!=dvr_exact) && (fip->integer==dep_provides)) + parseerr(0,filename,lno,warnto,warncount,pigp,0, + _("Only exact versions may be used for Provides")); + if (!isspace(*p) && !isalnum(*p)) { parseerr(0,filename,lno, warnto,warncount,pigp,1, _("`%s' field, reference to `%.255s':\n" diff --git a/lib/parse.c b/lib/parse.c index 1cdff088..85a6d957 100644 --- a/lib/parse.c +++ b/lib/parse.c @@ -50,6 +50,7 @@ const struct fieldinfo fieldinfos[]= { { "Recommends", f_dependency, w_dependency, dep_recommends }, { "Suggests", f_dependency, w_dependency, dep_suggests }, { "Conflicts", f_dependency, w_dependency, dep_conflicts }, + { "Enhances", f_dependency, w_dependency, dep_enhances }, { "Conffiles", f_conffiles, w_conffiles }, { "Filename", f_filecharf, w_filecharf, FILEFOFF(name) }, { "Size", f_filecharf, w_filecharf, FILEFOFF(size) }, -- 2.39.5