[pacman-dev] libmakepkg layout - Was: [PATCH v2 0/4] Splitting up makepkg into libmakepkg

Allan McRae allan at archlinux.org
Sat Sep 7 02:40:46 EDT 2013


On 06/09/13 08:13, ashley at awhetter.co.uk wrote:
> From: Ashley Whetter <ashley at awhetter.co.uk>
> 
> This time around I've split up amekpkg as per Allan's recommendation, and put
> each function into it's own file.
> There's a file at the base of each libmakepkg directory that imports that part
> of the library. (eg libmakepkg/download.sh imports libmakepkg/download/*.sh).
> Instead creating a file that imports every part of the library, I've instead put
> the for loop straight into makepkg.sh.in.
> Each libmakepkg file has it's own inclusion guard.
> Each libmakepkg copyright notice was deduced from the full set, dependent on
> what years git blame said that each line of a function had been written in.
> 
> I feel like the scripts Makefile is getting a bit cluttered.
> Even the number of .sh.in files is getting a bit big. This could be reduced
> by not using LIBRARY in every libmakepkg file and using relative imports instead,
> but this seems like even less of a good idea.
> I'm not really sure if/how we want to get rid of this issue.
> 

OK - definitely too much splitting...

I wanted the download_foo functions to be in individual files are they
are fairly substantial functions.   But thinks like the message
functions that are four lines do not need split.

So lets work on a layout before we go further.   Here is a start:
https://wiki.archlinux.org/index.php/User:Allan/Makepkg_Split

Allan



More information about the pacman-dev mailing list