You are not logged in.

#1 2013-02-16 13:45:15

omid
Member
Registered: 2012-09-17
Posts: 7

XferCommand with prozilla, how to make it smarter

Hi. I use this XferCommand in my pacman.conf:

XferCommand =/usr/bin/printf 'Downloading ' && echo %u && /usr/bin/proz  -k=16  -r --no-curses --no-netrc  --no-getch  %u

It is supper fast, but it is unable to understand that, for example, "Core is up to date" or "Community is up to date". In fact, even if I run "pacman -Sy" consequently, every time it actually look into the mirror and download the "sig" and "db" files. Here is the output of "pacman -Sy":
-----------------------------------------------------------------------------------
:: Synchronizing package databases...
Downloading http://linux.rz.rub.de/archlinux/core/os/x86_64/core.db
Starting.....Creating the thread that gets info about file..
Connecting to linux.rz.rub.de
Sending HTTP request
Successfully got info
File Size = 106 Kb

RESUME supported

Got DL succesfully, now renaming file00:00           
Renaming file core.db .....
All Done.
Downloading http://linux.rz.rub.de/archlinux/core/o … ore.db.sig
Starting.....Creating the thread that gets info about file..
Connecting to linux.rz.rub.de
Sending HTTP request
File not found!
The URL http://linux.rz.rub.de/archlinux/core/o … ore.db.sig doesnt exist!
Downloading http://linux.rz.rub.de/archlinux/extra/ … 4/extra.db
Starting.....Creating the thread that gets info about file..
Connecting to linux.rz.rub.de
Sending HTTP request
Successfully got info
File Size = 1417 Kb

RESUME supported

Got DL succesfully, now renaming fileA 00:00           
Renaming file extra.db .....
All Done.
Downloading http://linux.rz.rub.de/archlinux/extra/ … tra.db.sig
Starting.....Creating the thread that gets info about file..
Connecting to linux.rz.rub.de
Sending HTTP request
File not found!
The URL http://linux.rz.rub.de/archlinux/extra/ … tra.db.sig doesnt exist!
Downloading http://linux.rz.rub.de/archlinux/commun … mmunity.db
Starting.....Creating the thread that gets info about file..
Connecting to linux.rz.rub.de
Sending HTTP request
Successfully got info
File Size = 1910 Kb

RESUME supported

Got DL succesfully, now renaming fileA 00:00           
Renaming file community.db .....
All Done.
Downloading http://linux.rz.rub.de/archlinux/commun … ity.db.sig
Starting.....Creating the thread that gets info about file..
Connecting to linux.rz.rub.de
Sending HTTP request
File not found!
The URL http://linux.rz.rub.de/archlinux/commun … ity.db.sig doesnt exist!
Downloading http://linux.rz.rub.de/archlinux/multil … ultilib.db
Starting.....Creating the thread that gets info about file..
Connecting to linux.rz.rub.de
Sending HTTP request
Successfully got info
File Size = 98 Kb

RESUME supported

Got DL succesfully, now renaming file:00           
Renaming file multilib.db .....
All Done.
Downloading http://linux.rz.rub.de/archlinux/multil … lib.db.sig
Starting.....Creating the thread that gets info about file..
Connecting to linux.rz.rub.de
Sending HTTP request
File not found!
The URL http://linux.rz.rub.de/archlinux/multil … lib.db.sig doesnt exist!
-----------------------------------------------------------------------------------
Is there any modification of this XferCommand so that it understand that

Offline

#2 2013-02-16 15:15:08

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: XferCommand with prozilla, how to make it smarter

pacman uses the Last-Modified header in the response headers compared to the mtime of the DB file to determine when a repo is "up to date". You'll need to find the equivalent flag in prozilla to abort the transfer on this condition if you want similar behavior.

Offline

Board footer

Powered by FluxBB