Avoid permanent package rebuilds

pbulk contains a script to determine whether a package has to be rebuilt or not. There are three checks performed by default:

The third condition is automatically valid after a bulk build, otherwise the system has time keeping or file system issues. The other conditions are more interesting.

The first condition can trigger a permanent rebuild if files are formed in a way that the +BUILD_INFO processor extracts incomplete or additional RCS IDs. The rdigest package for example had a patch starting with

@@ -41,8 +41,17 @@ __RCSID("$NetBSD: digest.c,v 1.15 2007/0

As the RCS IDs are extracted with a simple grep expression, this ended up overwriting the original RCS ID at the top.

Another example was url2pg, which contained the following statement in a local file:

      print PLIST ("\@comment \$NetBSD\$\n");

This is picked up too and should be escape, in this case by splitting the string into two parts in the middle of NetBSD.

Interestingly, the second condition is violated in one case as well. p5-DBIx-Class-EncodedColumn depends on p5-Digest-SHA. The version of p5-Digest-SHA is higher than the version of the Perl package, so the dependency resolver picks up that. During the build, pkgsrc decides that perl is already present and good enough, so skips the dependency. I'm not sure how to best address this yet.