pkgsrc-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: Please help test new pkgin
On Fri, Jun 08, 2018 at 11:07:34PM +0100, Jonathan Perkin wrote:
> * Packages are now refreshed if their BUILD_DATE changes, ensuring
> rebuilt dependencies are correctly handled.
Hi,
with my repositories being built by applying pkg_rolling-replace to a
build host, this leads to many unnecessary downloads and updates.
I attached a patch to make this build date check optional ("-B" as in
Build-Date).
Regards
Matthias Ferdinand
$NetBSD$
--- impact.c.orig 2018-06-08 21:54:53.000000000 +0000
+++ impact.c
@@ -229,11 +229,19 @@ deps_impact(Plisthead *impacthead, Pkgli
/*
* Figure out if this is an upgrade or a refresh.
*/
- if (pkg_match(pdp->depend, plist->full) == 0)
- toupgrade = TOUPGRADE;
- else if (!pkgstr_identical(plist->build_date,
- mapplist->build_date))
- toupgrade = TOREFRESH;
+ if (pkg_match(pdp->depend, plist->full) == 0) {
+ toupgrade = TOUPGRADE;
+ TRACE(" ! dependencies not matching: pdp->depend=%s; plist->full=%s\n", pdp->depend, plist->full);
+ }
+
+ else if (force_builddatecheck && !pkgstr_identical(plist->build_date,
+ mapplist->build_date)) {
+ toupgrade = TOUPGRADE;
+ TRACE(" ! builddates not matching: plist->build_date=%s; mapplist->build_date=%s\n",
+ (plist->build_date) ? xstrdup(plist->build_date) : "(null)",
+ (mapplist->build_date) ? xstrdup(mapplist->build_date) : "(null)"
+ );
+ }
/*
* installed version does not match dep requirement
$NetBSD$
--- main.c.orig 2018-06-08 21:54:53.000000000 +0000
+++ main.c
@@ -38,6 +38,7 @@ static void ginto(void);
uint8_t yesflag = 0, noflag = 0, force_reinstall = 0;
uint8_t verbosity = 0, package_version = 0, parsable = 0, pflag = 0;
+uint8_t force_builddatecheck = 0;
char lslimit = '\0';
FILE *tracefp = NULL;
@@ -55,7 +56,7 @@ main(int argc, char *argv[])
/* Default to not doing \r printouts if we don't send to a tty */
parsable = !isatty(fileno(stdout));
- while ((ch = getopt(argc, argv, "dhyfFPvVl:nc:t:p")) != -1) {
+ while ((ch = getopt(argc, argv, "dhyfFPvVl:nc:t:pB")) != -1) {
switch (ch) {
case 'f':
force_update = 1;
@@ -63,6 +64,9 @@ main(int argc, char *argv[])
case 'F':
force_reinstall = 1;
break;
+ case 'B':
+ force_builddatecheck = !force_builddatecheck;
+ break;
case 'y':
yesflag = 1;
noflag = 0;
@@ -341,7 +345,7 @@ usage(int status)
int i;
fprintf((status) ? stderr : stdout,
- "Usage: pkgin [-cdfFhlnPtvVy] command [package ...]\n\n"
+ "Usage: pkgin [-cdfFhlnPtvVyB] command [package ...]\n\n"
"Commands and shortcuts:\n");
for (i = 0; cmd[i].name != NULL; i++) {
$NetBSD$
--- pkgin.h.orig 2018-06-09 10:13:46.276411370 +0000
+++ pkgin.h
@@ -189,6 +189,7 @@ typedef struct Preflist {
} Preflist;
extern uint8_t force_reinstall;
+extern uint8_t force_builddatecheck;
extern uint8_t verbosity;
extern uint8_t package_version;
extern uint8_t parsable;
Home |
Main Index |
Thread Index |
Old Index