From owner-freebsd-pkg@FreeBSD.ORG Fri Nov 1 17:33:23 2013 Return-Path: Delivered-To: freebsd-pkg@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C465EBB1 for ; Fri, 1 Nov 2013 17:33:23 +0000 (UTC) (envelope-from bengta@P142s.sics.se) Received: from sink.sics.se (sink.sics.se [193.10.64.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3FEE92C5D for ; Fri, 1 Nov 2013 17:33:22 +0000 (UTC) Received: from P142s.sics.se (h139n3-u-d1.ias.bredband.telia.com [90.228.197.139]) by sink.sics.se (8.14.5/8.14.5) with ESMTP id rA1HXK7I016024 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Nov 2013 18:33:21 +0100 (CET) (envelope-from bengta@P142s.sics.se) Received: from P142s.sics.se (localhost [127.0.0.1]) by P142s.sics.se (8.14.7/8.14.7) with ESMTP id rA1HX07k002819; Fri, 1 Nov 2013 18:33:00 +0100 (CET) (envelope-from bengta@P142s.sics.se) Received: (from bengta@localhost) by P142s.sics.se (8.14.7/8.14.7/Submit) id rA1HX0Wi002818; Fri, 1 Nov 2013 18:33:00 +0100 (CET) (envelope-from bengta@P142s.sics.se) From: Bengt Ahlgren To: freebsd-pkg@freebsd.org Subject: pkg repo problem when old stale packages present User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) Date: Fri, 01 Nov 2013 18:33:00 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Nov 2013 17:33:23 -0000 According to the pkg-repo man page: ...only the most recent package for each origin is included in the catalogue. That sounded good, so I happily went along and updated my packages with portmaster -g, and then rebuilt the pkg-repo directly in /usr/ports/packages without removing the old versions of the packages. I did so for a while, at least five times. But this seems to not work properly. As a simple test I put three versions of the portmaster package in a directory and ran pkg repo: [bga@ivy /storage/bga/repotest]$ ls -l All total 160 drwxr-xr-x 2 bga bga 512 Nov 1 17:06 ./ drwxr-xr-x 3 bga bga 512 Nov 1 17:06 ../ -rw-r--r-- 1 bga bga 42688 Nov 1 17:04 portmaster-3.16.txz -rw-r--r-- 1 bga bga 42776 Nov 1 17:04 portmaster-3.17.1.txz -rw-r--r-- 1 bga bga 42768 Nov 1 17:04 portmaster-3.17.txz [bga@ivy /storage/bga/repotest]$ pkg repo . Generating repository catalog in .: |pkg: duplicate package origin: package All/portmaster-3.17.txz is not newer than version 3.17.1 already in repo for origin ports-mgmt/portmaster /pkg: duplicate package origin: package All/portmaster-3.16.txz is not newer than version 3.17.1 already in repo for origin ports-mgmt/portmaster cannot create repository catalogue [bga@ivy /storage/bga/repotest]$ ls -l total 56 drwxr-xr-x 3 bga bga 512 Nov 1 17:06 ./ drwxr-xr-x 7 bga bga 512 Nov 1 17:04 ../ drwxr-xr-x 2 bga bga 512 Nov 1 17:06 All/ -rw-r--r-- 1 bga bga 0 Nov 1 17:06 digests -rw-r--r-- 1 bga bga 6085 Nov 1 17:06 packagesite.yaml -rw-r--r-- 1 bga bga 22528 Nov 1 17:06 repo.sqlite The first two messages are correct - 3.17.1 is the newest, but then it fails with "cannot create repository catalogue". packagesite.yaml has info for all three versions, which does not seem correct, or? Looking into the code a bit, there might be an issue with the return code from pkg_create_repo which might be EPKG_END, if the last package it tried was an old version. exec_repo in pkg/repo.c might need to check for EPKG_END too? Bengt