FS#7144 - [patch] enhance makepkg to make multiple packages

Attached to Project: Pacman
Opened by crc32 (crc64) - Sunday, 13 May 2007, 05:04 GMT
Last edited by Dan McGee (toofishes) - Saturday, 17 January 2009, 17:07 GMT
Task Type Feature Request
Category makepkg
Status Closed
Assigned To Aaron Griffin (phrakture)
Dan McGee (toofishes)
Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 3.0.4
Due in Version 3.3.0
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

This patches makepkg so that it can create multiple .pkg files from a single PKGBUILD.

makepkg.patch - patch based on cvs revision 1.72
PKGBUILD - sample PKGBUILD
makepkg - the complete file for anyone who wish to test this
This task depends upon

Closed by  Dan McGee (toofishes)
Saturday, 17 January 2009, 17:07 GMT
Reason for closing:  Implemented
Additional comments about closing:  See commit 3d49d88009341
Comment by crc32 (crc64) - Sunday, 13 May 2007, 06:02 GMT
>makepkg - the complete file for anyone who wish to test this

oops... looks like attached the patch twice.
this is the complete makepkg with the patch applied
   makepkg (29.7 KiB)
Comment by Aaron Griffin (phrakture) - Sunday, 13 May 2007, 07:49 GMT
Hmmm, I like this... it's pretty close to what I was looking for, though the syntax itself seems a little odd. I just don't know how to refine it. Thanks a lot for the patch, i will look into it in the near future.
Comment by crc32 (crc64) - Sunday, 13 May 2007, 08:33 GMT
Your most welcome :)

I would really love to see makepkg support multiple pkgs whether it's in the form of my suggested patch or another.

Perhaps we can discuss more on the syntax? I think I can help.
Comment by Aaron Griffin (phrakture) - Monday, 14 May 2007, 16:15 GMT
Added Dan.

As for the syntax, I can't say I can think of anything better. However, let me throw this one out there for consideration: if all the (4 or 5) ndiswrapper modules could be built in one package, that'd be great.

See the attached file (how I'd redo the same PKGBUILD).

I was thinking that some sort of separate "build_foo" might be nice for given sub packages, but that would require either additional extraction of the source, or cleanup after each build
Comment by crc32 (crc64) - Monday, 14 May 2007, 18:17 GMT
Hmmm... yes I agree. A separate "build_foo" coupled with source re-extraction would be the way to go.

I'm wondering though about patches that are in the form of tar.gz. How would makepkg selectively apply tar.gz patches only for pkg that require them?

Btw, in my sample PKGBUILD, I've ordered it such that ndiswrapper-utils precedes ndiswrapper. This is so that the "makepkg -i" command works. Otherwise pacman will complain about unresolved deps. I guess we could enhance makepkg to sort the pkgs in the order that pacman expects.

The bigger question though is that for the ndisPKGBUILD sample, what would be the correct behavior during "makepg -i"? Perhaps makepkg should not install any pkgs that have a corresponding "build_foo"?

Thoughts?

Comment by Aaron Griffin (phrakture) - Monday, 14 May 2007, 18:25 GMT
Ah, that one is more complicated - I didn't actually notice that. I was thinking in terms of "the package is ndiswrapper, regardless of how we split it" so Imoved that to the top.

As for -i behavior, I would assume it would check the subpackages for deps first, and use them if found.
Comment by crc32 (crc64) - Monday, 14 May 2007, 18:30 GMT
> # default pkgname_foo to "${pkgname}-foo"

Oh btw, nice touch. I like it. +1 from me.
Comment by crc32 (crc64) - Monday, 14 May 2007, 18:41 GMT
> The bigger question though is that for the ndisPKGBUILD sample, what would be the correct behavior during "makepg -i"?
> Perhaps makepkg should not install any pkgs that have a corresponding "build_foo"?

Ummm... I guess my question really is about what happens when the sub-packages provides the same module.
Silly me for incorrectly assuming that "ndiswrapper-ck" and "ndiswrapper-suspend2" provides "ndiswrapper".
Comment by crc32 (crc64) - Wednesday, 16 May 2007, 09:53 GMT
Here's a proposal for the "build_foo" usecase.
See attached PKGBUILD that builds kernel26 and kernel26suspend2.

Is this useful for package maintainers?
Or is the syntax so convoluted that maintainers would prefer to maintain separate PKGBUILDs?

   PKGBUILD (10.6 KiB)
Comment by Roman Kyrylych (Romashka) - Thursday, 17 May 2007, 11:37 GMT
If this will be merged - I think Alessio's patch ( http://archlinux.org/pipermail/pacman-dev/2007-April/008171.html ) can be integrated into this one.
Comment by crc32 (crc64) - Tuesday, 22 May 2007, 22:20 GMT
> Btw, in my sample PKGBUILD, I've ordered it such that ndiswrapper-utils precedes ndiswrapper.
> This is so that the "makepkg -i" command works. Otherwise pacman will complain about unresolved deps.

Hmmm... I can't seem to duplicate this problem anymore. Strange.
Pacman installs the packages correctly even if I place ndiswrapper before utils.

So I guess my original patch can be considered complete.
Comment by Johannes Schriewer (dunkelstern) - Sunday, 09 September 2007, 18:54 GMT

Loading...