Skip to content

Some debian package manager tweaks #16733

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

Merged
merged 3 commits into from
Mar 18, 2020
Merged

Some debian package manager tweaks #16733

merged 3 commits into from
Mar 18, 2020

Conversation

Rajpratik71
Copy link
Contributor

By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages .

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at Ubuntu Blog .

results in smaller image size.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under OpenCV (BSD) License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . 

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .

results in smaller image size.
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . 

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .

results in smaller image size.
By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages . 

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at [Ubuntu Blog](https://ubuntu.com/blog/we-reduced-our-docker-images-by-60-with-no-install-recommends) .

results in smaller image size.
@alalek
Copy link
Member

alalek commented Mar 7, 2020

Did you validate that scripts which use this containers are not broken by this patch?

@Rajpratik71
Copy link
Contributor Author

Did you validate that scripts which use this containers are not broken by this patch?

build is still pending , i think needed some approval .

From my side , this is apt-get package install optimization , this tweak doesn't let install unnecessary packages or recommended packages in simple straight forward way

@alalek
Copy link
Member

alalek commented Mar 7, 2020

install unnecessary packages or recommended packages

But these packages can be used by dependent scripts, so patch should be validated.

Unfortunately, there are no automatic tests on this stuff (it just a sample, no frequent updates are expected). So it requires manual validation on local machines.

@Rajpratik71
Copy link
Contributor Author

By default, Ubuntu or Debian based "apt" or "apt-get" system installs recommended but not suggested packages .

By passing "--no-install-recommends" option, the user lets apt-get know not to consider recommended packages as a dependency to install.

This results in smaller downloads and installation of packages .

Refer to blog at Ubuntu Blog .

results in smaller image size.

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under OpenCV (BSD) License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

As i mentioned and refered to the blog also . In general any apt package installation consist there a list of their main dependencies beside that there are some suggested packages , which "--no-install-recommends" prevent them from installing

@asmorkalov
Copy link
Contributor

@alalek It looks like the change does not introduce regressions.
Command: ./build_plugins.sh ./tmp/
Output:

libopencv_videoio_ffmpeg_shared_2.8.15.so
libopencv_videoio_ffmpeg_shared_4.1.so 
libopencv_videoio_ffmpeg_static_3.4.5.so
libopencv_videoio_ffmpeg_ubuntu_16.04.so
libopencv_videoio_gstreamer.so
libopencv_videoio_ffmpeg_shared_3.4.5.so
libopencv_videoio_ffmpeg_static_2.8.15.so
libopencv_videoio_ffmpeg_static_4.1.so
libopencv_videoio_ffmpeg_ubuntu_18.04.so

@asmorkalov
Copy link
Contributor

👍

@alalek alalek merged commit 2160f9b into opencv:master Mar 18, 2020
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull request Mar 30, 2023
Some debian package manager tweaks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants