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

[Bug]: Preinstalled packages all marked as manually installed #22127

Open
Tracked by #22276
Kobaxidze256 opened this issue Nov 5, 2024 · 3 comments · May be fixed by #22140
Open
Tracked by #22276

[Bug]: Preinstalled packages all marked as manually installed #22127

Kobaxidze256 opened this issue Nov 5, 2024 · 3 comments · May be fixed by #22140
Assignees
Labels
bug report Something is not working properly

Comments

@Kobaxidze256
Copy link

Problem description

Instead of a single meta package combining all preinstalled packages there are a gazillion packages that show up as manually installed.

Steps to reproduce the behavior.

  1. Run Termux for the first time
  2. run pkg list-installed

What is the expected behavior?

pkg list-installed only showing a "base" meta psckage or something concise and manually installed packages.

System information

  • Termux application version: 0.118.1
  • Android OS version: 14
  • Device model: N/A
@Kobaxidze256 Kobaxidze256 added the bug report Something is not working properly label Nov 5, 2024
@sylirre sylirre transferred this issue from termux/termux-app Nov 5, 2024
@ChiefMikeK
Copy link

⁉️ Isn't this a /termux-app/issues build feature request to indicate

  • installed-by-default instead of just installed
  • vice a /termux-packages/issues bug report.

🤔 So @sylirre maybe this issue transfer was an incorrect asumption or not?

@robertkirkman
Copy link
Contributor

robertkirkman commented Nov 6, 2024

@ChiefMikeK from a certain perspective, it appears that this is a "package request for a base package"

As Arch Linux users might be familiar, there is a package named base in Arch Linux that depends on 28 other packages that are considered, in that distro, required for a minimal system to run.

https://gitlab.archlinux.org/archlinux/packaging/packages/base/-/blob/main/PKGBUILD

I believe if you look into the source code of termux-packages (as opposed to termux-app), you can see that there is a directly analogous code structure present in the file generate-bootstraps.sh that installs 30 packages, many of which are built from the same projects as the equivalent counterpart packages in Arch Linux.

pull_package bash # Used by `termux-bootstrap-second-stage.sh`
pull_package bzip2
if ! ${BOOTSTRAP_ANDROID10_COMPATIBLE}; then
pull_package command-not-found
else
pull_package proot
fi
pull_package coreutils
pull_package curl
pull_package dash
pull_package diffutils
pull_package findutils
pull_package gawk
pull_package grep
pull_package gzip
pull_package less
pull_package procps
pull_package psmisc
pull_package sed
pull_package tar
pull_package termux-exec
pull_package termux-keyring
pull_package termux-tools
pull_package util-linux
pull_package xz-utils
# Additional.
pull_package ed
if [ ${TERMUX_PACKAGE_MANAGER} = "apt" ]; then
pull_package debianutils
fi
pull_package dos2unix
pull_package inetutils
pull_package lsof
pull_package nano
pull_package net-tools
pull_package patch
pull_package unzip

I believe it means that this is the appropriate repository to open the issue in, and I think it's kind of an interesting suggestion because it would simplify the readability of the generate-bootstraps.sh significantly, to have all of the base packages in a single metapackage and just adjust it slightly with additional packages inside generate-bootstraps.sh - very comparable to the analogous bootstrap stage of the Arch Linux install guide.

There is another component to this issue besides the mention of a base package though, which is that the pkg list-installed command does not show any of the bootstrap-originated packages with "automatic". One of the ways that could be said to have happened is that termux-packages does not use a "chroot-based" or "debootstrap/debos/mmdebstrap-based" method of handling the bootstrap generation, instead it extracts and tweaks the packages without invoking the dpkg or apt commands at any point during bootstrap generation. It might still be possible to set the package installed status to "automatic" for those packages in a similarly explicit way without having to use apt or dpkg, though.

@sylirre
Copy link
Member

sylirre commented Nov 6, 2024

@ChiefMikeK Everything is correct, i.e. the packaging issue takes place.

Currently Termux lacks the meta package describing all dependencies for base environment. It exists in some major distributions under different names and I remember we already had 1-2 questions about distinguishing base packages from manually installed.

I think it would be worth to add something like termux-bootstrap. It won't complicate things and is better to offload base packages list from scripts anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Something is not working properly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants