Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build system should track dependencies ordering between packages #26

Open
karawitan opened this issue Jan 1, 2020 · 6 comments
Open
Labels
enhancement New feature or request

Comments

@karawitan
Copy link
Collaborator

@yamsergey I saw somewhere that taskwarrior build failed in the CI.
As a simple fix for now, here is what I would suggest:

  • take advantage of the following feature inside lib.sh:

lib.sh: bootstrap () : skip build of package when packages/$DISTVER.zip is already present and print a Warning (5c58ff9)

taskwarrior/build.sh : put a "../../ports/<required_library>/build.sh".

But here comes a question .. Is there a persistence of the work/ directory accross builds or is it re-created each time ?

If there is persistence of work/ , removing package/<required_library-version>.zip would be enough to fix this issue.

If there is no persistence of work/ .. a mecanism to "unpack" zip from packages/<required_library-version> has to be used/designed.

What do you think :) ?

@yamsergey
Copy link
Collaborator

No, docket container doesn’t have state from previous builds, new one spin up each time. I want to dig inside Termux approach to build.

Tanks for the insight about lib.sh. I will think how can we utilize it during build

@karawitan karawitan changed the title taskwarrior build failure and build dependencies in general build dependencies, vars.sh, taskwarrior build failure Jan 1, 2020
@karawitan
Copy link
Collaborator Author

Oups .. the "skip port if already built" feature is based on "vars.sh" ...

  for dir in $ALLPORTS
  do
    if [ -d "$dir" ] && [ -e "$dir/build.sh" ]; then
      [ -f "$dir/vars.sh" ] && {
        . $dir/vars.sh
        [ -f ../packages/$DISTVER.zip ] && {
          echo "Warning: skipping build of $DISTVER (file packages/$DISTVER.zip already exists) "
          continue;
        }
      }

vars.sh was removed from everywhere a short while ago ...

@vaskas vaskas changed the title build dependencies, vars.sh, taskwarrior build failure Build system should track dependencies ordering between packages Jan 5, 2020
@vaskas vaskas added the enhancement New feature or request label Jan 5, 2020
@vaskas
Copy link
Member

vaskas commented Jan 5, 2020

We are currently tracking dependencies by hand putting libraries in order but this will get messy quickly

@karawitan
Copy link
Collaborator Author

karawitan commented Jan 5, 2020

For gdb (needs gmp), and calcurse (needs gettext) I had to write this little trick, currently only available on my local "bleeding-edge" branch:

lib.sh:

function unpack_required_packages()
{
        I=0
        while [ -z != ${BUILD_DEP[$I]} ];
        do
                pushd $WORKDIR > /dev/null || exit 1
                        unzip /$PKGDIR/${BUILD_DEP[$I]}.zip
                popd > /dev/null
                let I=$(($I+1))
        done
}

function check_required_packages()
{
        I=0
        while [ -z != ${BUILD_DEP[$I]} ];
        do
                F=$PKGDIR/${BUILD_DEP[$I]}.zip
                ls $F || {
                        echo "Fatal: package ${BUILD_DEP[$I]} not found. Required for build"
                        exit 1
                }
                let I=$(($I+1))
        done
}


@vaskas
Copy link
Member

vaskas commented Jan 5, 2020 via email

@karawitan
Copy link
Collaborator Author

yes indeed. But Sergey told me there is no persistence on the build farm :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants