Welcome to the Pacman bug tracker. Please search the current bugs and feature requests before filing a new one! Use advanced search and select "Search in Comments".

* Please select the correct category and version.
* Write a descriptive summary, background info, and provide a reproducible test case whenever possible.

FS#29316 - [makepkg] Cannot download file if cookies is required.

Attached to Project: Pacman
Opened by Vladimir Kravets (EasySly) - Friday, 06 April 2012, 21:42 GMT
Last edited by Allan McRae (Allan) - Friday, 06 April 2012, 22:44 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


makepkg cannot download files if cookies is required. E.g. In the AUR exists packages with such behavior - jdk6, jdk7.
Oracle is restricted direct download of files. To able to download file need to specify cookie for it.

You can see attached patches for makepkg and makepkg.conf which resolved this. Changed jdk6 PKGBUILD is attached also.

Additional info:
* pacman 4.0.2

Steps to reproduce:
Try to install from AUR jdk6 or jre6.

I think that we have such resolutions for this issu:
1. Since this is not common problem we can commit this fix as is if somebody don't have objections =)
2. Implement new functionality which add to user(package/PKGBUILD) control how should download files.

prebuild() {
wget --header "Cookie: ${cookies}" "${source[0]}
source[0]=$(get_filename "${source[0]}")

build() {

prebuild will run before calculating crc of the files and before build of course.

I'm not god =) in the bash so sorry for the ugly script, I'm just want to show the idea of the propose.
This task depends upon

Closed by  Allan McRae (Allan)
Friday, 06 April 2012, 22:44 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#28098 
Comment by Vladimir Kravets (EasySly) - Friday, 06 April 2012, 21:43 GMT
BTW, solution can be environment variable also, or something else similar for this.

Any ideas?
Comment by Pierre Schmitz (Pierre) - Friday, 06 April 2012, 22:02 GMT
Imho we shouldn't add such workarounds just because some admins don't know what they are doing.
Comment by Vladimir Kravets (EasySly) - Saturday, 07 April 2012, 22:02 GMT
Heh, ok. I agree with you but in some cases makepkg should have such ability because not all websites have direct link for download source/packages. Let's inform users about what will be doing. E.g. print license or some information which user need to read.
Comment by Dave Reisner (falconindy) - Saturday, 07 April 2012, 22:10 GMT
If you really need this, you can override the DLAGENT for this one specific PKGBUILD. This is not some universal issue. 99% of source downloads do the sane thing and transport the license explicitly with the source rather than make you accept something via a web form.

Technically, you're circumventing the license acceptance here, which probably isn't kosher.