NetBSD Problem Report #48713

From www@NetBSD.org  Sat Apr  5 15:16:18 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 181E6A5807
	for <gnats-bugs@gnats.NetBSD.org>; Sat,  5 Apr 2014 15:16:18 +0000 (UTC)
Message-Id: <20140405151615.D90DBA5811@mollari.NetBSD.org>
Date: Sat,  5 Apr 2014 15:16:15 +0000 (UTC)
From: vs@nifelheim.info
Reply-To: vs@nifelheim.info
To: gnats-bugs@NetBSD.org
Subject: pkgin update does not update changes in local (file://) repository, while pkgin -f update does
X-Send-Pr-Version: www-1.0

>Number:         48713
>Category:       pkg
>Synopsis:       pkgin update does not update changes in local (file://) repository, while pkgin -f update does
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    jperkin
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 05 15:20:00 +0000 2014
>Closed-Date:    Wed Jun 13 09:55:08 +0000 2018
>Last-Modified:  Wed Jun 13 09:55:08 +0000 2018
>Originator:     Volkmar Seifert
>Release:        NetBSD 6.1
>Organization:
>Environment:
NetBSD panther.home.nifelheim.info 6.1_STABLE NetBSD 6.1_STABLE (PANTHER-1.0) #0: Mon Mar 24 12:07:37 CET 2014  mjoellnir@cheetah:/work/netbsd/v6/work/amd64/panther/obj/work/netbsd/v6/src/sys/arch/amd64/compile/PANTHER amd64
>Description:
Changes to the local repository (like adding a package through pkg_comp build some/package), "pkgin update" does not update its database.
A pkg_summary-file is present and updated in the local repository.
When I run "pkgin -f update" however, all packages (even the newly added) are inserted into pkgin's database.
>How-To-Repeat:
1.) Create a local packages-repository, e.g. like when setting up pkg_comp
2.) add this repo to pkgin's repositories
3.) update pkgin
4.) add a package to repository, e.g. with pkg_comp build some/pkg
5.) run "pkgin update"

The new package won't be there.
>Fix:
As it's already known that pkgin uses the pkg_summary-file's mtime, this somehow doesn't seem to be enough to detect changes.
My suggestion is to switch from a date/time check to creating and checking a checksum, e.g. RMD160 or SHA1 - or maybe both for the paranoid.

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->imil
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Sun, 06 Apr 2014 00:25:53 +0000
Responsible-Changed-Why:
Over to maintainer.


Responsible-Changed-From-To: imil->pkg-manager
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Mon, 02 Apr 2018 09:33:48 +0000
Responsible-Changed-Why:
imil observes


Responsible-Changed-From-To: pkg-manager->jperkin
Responsible-Changed-By: jperkin@NetBSD.org
Responsible-Changed-When: Tue, 03 Apr 2018 14:35:50 +0000
Responsible-Changed-Why:
I'll take this.


State-Changed-From-To: open->closed
State-Changed-By: jperkin@NetBSD.org
State-Changed-When: Wed, 13 Jun 2018 09:55:08 +0000
State-Changed-Why:
There have been a number of fixes to database updates in the most recent
versions of pkgin, which should hopefully avoid any related issues you may
have ran into.  Unfortunately there's no good way to implement checksums for
the pkg_summary file as it needs to be supported by all HTTP servers, however
it should not be necessary.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.43 2018/01/16 07:36:43 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.