Date: Sun, 17 Feb 2013 13:05:34 +0100 From: Pawel Pekala <pawel@FreeBSD.org> To: freebsd-pkg@freebsd.org Subject: Stale vs duplicate dependencies - bug ? Message-ID: <20130217130534.7bf9fc85@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hello
While working on my script checking for linking problems in packages I
have found strange thing. Some of my packages have stale dependencies:
[corn:~/backup]# pkg info -d konversation-1.1_5 | egrep "(png|pciids|cups-client)"
cups-client-1.5.4
pciids-20121208
png-1.5.13
[corn:~/backup]# pkg info -q png pciids cups-client
png-1.5.14
pciids-20130201
cups-client-1.5.4_1
Well, I just recompile package and should fix this I thought. Thing is
dependencies are not bumped and nothing is changed. One thing caught
my attention:
===> Registering installation for konversation-1.1_5
pkg: duplicate dependency listing: cups-client-1.5.4_1, ignoring
pkg: duplicate dependency listing: pciids-20130201, ignoring
pkg: duplicate dependency listing: png-1.5.14, ignoring
Installing konversation-1.1_5... done
After quick hack session I've created attached patch which seems to fix this
issue for me. After patching pkg and recompiling konversation:
===> Registering installation for konversation-1.1_5
pkg: stale dependency: cups-client-1.5.4, bumping to 1.5.4_1
pkg: stale dependency: pciids-20121208, bumping to 20130201
pkg: stale dependency: png-1.5.13, bumping to 1.5.14
Installing konversation-1.1_5... done
[corn:~/backup]# pkg info -d konversation-1.1_5 | egrep "(png|pciids|cups-client)"
cups-client-1.5.4_1
pciids-20130201
png-1.5.14
This is on my development machine where there is a lot going on, so my question
is - can anyone reproduce this ?
--
pozdrawiam / with regards
Paweł Pękala
[-- Attachment #2 --]
--- ./libpkg/pkg.c.orig 2013-01-28 19:13:23.000000000 +0100
+++ ./libpkg/pkg.c 2013-02-16 18:52:08.000000000 +0100
@@ -584,6 +584,13 @@
while (pkg_deps(pkg, &d) != EPKG_END) {
if (!strcmp(origin, pkg_dep_origin(d))) {
+ if (pkg_version_cmp(version, pkg_dep_version(d)) == 1) {
+ pkg_emit_error("stale dependency: %s-%s, bumping to %s",
+ name, pkg_dep_version(d), version);
+ sbuf_set(&d->version, version);
+ return (EPKG_OK);
+ }
+
pkg_emit_error("duplicate dependency listing: %s-%s, ignoring", name, version);
return (EPKG_OK);
}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130217130534.7bf9fc85>
