Browse Source

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)

Wichert Akkerman 26 years ago
parent
commit
ed194011a6
5 changed files with 18 additions and 5 deletions
  1. 10 0
      ChangeLog
  2. 0 2
      TODO
  3. 1 1
      debian/rules
  4. 6 2
      lib/fields.c
  5. 1 0
      lib/parse.c

+ 10 - 0
ChangeLog

@@ -1,3 +1,13 @@
+Thu Jun 15 13:41:28 CEST 2000 Wichert Akkerman <wakkerma@debian.org>
+
+  * 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 <bcollins@debian.org>
 
   * main/depcon.c: remove if() that prevented versioned deps from checking

+ 0 - 2
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

+ 1 - 1
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)

+ 6 - 2
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"

+ 1 - 0
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)           },