FS#16128 - [pkgtools] patch to remove repository limitation

Attached to Project: Community Packages
Opened by tuxce (tuxce) - Thursday, 10 September 2009, 19:06 GMT
Last edited by Gavin Bisesi (Daenyth) - Friday, 11 September 2009, 16:27 GMT
Task Type Feature Request
Category
Status Closed
Assigned To Gavin Bisesi (Daenyth)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

pkgfile checks only officials repositories, but some repos like archlinuxfr (http://repo.archlinux.fr) provide a file list of his packages.

The patch is based on latest git revision 729a714103f9ea31b75301b707d8c4d220861da3
It relies on pacman to get repos and mirrors and user can configure REPOS variable in pkgfile.conf to only enable some repository.

This task depends upon

Closed by  Gavin Bisesi (Daenyth)
Friday, 11 September 2009, 16:27 GMT
Reason for closing:  Implemented
Additional comments about closing:  Thanks!
Comment by tuxce (tuxce) - Thursday, 10 September 2009, 19:25 GMT
I submitted the wrong file, here is the right one.
Comment by Gavin Bisesi (Daenyth) - Thursday, 10 September 2009, 21:41 GMT
Tuxce you are fucking awesome. I've been trying to figure out a good way to do this for ages! Many thanks, This will be in the next release in some form. I'm reading the patch now.
Comment by Gavin Bisesi (Daenyth) - Thursday, 10 September 2009, 21:54 GMT
Just needs some slight tweaks to have better error handling when the repo doesn't have a file list, I'll work on it
Comment by tuxce (tuxce) - Thursday, 10 September 2009, 22:28 GMT
thanks.

for the errors, you can do something like:

if ! wget -q --limit-rate="$RATELIMIT" "$filelist"
then
if wget -q --limit-rate="$RATELIMIT" "${repo}.db.tar.gz"
then
warn "$repo does not provide file list\n"
repo_done=( "${repo_done[@]}" "$repo" )
continue
else
warn "Could not retrieve %s\n" $filelist
continue
fi
fi


Comment by tuxce (tuxce) - Friday, 11 September 2009, 11:02 GMT
"pkgfile -r" doesn't work, I haven't seen the 2 "$action" in lower case.
Comment by Gavin Bisesi (Daenyth) - Friday, 11 September 2009, 16:21 GMT
Woops, nice catch. Thanks.

Loading...