pi-gen: Choosing the package to install or to skip

Pi-gen has nicely divided the build process into stages so that we can choose which stages to build and which stages to skip. However, within a stage, sometimes there are still packages that we want to include or exclude. For example, I like to use the vim text editor which is not included anywhere. I see that stage2 is where system packages are installed, so I added vim at the end of stage02/01-sys-tweaks/00-packages.

I haven’t used Epiphany browser before, and I think I only need Chromium for my project. So I can save some build time and some disk space by excluding it from my packages. Basically I removed the line with ephibany-browser from stage3/00-install-packages/00-packages-nr.

One thing that intrigued me was the difference between the file names for 00-packages and 00-packages-nr, and in some folders both files are present. So what determines which package should be in which file? I took a look at build.sh and the answer is there:

  • For packages defined in 00-packages, the command to install the packages is apt-get install -y $PACKAGES
  • For packages defined in 00-packages-nr, the command to install the packages is apt-get install --no-install-recommends -y $PACKAGES

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s