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

New package: sbcl-doc-2.1.11 #34730

Merged
merged 1 commit into from
Jan 9, 2022
Merged

Conversation

HiPhish
Copy link
Contributor

@HiPhish HiPhish commented Dec 28, 2021

Add the GNU Info manual for SBCL and its accompanying ASDF manual.

This package has an issue: it will install the manual with the sbcl package as well. This is due to the fact that the do_install function of the sbcl package runs install.sh, which will install the manual if it is available. There does not seem to be a way of suppressing that behaviour.

I tried to define a custom do_build function inside the subpackage, but it appears that it is not being run:

sbcl-doc_package() {
	short_desc+=" - documentation"
	do_build() {
		(cd ./doc/manual; make info)
	}
	pkg_install() {
		vmkdir 'usr/share/info'
		vcopy "doc/manual/*.info*" 'usr/share/info'
	}
}

Testing the changes

  • I tested the changes in this PR: YES

New package

@HiPhish
Copy link
Contributor Author

HiPhish commented Dec 28, 2021

I think I have solved the issue, at least in a hacky way. Everything (including manuals) gets built, but then I move all the Info manual files into a separate directory. That way they won't get picked up by the installer script. In the sbcl-doc subpackage I manually copy the Info files over from the custom directory instead. If anyone has a better idea let me know, but that's the least hacky way I could think of. One downside though: the Info files do not get compressed automatically by XBPS.

Alternatively we could just ship the manual as part of the main package, that would be one like of code in the build function.

@HiPhish HiPhish changed the title (help needed) New package: sbcl-doc-2.1.11 New package: sbcl-doc-2.1.11 Dec 28, 2021
@Chocimier
Copy link
Member

it will install the manual with the sbcl package as well

That's how things are supposed to work. First everything is installed into fake destdir, then files are vmove'd into subpackages. Remaining files form contents of main package.

@Chocimier
Copy link
Member

You need to increase revision, otherwise builders won't build this.

@HiPhish
Copy link
Contributor Author

HiPhish commented Dec 28, 2021

You need to increase revision, otherwise builders won't build this.

Done.

That's how things are supposed to work. First everything is installed into fake destdir, then files are vmove'd into subpackages. Remaining files form contents of main package.

Thank you, that makes things quite a lot easier. So if I understand correctly, things are run in this order: first the main package is built (do_build), then the sub-packages are packaged (pkg_install), then whatever is left is packaged as the main package (do_install)? That's quite confusing.

@Chocimier
Copy link
Member

  1. do_build is run.
  2. do_install is run. This should call make install or equivalent (good defaults provided by xbps-src). As result, files for main package and subpackages should be (temporally) installed into common destdir.
  3. pkg_install of subpackages are run. They move files from common destdir to subpackage's destdir.
  4. Non-configurable do_pkg is run. This compresses files taken apart into subpackage archive, and files not taken apart from common destdir into main package archive.

That means vmove usr/share/info is enough, because do_install already prepared files there.

@HiPhish
Copy link
Contributor Author

HiPhish commented Dec 30, 2021

Got it, now it makes perfect sense and it's much simpler than I would have thought.

@leahneukirchen
Copy link
Member

Let's keep the docs in the main package, they are small enough.

@leahneukirchen
Copy link
Member

also make -C doc/manual info saves the cd call.

@HiPhish HiPhish force-pushed the sbcl-doc branch 2 times, most recently from a9401de to 105949a Compare December 30, 2021 15:45
@HiPhish
Copy link
Contributor Author

HiPhish commented Dec 30, 2021

OK, now the Info documentation is in the main package. Just out of curiosity, why was the documentation not included in the first place?

@HiPhish
Copy link
Contributor Author

HiPhish commented Jan 9, 2022

bump Anything else that needs to be done?

@leahneukirchen leahneukirchen merged commit 547b60b into void-linux:master Jan 9, 2022
@HiPhish HiPhish deleted the sbcl-doc branch January 9, 2022 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants