Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Mar 2013 15:11:04 -0400 (EDT)
From:      Vick Khera <vivek@khera.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   ports/176889: pkg update doesn't fetch updated repo from private copy
Message-ID:  <20130312191104.648B98A010@yertle.kcilink.com>
Resent-Message-ID: <201303121930.r2CJU2ug062099@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         176889
>Category:       ports
>Synopsis:       pkg update doesn't fetch updated repo from private copy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 12 19:30:01 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Vick Khera
>Release:        FreeBSD 9.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD yertle.int.kcilink.com 9.1-RELEASE FreeBSD 9.1-RELEASE #0 r243864: Tue Dec 4 12:09:48 EST 2012 khera@yertle.int.kcilink.com:/usr/obj/u/yertle1/sources/usr9/src/sys/KCI64 amd64


	
>Description:
	

I use tinderbox to make a local package repository with my customizations. On
another system I request pkg to update the repo index, but will only ever do
it if I specify "-f" flag to force it. Otherwise it always says there is no
update needed, even if there is an updated list.

>How-To-Repeat:
	

Set up package server running lighttpd-1.4.32_1. I use this configuration for
the virtual host:

$HTTP["host"] == "pkg.kcilink.com" {
  server.document-root        = "/usr/local/tinderbox/packages/"
}

and in pkg.conf on the clients I set this:

PACKAGESITE         : http://pkg.kcilink.com/9.1-FreeBSD/All



This is the current repo file on that server:

% ls -l /usr/local/tinderbox/packages/9.1-FreeBSD/All/repo.txz
-rw-r--r--  1 root  wheel  146096 Mar 12 14:02 /usr/local/tinderbox/packages/9.1-FreeBSD/All/repo.txz

Now, on the client system using those packages, run update:

[root@sandbox]# pkg -v
1.0.8
[root@sandbox]# ls -l /var/db/pkg/repo.sqlite
-rw-r--r--  1 root  wheel  601088 Mar 12 09:03 /var/db/pkg/repo.sqlite
[root@sandbox]# pkg update
Updating repository catalogue
Repository catalogue is up-to-date, no need to fetch fresh copy
[root@sandbox]# ls -l /var/db/pkg/repo.sqlite
-rw-r--r--  1 root  wheel  601088 Mar 12 09:03 /var/db/pkg/repo.sqlite
[root@sandbox]# pkg update -f
Updating repository catalogue
repo.txz                            100%  143KB 142.7KB/s 142.7KB/s   00:00
[root@sandbox]# ls -l /var/db/pkg/repo.sqlite
-rw-r--r--  1 root  wheel  605184 Mar 12 14:29 /var/db/pkg/repo.sqlite


The only curiosity I see is that the first "pkg update" logs this on the
package server lighttpd.conf file:

192.168.7.23 pkg.kcilink.com - [12/Mar/2013:14:29:03 -0400] "GET /9.1-FreeBSD/All/repo.txz HTTP/1.1" 200 146096 "-" "pkg libfetch/2.0"

and the second update with -f logs this:

192.168.7.23 pkg.kcilink.com - [12/Mar/2013:14:29:16 -0400] "GET /9.1-FreeBSD/All/repo.txz HTTP/1.1" 200 146096 "-" "pkg libfetch/2.0"

Fetching via a snooping proxy, the only difference I see is that the "-f"
request does not send the "If-Modified-Since" header, but in either case
lighttpd sends back the same byte stream and headers in its response.

>Fix:

	


workaround is to always use pkg update -f.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130312191104.648B98A010>