You are not logged in.

#1 2004-10-11 21:32:19

sweiss
Member
Registered: 2004-02-16
Posts: 635

Can't retrieve sources from php pages

I'm trying to build a package in which the only way to retrieve the sources is using a URL as such: http://www.positro.net/trigger/download … rc.tar.bz2

However, when I do a `makepkg -g`, the file is downloaded, but then makepkg reports: ==> ERROR: Failed to download download.php?file=trigger-0.5.0-src.tar.bz2

Is there any way to work around it?

Offline

#2 2004-10-11 22:28:18

rjs
Member
Registered: 2004-04-20
Posts: 23

Re: Can't retrieve sources from php pages

Use this as the download location, it is the actual link for the file, minus the PHP coding.

http://0day.icculus.org/mirrors/trigger/trigger-0.5.0-src.tar.bz2

As far as setting pacman or makepkg to do this with php, I am not sure how to do this, maybe somebody else does.

Offline

#3 2006-08-01 13:13:32

Orific
Member
Registered: 2006-07-30
Posts: 8

Re: Can't retrieve sources from php pages

Sorry to raise the question two years later but there does not seem to be much more ifo about this (neither in the forums nor in the wiki).
So is it possible to bring makepkg to download files whose url is based on php ? I am trying to make a package and the (REALLY) only URL to download the source files are php ones.
Is there a solution ?
Or will the poor user of the PKGBUILD have to download the source manually ?  sad
Thanks.

Edit: I forgot to mention that outside of makepkg the download works and returns no error, using the exact command makepkg is meant to use. And as said by the sweiss, makepkg actually downloads the file, only it then seems to receive an error code.

Offline

#4 2006-08-01 22:16:33

Orific
Member
Registered: 2006-07-30
Posts: 8

Re: Can't retrieve sources from php pages

OK ! Finally (after some hard thinking big_smile ) I had the idea of having a look into the script of makepkg... where I found the answer to my question: after downloading, makepkg checks the name of the resulting file to see if the download was ok. But this check is made against a name which is generated by stripping the URL, which can't work when this latter does not contain the name of the archive. e.g.

http://www.download_site.com/files/archive_name.tar.gz

is ok, but

http://www.download_site.com/files/index.php?file_id=12345

is not.

I think it would not be very hard to modify makepkg to address this problem. Where can I suggest this kind of modifications ?
I am also going to try to do it and post the result if I manage to do something that works (I am not a very good programmer lol ).

Offline

Board footer

Powered by FluxBB