Making apt package manager work the Puppy way (Puppy Apt)

For discussions about programming, and for programming questions and advice


Moderator: Forum moderators

Post Reply
User avatar
bigpup
Moderator
Posts: 6271
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 732 times
Been thanked: 1292 times

Making apt package manager work the Puppy way (Puppy Apt)

Post by bigpup »

This is a challenge to all you programing members of Puppy forum.

Apt is being put into Puppy versions to be used to install and remove software.

Nothing wrong with it. It has been needed for years.

However several people including me do not like how it goes about removing a package it installed.
It really does not seem to want to ever remove all it did install with a specific package.

It has a config you can use to change settings.

Code: Select all

apt-config

But really someone that does command coding really needs to look at this and see if they can figure out setting changes that would be good to make.

Anyone want to jump in to this?

Code: Select all

apt-config
apt 2.6.1 (amd64)
Usage: apt-config [options] command

apt-config is an interface to the configuration settings used by
all APT tools, mainly intended for debugging and shell scripting.

Most used commands:
  shell - get configuration values via shell evaluation
  dump - show the active configuration setting

See apt-config(8) for more information about the available commands.
Configuration options and syntax is detailed in apt.conf(5).
Information about how to configure sources can be found in sources.list(5).
Package and version choices can be expressed via apt_preferences(5).
Security details are available in apt-secure(8).
# 

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
fredx181
Posts: 2562
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 274 times
Been thanked: 993 times
Contact:

Re: Making apt package manager work the Puppy way (Puppy Apt)

Post by fredx181 »

apt-config dump and you'll see all the configuration options (or redirect to a file, e.g.: apt-config dump > /root/aptconfdmp)

User avatar
fredx181
Posts: 2562
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 274 times
Been thanked: 993 times
Contact:

Re: Making apt package manager work the Puppy way (Puppy Apt)

Post by fredx181 »

bigpup wrote:

However several people including me do not like how it goes about removing a package it installed.
It really does not seem to want to ever remove all it did install with a specific package.

What @dimkr suggested in the BookwormPup thread works OK for me, in terminal: echo 'APT::AutoRemove::SuggestsImportant "false";' > /etc/apt/apt.conf.d/99nosuggests
When done that, a whole lot more packages can be removed (edit: unneeded dependencies) when doing apt autoremove (I tested with installing and then removing again the package gnome-software)
(but some may not like this, really a matter of preference IMO, can be fine too with some orphaned stuff left behind).

dancytron
Posts: 653
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 422 times
Been thanked: 190 times

Re: Making apt package manager work the Puppy way (Puppy Apt)

Post by dancytron »

Maybe some kind of small yad app to configure to do the autoclean autoremove and some other cleanup like bleachbit but not dangerous.

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Making apt package manager work the Puppy way (Puppy Apt)

Post by trawglodyte »

apt purge <packagename> vs apt remove <packagename> will purge config files associated with the package (not just the package itself) But there are other issues with apt trying to install very anti-Puppy software, which is seemingly unrelated to the package you want, and I don't have a good solution for that, other than to carefully examine all the included packages. You can do apt show <packagename>to get some details about any package listed.

When it shows you the included packages and asks if you want to install, don't be afraid to enter "n" for no and take your time looking through all the included packages, you can apt install <packagename> again after you're sure all the included packages are okay for you. You definitely do not want anything systemd, pam.d or gvfs (GIO) IMO, and there's quite a few apps that try to include them. I think apt keeps a record of packages, but what I have found helpful is just to copy/paste them into a text document and keep them in an AptNotes folder whenever I install something, showing what was installed, the suggested/recommended packages and any additional info I think may be useful later.

Personally, I was tickled that a Puppy had apt because that's in my wheelhouse coming from Debian/Ubuntu, but it can really de-Puppy your Puppy OS if you install the wrong packages, and I've used it as a crutch too much when I should be learning about .pet .sfs @mikewalsh portables, and so forth.

note - I realize it is very offensive to certain members of this forum that I know some things and like to share useful information. But, in this case, I do have significant recent experience with apt, and have used it extensively on several frugal installs of BookwormPup. So, I think this is important, and I'm sorry it offends you that it is coming from me.

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

User avatar
trawglodyte
Posts: 236
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 72 times

Re: Making apt package manager work the Puppy way (Puppy Apt)

Post by trawglodyte »

