Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Jul 2010 20:02:40 +0200
From:      Dominic Fandrey <kamikaze@bsdforen.de>
To:        Marcin Wisnicki <mwisnicki+freebsd@gmail.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Strange contents on some ftp mirrors
Message-ID:  <4C5070C0.6090004@bsdforen.de>
In-Reply-To: <i2pk2l$dri$4@dough.gmane.org>
References:  <i2na4v$f3c$1@dough.gmane.org>	<4c4fac09.Kkzz6V/G5TxaiQAZ%perryh@pluto.rain.com>	<i2pahu$dri$1@dough.gmane.org> <4C504F25.8050607@bsdforen.de> <i2pk2l$dri$4@dough.gmane.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 28/07/2010 17:58, Marcin Wisnicki wrote:
> On Wed, 28 Jul 2010 17:39:17 +0200, Dominic Fandrey wrote:
> 
>> On 28/07/2010 15:15, Marcin Wisnicki wrote:
>>> On Tue, 27 Jul 2010 21:03:21 -0700, perryh wrote:
>>>
>>>> Marcin Wisnicki <mwisnicki+freebsd@gmail.com> wrote:
>>>>> At this very moment, french package mirror has INDEX newer than in
>>>>> other mirrors:
>>>>>
>>>> ...
>>>>>
>>>>> yet it does not have those packages.
>>>>>
>>>>> How could something like this happen ?
>>>>
>>>> By being examined while a resync was in process: evidently the new
>>>> INDEX file had been transferred but that package file (and likely
>>>> others) were still in transit or perhaps not even started yet.
>>>> Mirroring is not an instantaneous process.
>>>
>>> Yeah that was it, but it is really, really bad. Mirroring must be
>>> atomic (mirror to temporary directory then rename). Otherwise there is
>>> a large window of time every couple of days when upgrading packages
>>> will at best fail or leave you with broken system. I did binary upgrade
>>> with pkg_upgrade yesterday and half of my system was linked against
>>> wrong libintl version :(
>>
>> The next version of pkg_upgrade will check every downloaded package
>> against the master server after completing the download.
>>
> 
> Great, I need this so much. Currently to really upgrade packages I must
> do something like:
> 
>   rm -rf /usr/ports/packages
>   pkg_upgrade -af
> 
> to make sure rebuilt packages are refetched.
> But it's obviously suboptimal.
> 
> I think you could also detect inconsistent mirror by comparing
> modification time of package against mtime of INDEX.
> If pkg is newer than INDEX then it's a sign of incomplete sync.

True, but if the check does not fail it still doesn't mean that
the package is valid. Checking against the master (it will check
size and time) is the safest method, I think

-- 
A: Because it fouls the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail? 



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