elementary / os

The OS build system
https://elementary.io
GNU General Public License v3.0
1.01k stars 130 forks source link

Cleanup step in buildscript removes custom package added by package-list #287

Open lfuelling opened 4 years ago

lfuelling commented 4 years ago

Prerequisites

Describe the bug

I added a package I built myself to all the package-list.* files and it is installed successfully according to the build log. At the end of the build, the hooks are executed which (with the --debug flag to lb build) gives the following output:

D: Executing: /root/0010-disable-kexec-tools.hook.chroot
D: Executing: /root/0050-disable-sysvinit-tmpfs.hook.chroot
D: Executing: /root/999-cleanup-apt-cache.chroot
D: Executing: apt-get autoclean

The 999-cleanup-apt-cache.chroot script is the last thing run that I can see in the repo, I wonder what executes the apt-get autoclean because that step removes my package again so the package is not included in the iso.

Is there a way to wither turn this cleanup step off or to prevent the removal of my package? I already tried giving the .deb file the Priority: required property but that doesn't seem to work. I also checked if my package has dependencies that are listed in seeds/blacklist and platform/blacklist but couldn't find any.

To Reproduce

Steps to reproduce the behavior:

  1. Add previously not installed package to all the package-list.* files
  2. Start a build
  3. Make sure the package is installed during the build
  4. Wait for the hooks to run
  5. Package is removed by apt-get autoclean step

Expected behavior

The package should stay installed.

Screenshots or screen recordings

Not applicable, I can provide the full build log on request.

Logs

See above for relevant parts.

Platform Information

Additional context

The package I'm trying to install contains some configuration files and references other packages I want to have installed by default. As stated above, I already checked if I depend on blacklisted packages but couldn't find any.

davidmhewitt commented 4 years ago

autoclean does not uninstall packages, it removes caches used by apt. So, I think your package is probably being removed at a different stage.

lfuelling commented 4 years ago

Thanks for the heads up, so the log entry Del custom-backgrounds 1.1.0 [27.6 MB] means that only the .deb file is removed?

That makes it even more strange because then the package should actually be installed.

When I search for the package name, the only lines I find are where the package is downloaded, unpacked, set up and then the line starting with Del I pasted above.

EDIT: What's even weirder is that it also seems to remove elementaryOS packages. This is what I get when I boot the built .iso and select "Try elementaryOS": Screenshot