You are not logged in.

#1 2004-09-21 00:12:28

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Does pacman re-download even the same db on pacman -Sy?

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

#2 2004-09-21 00:15:38

neotuli
Lazy Developer
From: London, UK
Registered: 2004-07-06
Posts: 1,204
Website

Re: Does pacman re-download even the same db on pacman -Sy?

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

#3 2004-09-21 00:41:23

kakabaratruskia
Member
From: Santiago, Chile
Registered: 2003-08-24
Posts: 596

Re: Does pacman re-download even the same db on pacman -Sy?

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

#4 2004-09-21 01:14:52

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Does pacman re-download even the same db on pacman -Sy?

neotuli wrote:

(hint hint ..who wants to implement it)

Oooh ooh!  Pick me!

Offline

#5 2004-09-21 01:18:03

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Does pacman re-download even the same db on pacman -Sy?

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.

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

#6 2004-09-21 01:25:31

apeiro
Daddy
From: Victoria, BC, Canada
Registered: 2002-08-12
Posts: 771
Website

Re: Does pacman re-download even the same db on pacman -Sy?

Do many people use HTTP repositories?

Offline

#7 2004-09-21 01:45:43

kakabaratruskia
Member
From: Santiago, Chile
Registered: 2003-08-24
Posts: 596

Re: Does pacman re-download even the same db on pacman -Sy?

apeiro wrote:
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

#8 2004-09-21 08:48:31

dpb
Member
From: Cyperspace?
Registered: 2004-04-11
Posts: 231

Re: Does pacman re-download even the same db on pacman -Sy?

apeiro wrote:

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

#9 2004-09-21 09:21:46

zeppelin
Member
From: Athens, Greece
Registered: 2004-03-05
Posts: 807
Website

Re: Does pacman re-download even the same db on pacman -Sy?

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

#10 2004-09-21 15:29:13

sarah31
Member
From: Middle of Canada
Registered: 2002-08-20
Posts: 2,975
Website

Re: Does pacman re-download even the same db on pacman -Sy?

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

#11 2004-09-21 18:48:37

i3839
Member
Registered: 2004-02-04
Posts: 1,185

Re: Does pacman re-download even the same db on pacman -Sy?

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

Board footer

Powered by FluxBB