FS#19748 - [makepkg] --allsource and --source now only has soft links for local files

Attached to Project: Pacman
Opened by christopher rogers (godane) - Wednesday, 09 June 2010, 00:05 GMT
Last edited by Allan McRae (Allan) - Wednesday, 09 June 2010, 16:24 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Critical
Priority Normal
Reported Version git
Due in Version 3.4.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Summary and Info:
The new makepkg in pacman git repo only has soft links for local files when making .src.tar.gz. This is only a problem with files with no urls. Like example the config file for kernel26 or the .install files.

Steps to Reproduce:
install new makepkg from pacman git repo
sudo abs
cd /var/abs/core/kernel26
makepkg --allsource --asroot or makepkg --source --asroot
Then extract the .src.tar.gz

This happens in user too.
This task depends upon

Closed by  Allan McRae (Allan)
Wednesday, 09 June 2010, 16:24 GMT
Reason for closing:  Fixed
Additional comments about closing:  git commits ac5c2fd0 and b8863622
Comment by Allan McRae (Allan) - Wednesday, 09 June 2010, 01:47 GMT
Caused by commit 5cddcc901beb3643f80f401fe9b6384081ea96eb (makepkg: refactor absolute filename detection). Looking into it now.
Comment by Dan McGee (toofishes) - Wednesday, 09 June 2010, 01:54 GMT
  • Field changed: Due in Version (Undecided → 3.4.0)
Allan broke it! :P

I'm assuming this blocks the release, so I'm going to mark it as such for now.
Comment by christopher rogers (godane) - Wednesday, 09 June 2010, 01:54 GMT
I have fixed the problem for you guys. Looks like it was cause of dead links. They wore not pointing to the files at all. So added $startdir/$file when it was needed. Also i changed the this below:

eval file='${srclinks}/${pkgbase}/'${file}

to this:

eval file=${file}

It made no since to have done any other way. It would be the soft link pointing to itself.

I added my git format patch. I hope this helps.
Comment by Allan McRae (Allan) - Wednesday, 09 June 2010, 03:33 GMT
Your second change breaks packages that include install and changelog files in their source array.

This is the only change needed:
- ln -s "$file" "$srclinks/$pkgbase"
+ ln -s "$startdir/$file" "$srclinks/$pkgbase"
Comment by Allan McRae (Allan) - Wednesday, 09 June 2010, 03:35 GMT
ah - I see what your second change is fixing. Proper fix on its way.
Comment by Allan McRae (Allan) - Wednesday, 09 June 2010, 03:44 GMT
Patch
Comment by Allan McRae (Allan) - Wednesday, 09 June 2010, 03:46 GMT
The second issue was caused in commit fe1e3471f47d9da3bac4cedce250cd2ce04368b4 (makepkg: remove code duplication in buildscript parsing).

Damn... I should have caught both of these during patch review.
Comment by christopher rogers (godane) - Wednesday, 09 June 2010, 04:45 GMT
@Allan
I think there is a another bug also. I think makepkg only like one .install file. I get this error with gcc:
/usr/bin/makepkg: line 1109: local: `gcc.install': not a valid identifier
/usr/bin/makepkg: line 1109: local: `gcc-fortran.install': not a valid identifier
/usr/bin/makepkg: line 1109: local: `gcc-ada.install': not a valid identifier

i hope this helps.
Comment by Allan McRae (Allan) - Wednesday, 09 June 2010, 05:34 GMT
Here is the fix:
Comment by christopher rogers (godane) - Wednesday, 09 June 2010, 06:08 GMT
Thanks Allan for being so quick. Both patches fix the problem. Thanks again.
Comment by christopher rogers (godane) - Wednesday, 09 June 2010, 07:48 GMT

Loading...