If anyone doesn't know, this is what I'm talking about. (I'm not in Puppy Linux right now, but that doesn't matter). See how there are additional packages, suggested packages, and recommended packages, then a list of NEW packages to be installed? What I'm suggesting, and there may be a better way. Is copy/paste these into your text editor, and do a bit of homework before choosing "y" to continue. Probably start by selecting "n" for now, and doing apt show <packagename> to get info on any of the included packages you are unsure of. Make sure all the included packages are stuff you want, and not anti-Puppy in some way. Put in your text editor what you wound up installing so you can make sure to uninstall all of them later if you have to, probably with apt purge <packagename> rather than apt remove <packagename>. If something doesn't work properly in your newly installed program, or it's missing a feature, you can go back and look at the suggesteds and recommends and they may have what you need. In this example, I'm not going to install gimp, I use krita. But if I was I would save a file as gimp.txt in my AptNotes folder with suggested, recommended, included, and whatever I wound up installing. If it doesn't work out for you you can try apt purge <all_the_packagenames> you installed.

Code: Select all

mxl@mx1:~
$ sudo apt install gimp
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  gimp-data graphviz libamd2 libann0 libbabl-0.1-0 libcamd2 libccolamd2 libcdt5 libcgraph6
  libcholmod3 libgegl-0.4-0 libgegl-common libgexiv2-2 libgimp2.0 libgts-0.7-5 libgvc6 libgvpr2
  liblab-gamut1 libmetis5 libpathplan4 libumfpack5 libwmf-0.2-7
Suggested packages:
  gimp-help-en | gimp-help gimp-data-extras graphviz-doc libwmf-0.2-7-gtk
Recommended packages:
  fonts-liberation2 libgts-bin
The following NEW packages will be installed:
  gimp gimp-data graphviz libamd2 libann0 libbabl-0.1-0 libcamd2 libccolamd2 libcdt5 libcgraph6
  libcholmod3 libgegl-0.4-0 libgegl-common libgexiv2-2 libgimp2.0 libgts-0.7-5 libgvc6 libgvpr2
  liblab-gamut1 libmetis5 libpathplan4 libumfpack5 libwmf-0.2-7
0 upgraded, 23 newly installed, 0 to remove and 0 not upgraded.
Need to get 25.9 MB of archives.
After this operation, 142 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

Like a monkey trying to fly a space-ship. What's this button do?
Like a 12-yr old trying to wire a house. Gonna get zapped!

User avatar
bigpup
Moderator
Posts: 6271
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 732 times
Been thanked: 1292 times

Re: Making apt package manager work the Puppy way (Puppy Apt)

Post by bigpup »

Keep the ideas coming. :thumbup:

I see some ways to change how you actually run apt.

But, why not make Configure) Apt to work these ways and make that what is going to be in Puppy?

Maybe we need to come up with a apt config, that has these changes, and that apt config, is what is going to be used in Puppy, to control Apt?

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

User avatar
bigpup
Moderator
Posts: 6271
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 732 times
Been thanked: 1292 times

Re: Making apt package manager work the Puppy way (Puppy Apt)

Post by bigpup »

In BookwormPup64 topic found this information.
So seems apt has been changed some for how it works in Puppy.

dimkr wrote: Sun May 14, 2023 2:48 pm
radky wrote: Sun May 14, 2023 2:43 pm

As currently implemented in Woof-CE builds that support the APT Package Manager (dpup/jammy), the 'apt upgrade' option is intentionally disabled to prevent overwriting of applications that are created as unique petbuilds specifically for Puppy Linux. In this scenario, upgrading support files from Debian repositories could overwrite and break these unique Puppy applications.

Correct. apt upgrade will only update user-installed packages. Updates for preinstalled packages are (intentionally) disabled using apt-mark hold to avoid updates from polluting your save file/folder and/or slowing down the system, and to prevent updates from undoing Puppy-specific customization done to the Debian packages at Puppy build time.

(This is the place in woof-CE where this apt-mark hold happens)

You can use apt-mark unhold to allow updates to a package, but this is risky. Updating your entire Puppy to a new build is a much safer way to update all core system packages.

(Debian 12 is currently frozen and the only changes are important bug fixes. If you don't see any available updates or see updates today but don't see more updates tomorrow, this is probably why. Generally, the Debian stable release receives few updates, just stability and security fixes, and Debian 12 will receive even fewer updates after the release.)

Forum Global Moderator
The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

Post Reply

Return to “Programming”