Date: Tue, 15 Jul 2008 10:41:29 +0200 (CEST) From: Dan Lukes <dan@obluda.cz> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/125627: [ PATCH ] ports-mgmt/portupgrade: don't change +CONTENTS mtime when file not changed Message-ID: <200807150841.m6F8fTXu097323@kulesh.obluda.cz> Resent-Message-ID: <200807150850.m6F8o3QV067087@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 125627 >Category: ports >Synopsis: [ PATCH ] ports-mgmt/portupgrade: don't change +CONTENTS mtime when file not changed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Jul 15 08:50:02 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Dan Lukes >Release: FreeBSD 6.3-STABLE i386 >Organization: Obludarium >Environment: portupgrade-2.4.3.2,2 >Description: The portupgrade during update of the port touch all the /var/db/pkg/*/+CONTENTS files despite they are really modified or not. It make hard to track which ports changes and needs to be repackaged (via pkg_create -b) to reflect latest changes. The portupgrade try to track changes and rebuild packages by self, but if portupgrade ends prematurely for a reason, then some packages may not be repackaged. There are no easy way to found them and make package later. The simple script may be used to repair it - for example ... ------------------- for i in /var/db/pkg/* ; do i=$( basename "$i" ) [ -f "/var/db/pkg/$i/+CONTENTS" ] || continue if [ ! -r "/usr/ports/packages/All/$i.tbz" -o "/var/db/pkg/$i/+CONTENTS" -nt "/usr/ports/packages/All/$i.tbz" ] ; then pkg_create -v -b "$i" "/usr/ports/packages/All/$i.tbz" fi done ------------------ ... but it depend on the fact that +CONTENTS file doesn't become "new" when not changed. With +CONTENTS's times changing every portupgrade's run it is very hard to find which packages are obsolete according current system state and need to be repackaged. >How-To-Repeat: N/A >Fix: Simple - ask 'install' not to change 'times' when content not changed. The option -C is dedicated for such request: --- lib/pkgtools.rb.ORIG 2008-07-14 22:02:30.000000000 +0200 +++ lib/pkgtools.rb 2008-07-14 22:03:47.000000000 +0200 @@ -565,6 +565,7 @@ def install_data(src, dst, backup = false) cmd = ['/usr/bin/install'] cmd.push('-b') if backup + cmd.push('-C') cmd.push('-m', '644', src, dst) begin >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200807150841.m6F8fTXu097323>