autobuild3 icon indicating copy to clipboard operation
autobuild3 copied to clipboard

Extensions and subtrees

Open Artoria2e5 opened this issue 11 years ago • 6 comments

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

Artoria2e5 avatar Oct 27 '14 02:10 Artoria2e5

Guess this will be implemented as a feature in abbs?

MingcongBai avatar Apr 03 '15 22:04 MingcongBai

@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

Artoria2e5 avatar May 31 '15 15:05 Artoria2e5

Personally I believe package splitting should be one feature of autobuild itself, rather than an enhanced implementation that exists in ABBS. @Icenowy

MingcongBai avatar May 31 '15 23:05 MingcongBai

I'm not expecting to have some enhanced version in abbs.

Artoria2e5 avatar Jun 01 '15 13:06 Artoria2e5

@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, like libxxx -> find -name 'libxxx*'
    • Throw an abicu error saying that a missing spec is found and no fallbacks!
  • defines - We need a scheme of defining append or overwrite the PKGDEP.

TODO misaka-auto-analyze.

Env (export-ed) vars

  • MAINSRCDIR, MAINPKGDIR: The SRC/PKGDIR of the root package.
  • MAIN$VARNAME: The $VARNAME of 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:

  • $FLATDEPS in 11-deps needs an extra process to strip away all known SUBPKGS.

Artoria2e5 avatar Jun 25 '15 11:06 Artoria2e5

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..

Artoria2e5 avatar Sep 18 '15 15:09 Artoria2e5