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

Proposal: use metapackage for jderobot-deps & jderobot-devs #4

Open
varhub opened this issue Oct 30, 2015 · 2 comments
Open

Proposal: use metapackage for jderobot-deps & jderobot-devs #4

varhub opened this issue Oct 30, 2015 · 2 comments
Assignees

Comments

@varhub
Copy link
Contributor

varhub commented Oct 30, 2015

Proposal: use metapackage for jderobot-deps & jderobot-devs

Using described steps at http://jeffhoogland.blogspot.com.es/2011/08/howto-create-debian-meta-package.html, we can generate a metapackage with no code, so it targets to all architectures.
Therefore, make steps are no longer required.

What it implies?

jderobot - Jderobot .deb as always (the only one with code)
jderobot-deps - binary dependencies of Jderobot
jderobot-deps-dev - headers of libraries

Looping the loop

jderobot-dev-tools - for cmake, git, build-essential, pkg-config
jderobot-all - includes all above

How it works

  1. Just create a "fake" hierarchy
    mkdir -p pkg_name/DEBIAN/
  2. Fill it with .deb info (apt-cache show | dpkg --info)
    edit pkg_name/DEBIAN/control
  3. Build (create) package
    dpkg --build pkg_name

Pros and cons

  • It is decoupled to jderobot code
    • (pro) jderobot forget requirements for cpack
    • (cons) metapackage can become deprecated (out-of-sync)
  • No more embedded into cpack
  • Requires explicit command line execution

Remember

Use Architecture: all, so it works for any target ;)

Since these metapackages are fake ones, and gather all required dependencies, push it here could be a good idea. (It's only text, so have it in git will increase commodity and clarity).

@fqez fqez self-assigned this Oct 30, 2015
varhub added a commit to jderobot-varribas/JdeRobot-ThirdParty that referenced this issue Oct 30, 2015
prototype for issue JdeRobot#4
names and naming convections should change
@varhub
Copy link
Contributor Author

varhub commented Oct 31, 2015

Update (dpkg-shlibdeps)

I noticed a little fail in my proposal, CPack does it better, so jderobot-deps begans to be we stupid.

Reason

At now, dpkg-shlibdeps list all required dependencies and format it in a apt-get way (pretty well). But also enforces minimal compatible version.

Doing it externally will let required version incomplete (letting it to apt-get criteria).

Implications

  • CPack must maintain his format, so jderobot must not depend on jderobot-deps unless for cpack restrictions (impossibility to trim dependencies for core only).
  • jderobot-deps is only a copy paste of CPack generated dependencies
  • jderobot-deps-dev currently has not information about minimal required version. Convolve jderobot-deps with jderobot-deps-devs (install both in same call) will solve partially this issue.
  • jderobot-deps-devs should be generated with a script that search -dev based version of dependency listed at jderobot-deps. Therefore, we can transfer version constrain.

Further implications (guess it)

  • What criteria follows CPack to complete version info?
    • If it uses installed version as lower bound, jderobot-deps will make sense, because we can explicitly downgrade version if we want.
  • Is there some way/method to locate package of headers for a package library?
    • What means Source: at dpkg? Can it be used? (update: cannot)

@varhub
Copy link
Contributor Author

varhub commented Oct 31, 2015

Example

If you are in Linux, please, download my branch and run make_packages.sh

git clone https://github.com/varhub/JdeRobot-ThirdParty.git -b package-generator
cd JdeRobot-ThirdParty/metapackages
./make_packages.sh
cd build
dpkg --info jderobot-deps.deb

Finally, test it with:

  1. dpkg -i jderobot-deps.deb jderobot-deps-dev.deb
  2. apt-get install --simulate -f
  3. dpkg -r jderobot-deps jderobot-deps-dev

Dry run test! do not be worried

http://superuser.com/questions/196864/how-to-install-local-deb-packages-with-apt-get

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

2 participants