diff options
author | joerg <joerg@pkgsrc.org> | 2012-03-19 12:17:15 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2012-03-19 12:17:15 +0000 |
commit | 91ce155c2c816847ac6ff504520a555611e2224f (patch) | |
tree | 93ac709b1eec4c605ad5f692f978c94d374a303e /pkgtools | |
parent | beaf504e7e5fc2715406a9b54f300e3b9c6a0f59 (diff) | |
download | pkgsrc-91ce155c2c816847ac6ff504520a555611e2224f.tar.gz |
pbulk-0.45: make order function stable
Diffstat (limited to 'pkgtools')
-rw-r--r-- | pkgtools/pbulk-base/Makefile | 4 | ||||
-rw-r--r-- | pkgtools/pbulk/files/pbulk/lib/match.c | 9 |
2 files changed, 10 insertions, 3 deletions
diff --git a/pkgtools/pbulk-base/Makefile b/pkgtools/pbulk-base/Makefile index 102b71cbaa6..8fce933e648 100644 --- a/pkgtools/pbulk-base/Makefile +++ b/pkgtools/pbulk-base/Makefile @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.7 2011/11/27 19:53:30 joerg Exp $ +# $NetBSD: Makefile,v 1.8 2012/03/19 12:17:15 joerg Exp $ -DISTNAME= pbulk-base-0.44 +DISTNAME= pbulk-base-0.45 COMMENT= Core components of the modular bulk build framework PKG_DESTDIR_SUPPORT= user-destdir diff --git a/pkgtools/pbulk/files/pbulk/lib/match.c b/pkgtools/pbulk/files/pbulk/lib/match.c index 8e51707743d..041934c58ed 100644 --- a/pkgtools/pbulk/files/pbulk/lib/match.c +++ b/pkgtools/pbulk/files/pbulk/lib/match.c @@ -1,4 +1,4 @@ -/* $NetBSD: match.c,v 1.4 2009/03/06 15:19:04 joerg Exp $ */ +/* $NetBSD: match.c,v 1.5 2012/03/19 12:17:15 joerg Exp $ */ /* * Copyright © 2002 Alistair G. Crooks. All rights reserved. @@ -68,8 +68,15 @@ pkg_order(const char *match1, const char *match2) if (v1 == NULL || v2 == NULL) errx(1, "Internal error"); + ++v1; + ++v2; + if (dewey_cmp(v1, DEWEY_GT, v2)) return match1; + else if (dewey_cmp(v2, DEWEY_GT, v1)) + return match2; + else if (strcmp(match1, match2) > 0) + return match1; else return match2; } |