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

Document sage-dist-helpers #28721

Closed
jhpalmieri opened this issue Nov 12, 2019 · 16 comments
Closed

Document sage-dist-helpers #28721

jhpalmieri opened this issue Nov 12, 2019 · 16 comments

Comments

@jhpalmieri
Copy link
Member

Document the bash functions sdh_make and friends in the Sage developer's guide. (Currently they are only documented in their source file, build/bin/sage-dist-helpers.)

Component: documentation

Author: John Palmieri

Branch/Commit: 33abf8f

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/28721

@jhpalmieri
Copy link
Member Author

Branch: u/jhpalmieri/sdh-docs

@jhpalmieri
Copy link
Member Author

Commit: bbd044a

@jhpalmieri
Copy link
Member Author

New commits:

bbd044atrac 28721: document the functions in sage-dist-helpers.

@dimpase
Copy link
Member

dimpase commented Nov 12, 2019

comment:3

The pattern sdh_XYZ || sdh_die ... one sees in few places is not necessary, and sdh_XYZ alone suffices, isn't it?

By looking at the code of e.g. sdh_configure
one sees that sdh_die is actually called in sdh_configure, and so chaining them
as above is pointless (the part after || won't be called).

This should be mentioned in the docs.

@embray
Copy link
Contributor

embray commented Nov 12, 2019

comment:4

By the way, there was already a ticket for this task at #24023.

Something I wanted to do for that was to have a way to automatically include the in-line docs in sage-dist-helpers into the Sphinx docs, but I would have needed to write a plugin, and didn't get to do it.

@embray
Copy link
Contributor

embray commented Nov 12, 2019

comment:5

In any case, this is definitely good enough for now, thank you for taking care of it.

@jhpalmieri
Copy link
Member Author

comment:6

Replying to @embray:

By the way, there was already a ticket for this task at #24023.

Oops, sorry.

Something I wanted to do for that was to have a way to automatically include the in-line docs in sage-dist-helpers into the Sphinx docs, but I would have needed to write a plugin, and didn't get to do it.

Maybe we can leave #24023 open for that.

@embray
Copy link
Contributor

embray commented Nov 12, 2019

comment:7

Replying to @jhpalmieri:

Replying to @embray:

By the way, there was already a ticket for this task at #24023.

Oops, sorry.

No problem. Personally I sometimes even prefer opening separate tickets for specific solutions to a problem from the ticket for the problem itself.

Something I wanted to do for that was to have a way to automatically include the in-line docs in sage-dist-helpers into the Sphinx docs, but I would have needed to write a plugin, and didn't get to do it.

Maybe we can leave #24023 open for that.

That makes sense.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 12, 2019

Branch pushed to git repo; I updated commit sha1. New commits:

33abf8ftrac 28721: do not combine sdh_BLAH with sdh_die

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 12, 2019

Changed commit from bbd044a to 33abf8f

@jhpalmieri
Copy link
Member Author

comment:9

Replying to @dimpase:

The pattern sdh_XYZ || sdh_die ... one sees in few places is not necessary, and sdh_XYZ alone suffices, isn't it?

By looking at the code of e.g. sdh_configure
one sees that sdh_die is actually called in sdh_configure, and so chaining them
as above is pointless (the part after || won't be called).

This should be mentioned in the docs.

I added a note about this.

@dimpase
Copy link
Member

dimpase commented Nov 12, 2019

Reviewer: Dima Pasechnik

@dimpase
Copy link
Member

dimpase commented Nov 12, 2019

comment:10

Thanks. Looks good to me; the still missing part is package de-installation, and the related JSON files, but it can be on another ticket.

@dimpase
Copy link
Member

dimpase commented Nov 12, 2019

comment:11

specifically about JSON files, de-installation is handled by build/sage_bootstrap/uninstall.py, and there are good docs there, but I don't know where these JSON files are written.

I have a vague recollection I knew it once, but it's not clear to me now, without digging through the whole command chain and makefiles... :-(

@jhpalmieri
Copy link
Member Author

comment:12

Seems to be written by build/bin/sage-spkg, starting at line 1000:

PKG_NAME_INSTALLED="$SAGE_SPKG_INST/$PKG_NAME"
cat > "$PKG_NAME_INSTALLED" << __EOF__
{
    "package_name": "$PKG_BASE",
    "package_version": "$PKG_VER",
    "install_date": "$(date)",
    "system_uname": "$(uname -a)",
    "sage_version": "$(cat "${SAGE_ROOT}/VERSION.txt")",
    "test_result": "$TEST_SUITE_RESULT",
    "files": [
        $FILE_LIST
    ]
}
__EOF__

The file manifest is constructed at line 899-900:

    # Generate installed file manifest
    FILE_LIST="$(cd "$PREFIX" && find . -type f -o -type l | sed 's|^\./||' | sort)"

@vbraun
Copy link
Member

vbraun commented Nov 16, 2019

Changed branch from u/jhpalmieri/sdh-docs to 33abf8f

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

No branches or pull requests

4 participants