You are not logged in.
let's say a maniac does
sudo pacman -Syu
every 2 minutes.
now in 2 minutes, nothing is changed..
does pacman asks for the filesize of the db, and if *exactly* the same, does it re-download it or not?
and if does, then why?
Offline
Hmmm.... I believe it DOES redownload the DB, even if it's identical. This is a good point, it would save both the downloader and the server op money, bandwidth, and time, if it checked to make sure it wasn't the same DB. This could be pretty easily done...i think...just put a date file someplace and compare. (hint hint ..who wants to implement it)
The suggestion box only accepts patches.
Offline
or a md5 sum.
And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.
Offline
(hint hint ..who wants to implement it)
Oooh ooh! Pick me!
Offline
or a md5 sum.
Yea, could. But then you have to download the md5 hash to compare. Using the MDTM ftp command, you can do it without downloading anything.
I think, for sanity purposes, it should update if the mtime is different in either direction, ie, even if the server's mtime is earlier. This would save some headbanging if a user switched to a server that wasn't up-to-date yet and ran -Syu.
Offline
Do many people use HTTP repositories?
Offline
kakabaratruskia wrote:or a md5 sum.
Yea, could. But then you have to download the md5 hash to compare. Using the MDTM ftp command, you can do it without downloading anything.
mmm.... good point... didn't know that ftp thing. Anyway, I would apreciate this improvement to pacman.
And where were all the sportsmen who always pulled you though?
They're all resting down in Cornwall
writing up their memoirs for a paper-back edition
of the Boy Scout Manual.
Offline
Do many people use HTTP repositories?
I do. I use antesis (which is a very good european mirror), but I think it did have ftp access too... Don't remember the address for it though...
Offline
ok, it should be implemented. The last week I was worried on all guys by default getting packages from archlinux.org
at least same db should not be downloaded twice, and that can save some bandwitdh I hope.
http://bugs.archlinux.org/index.php?do=details&id=1492
btw, you all know, but md5sum has had a collision detection in august
http://en.wikipedia.org/wiki/Md5sum
Offline
i doubt it is stealling alot of bandwidth. you are not dling much more than 200K worth of data.
AKA uknowme
I am not your friend
Offline
I would implement it the easy way and just check the mtime of the /var/lib/pacman/<DB> dir. If it's less than one hour old or something then ask the user to confirm the update. If the bandwidth saving is worth it it means that the db overhead is too big already.
I use wget for the --limit-rate option. Server is ftp though, but mixing Pacman's build in ftp and an external downloader doesn't seem very clean (what about proxy users? etc).
Offline