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

Always install the main port from source #12

Merged
merged 1 commit into from Jan 8, 2019
Merged

Always install the main port from source #12

merged 1 commit into from Jan 8, 2019

Conversation

l2dy
Copy link
Member

@l2dy l2dy commented Jan 6, 2019

I would patch mpbb instead. We already do some protection to avoid rebuilding existing ports, so there's no need to avoid building from source on the buildbot. We do need to avoid building dependencies from source, but not the main port. – @mojca macports/macports-ports#3353

Any unwanted side effects on the Buildbot?

We already do some protection to avoid rebuilding existing ports, so
there's no need to avoid building from source on the buildbot.
Copy link
Member

@mojca mojca left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks ok.

However, now that I saw macports/mpbot-github@18b6ba2: how do you NOT skip the submitted ports on Travis? On the buildbot we would skip building any ports that can be found on the server. This is not desired on Travis, but I don't see any options to turn this functionality on/off.

And ... we should better address https://trac.macports.org/ticket/55041 some time soon? A trivial force-rebuild of 200 ports took 2 hours just to list the ports on an intel VM (it's not just ppc that's slow).

@l2dy
Copy link
Member Author

l2dy commented Jan 6, 2019

how do you NOT skip the submitted ports on Travis?

func ListSubports(port string) ([]string, error) {
listCmd := exec.Command("mpbb", "list-subports", "--archive-site=", "--archive-site-private=", port)

Setting archive-site and archive-site-private to empty should skip the already built check.

 if [[ -n "${archive_site_public}" || -n "${archive_site_private}" ]]; then
[...]
            if [[ -n "${archive_site}" ]] && curl -fIsL "${archive_site}/${port}/${archive_basename}" > /dev/null; then
                exclude=1
                exclude_reasons+=("it is ${archive_distributable} and has already been built and uploaded to the ${archive_type} server")
            fi

@mojca
Copy link
Member

mojca commented Jan 6, 2019

Oh, sorry, perfect!

Now only the performance issues with port listing :)

@l2dy l2dy merged commit 9dfffb1 into macports:master Jan 8, 2019
@l2dy l2dy deleted the source-only branch January 8, 2019 12:16
@ryandesign
Copy link
Contributor

Any unwanted side effects on the Buildbot?

At first glance, I would say yes, this is unwanted on buildbot. If we get to the point of installing a port that exists on the server, we want to use that archive from the server; we don't want to waste time building it from source.

@mojca
Copy link
Member

mojca commented Jan 8, 2019

But if a package already existis, the buildbot should not even enter this loop, in particular not now that we have the correctly sorted build order? Or am I missing something?

@ryandesign
Copy link
Contributor

If the archive exists on the server, but does not exist on the buildbot worker, then a build will be scheduled. We would want to download and install the existing archive on the worker; we would not want to rebuild from source.

If the archive exists on the buildbot worker, but does not exist on the server, then a build will be scheduled. We would want to upload the existing archive from the worker to the server; we would not want to rebuild from source.

@ryandesign
Copy link
Contributor

If the archive exists on the server, but does not exist on the buildbot worker, then a build will be scheduled.

Well, if the archive exists on the right (public or private) server, then a build will not be scheduled. But if the archive exists on the wrong (public or private) server, then a build will be scheduled so that it can be uploaded to the right server.

@mojca
Copy link
Member

mojca commented Jan 8, 2019

Oh, mea culpa.

But let's fix it in a proper way then rather than simply reverting this commit. I propose that we add support for something like

mpbb install-port [--source] portname

which would tell mpbb whether or not to pass the -s flag when building the port, and the flag would then only be used by Travis.

@ryandesign
Copy link
Contributor

I can't think of any problem with that proposal! 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants