Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 21794 - add timestamp.chk check to portage when sync
Summary: add timestamp.chk check to portage when sync
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Unclassified (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks: 15990
  Show dependency tree
 
Reported: 2003-05-27 17:48 UTC by Martin Holzer (RETIRED)
Modified: 2011-10-30 22:19 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
implemented this feature (bugs.21794.patch,3.18 KB, patch)
2003-08-06 23:20 UTC, Masatomo Nakano (RETIRED)
Details | Diff
patch for emerge (bugs.21794.patch,2.60 KB, patch)
2003-10-19 09:04 UTC, Masatomo Nakano (RETIRED)
Details | Diff
patch against emerge (bugs.21794.patch,3.98 KB, patch)
2003-11-11 18:24 UTC, Masatomo Nakano (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Holzer (RETIRED) gentoo-dev 2003-05-27 17:48:27 UTC
to prevent from syncing with older rsync mirrors, repoman should check 
timestamp.chk on sync/rsync and switch to an other mirror or stop if 
timestamp.chk is older than local stored timestamp.chk.
if there's no local timestamp.chk, sync should be normal (initial sync)

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-02 20:38:11 UTC
hi

s/repoman/emerge/ ?
Comment 2 Corey Shields 2003-08-02 20:58:26 UTC
One caution with this.  The system would have to be in sync with world time in order for this to work.  Some systems have clocks that drift pretty badly (linux running on IBM intelliservers comes to mind), so if a system like that is not using ntpd or some method of keeping it's clock synced, before long every mirror would appear to be bad even though they are in the right.

That beind said, I think that something along the lines of checking the timestamp is a good idea.

Cheers!
Comment 3 Jason A. Mobarak (RETIRED) gentoo-dev 2003-08-02 21:23:29 UTC
Maybe the idea of timestamps should be thrown out as per the caution previously posted, a better solution would be portage tree "versions", some kind of continually increasing number to describe the relative age of a portage tree would be better, as that would have no reliance on the system clock, but rather the rsync mirror lasted sync-ed to.

I.e. you initial sync, you get a portage tree version number 13203, next sync your machine finds a mirror that has a portage tree version 13002, so it says, "this is old we don't want to sync to it", and moves on to the next mirror which happens to have a version number 14000, so it's happy! and it syncs up.
Comment 4 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-02 22:01:33 UTC
I think timestamp.chk is made on master rsync server, which is only one in the world, so we can believe timastamp.chk's date. Is it correct?

If so, we can compare timestamp.chk file without making "versions"
Comment 5 Jason A. Mobarak (RETIRED) gentoo-dev 2003-08-02 22:10:50 UTC
If that is so then a timestamp would be fine. A timestamp would probably be easier to implement too, just have to make sure that the timestamp.chk is gotten from the rsync server which is in turn from the master server (that's probably obvious), that way there is no room for variance.
Comment 6 Masatomo Nakano (RETIRED) gentoo-dev 2003-08-06 23:20:52 UTC
Created attachment 15660 [details, diff]
implemented this feature
Comment 7 Masatomo Nakano (RETIRED) gentoo-dev 2003-10-19 09:04:22 UTC
Created attachment 19478 [details, diff]
patch for emerge

patch for current emerge.
Comment 8 Nicholas Jones (RETIRED) gentoo-dev 2003-11-09 23:18:15 UTC
Make that a 'diff -u'
Comment 9 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-11 18:24:07 UTC
Sorry for uploading wrong patch.
I just remade the patch.
Comment 10 Masatomo Nakano (RETIRED) gentoo-dev 2003-11-11 18:24:45 UTC
Created attachment 20626 [details, diff]
patch against emerge
Comment 11 Nicholas Jones (RETIRED) gentoo-dev 2003-11-11 19:51:51 UTC
added for -r17