autobuild3
autobuild3 copied to clipboard
Extensions and subtrees
Consider adding abbs to extensions and define a way that extensions work.
To make this work better, consider to add support for package splitting. #8
Guess this will be implemented as a feature in abbs?
@MingcongBai Well, we need a data structure first.
And let's suppose that there is something to handle it, so the ab proc flow would be like this:
PROC_DEF
PROC_PROBE_BUILD
PROC_AFTER_BUILD
# elfstrip notes: now elfstrip puts striped symbols into /usr/lib/debug/(layout),
# and implicitly enables the /usr/lib/debug -> $PKGNAME-debug rule.
# Other rules will also be generated before the pkgsplit proc is called.
CALL PKGSPLIT
PROC_PACK_INSTALL
# PKGSPLIT
SPLIT_DIR_LAYOUT_PREPARE # fake a build stuff, etc.
NOARCHIVE=1 autobuild
SPLIT_DIR_MOVE
Personally I believe package splitting should be one feature of autobuild itself, rather than an enhanced implementation that exists in ABBS. @Icenowy
I'm not expecting to have some enhanced version in abbs.
@Icenowy @MingcongBai Well we need to get a file/data structure for this…
Subpkg Spec
(autogenerated)
Definition
SUBPKGDIR is $SRCDIR/autobuild/subpkgs/$SUBPKGNAME, where all autobuild stuffs/rules should be identical.
When $SUBPKGNAME starts with a -, we make it $PKGNAME$SUBPKGNAME.
Extensions
$SUBPKGDIR/tree- Which files should be included. This is mostly necessary, or we do the following fallback:- Try using the predefined procedures that produces the
--prefixed$SUBPKGNAME. - (Long Term TODO) Try guessing what to extract from regular
$SUBPKGNAMES, likelibxxx->find -name 'libxxx*' - Throw an
abicuerror saying that a missing spec is found and no fallbacks!
- Try using the predefined procedures that produces the
defines- We need a scheme of definingappendoroverwritethe PKGDEP.
TODO misaka-auto-analyze.
Env (export-ed) vars
MAINSRCDIR,MAINPKGDIR: The SRC/PKGDIR of the root package.MAIN$VARNAME: The $VARNAMEof the root package.ABSUB:(( ))bool. If we are building a subpackage.ABNOARCHIVE: This should be turned on automatically with SUBPKGs.
Now drieng is happy since those many exports in params/defaults are finally useful.
Implementation
Variables:
New procs:
Code changes (pseudo):
# 10-defines
for par in `cat params/defaults`; do
declare -n par_="MAIN$par" par__="$par"
par_="$par__"
export "MAIN$par"
done
external:abbs
We already have an issue for this.
Problems
Dependencies
Some MAINPKG depends on SUBPKGS and some have no relations, therefore:
$FLATDEPSin11-depsneeds an extra process to strip away all known SUBPKGS.
Uh-oh, when I was reading https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/gcc, I felt like all our impls suck..