understanding the hold command in apt

Kernels & Hardware, configuring network, installing services

understanding the hold command in apt

Postby milomak » 2020-08-14 00:37

i am failing to understand why the hold command is failing in this instance

this package has no pinning
Code: Select all
mac sources.list.d # aptitude hold firmware-amd-graphics
mac sources.list.d # apt-cache policy firmware-amd-graphics
firmware-amd-graphics:
  Installed: 20190114-2
  Candidate: 20200619-1
  Version table:
     20200619-1 900
        500 http://debian.mirror.ac.za/debian testing/non-free amd64 Packages
        500 http://debian.mirror.ac.za/debian testing/non-free i386 Packages
        900 http://debian.mirror.ac.za/debian sid/non-free amd64 Packages
        900 http://debian.mirror.ac.za/debian sid/non-free i386 Packages
        500 http://ftp.is.co.za/debian testing/non-free amd64 Packages
        500 http://ftp.is.co.za/debian testing/non-free i386 Packages
        900 http://ftp.is.co.za/debian sid/non-free amd64 Packages
        900 http://ftp.is.co.za/debian sid/non-free i386 Packages
        500 http://debian.saix.net testing/non-free amd64 Packages
        500 http://debian.saix.net testing/non-free i386 Packages
        900 http://debian.saix.net sid/non-free amd64 Packages
        900 http://debian.saix.net sid/non-free i386 Packages
        900 http://ftp.uk.debian.org/debian sid/non-free amd64 Packages
        900 http://ftp.uk.debian.org/debian sid/non-free i386 Packages
        500 http://debian.inf.tu-dresden.de/debian testing/non-free amd64 Packages
        500 http://debian.inf.tu-dresden.de/debian testing/non-free i386 Packages
        900 http://debian.inf.tu-dresden.de/debian sid/non-free amd64 Packages
        900 http://debian.inf.tu-dresden.de/debian sid/non-free i386 Packages
 *** 20190114-2 500
        500 http://debian.mirror.ac.za/debian stable/non-free amd64 Packages
        500 http://debian.mirror.ac.za/debian stable/non-free i386 Packages
        500 http://ftp.is.co.za/debian stable/non-free amd64 Packages
        500 http://ftp.is.co.za/debian stable/non-free i386 Packages
        500 http://debian.saix.net stable/non-free amd64 Packages
        500 http://debian.saix.net stable/non-free i386 Packages
        500 http://debian.inf.tu-dresden.de/debian stable/non-free amd64 Packages
        500 http://debian.inf.tu-dresden.de/debian stable/non-free i386 Packages
        100 /var/lib/dpkg/status


i must say at this point it seems here may be a fundamental misunderstanding of how i understand the hold function. i would counter that if that were true, i have been lucking it it for close on 15 years.

but i really don't see a reason why apt should not be respecting the hold. looking through here suggests it should

and then if that is true, then surely the below should hold true
Code: Select all
mac sources.list.d # apt-mark hold firmware-amd-graphics                                                                                       
firmware-amd-graphics was already set on hold.
mac sources.list.d # aptitude why firmware-amd-graphics
ih  firmware-linux-nonfree Depends firmware-amd-graphics (= 20190114-2)
mac sources.list.d # aptitude wh^Cirmware-amd-graphics
mac sources.list.d # aptitude why firmware-amd-graphics
ih  firmware-linux-nonfree Depends firmware-amd-graphics (= 20190114-2)
mac sources.list.d # aptitude why firmware-linux-nonfree
ih  firmware-linux Depends firmware-linux-nonfree (= 20190114-2)
mac sources.list.d # aptitude why firmware-linux
i   xserver-xorg-video-ati  Suggests xserver-xorg-video-r128
p   xserver-xorg-video-r128 Suggests firmware-linux         
mac sources.list.d # apt-mark hold firmware-linux
firmware-linux was already set on hold.


what is the simple thing i have missed?

this on the back of using plasma for the first time in a long time. it shows there are packages to be update. and i picked up that aptitude and apt are not in line in terms of packages to be upgraded. because there is an icon on the desktop that shows packages to be upgraded.

the firmware files not there

https://i.imgur.com/7twgTcj.png

https://i.imgur.com/Hwgnj6b.png
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Sid (External SSD)
Laptop: Lenovo ideapad Y700-15ISK [nVidia Optimus] (64-bit) - Sid, Win10, Solus
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
milomak
 
Posts: 2046
Joined: 2009-06-09 22:20

Re: understanding the hold command in apt

Postby cuckooflew » 2020-08-14 02:11

Yes, well I am sure you actually read some of the results in the link you showed, but "google" is not the only search engine, and you did miss something,..
This: https://manpages.debian.org/stretch/apt/apt-mark.8.en.html
and actually you don't really need google for that, the same manual is in your Debian system, see 'man man' for details.
Any way, here is a example:
Code: Select all
# apt-mark hold joe
joe set on hold.
 

(joe is a editor, I use, it is one of the few packages I have on my system, the point being "joe" would be what ever the package name is, for the one you want to hold.)
NEXT: let's see what we have that is held....
Code: Select all
# apt-mark showhold
joe

On my system, this is the only time I have done this, so there is only the one package held : joe .
The screen shots don't make sense to me, I don't understand how the would show any command or how you ran the command, and that is what would be needed. But any way, there you go, it is all there in the manual, and very straight forward. :
man apt-mark

SYNOPSIS

apt-mark {-f=filename | {auto | manual} pkg... | {showauto | showmanual} [pkg...] } | {-v | --version} | {-h | --help}

apt-mark {hold | unhold | install | remove | purge} pkg... | {showhold | showinstall | showremove | showpurge} [pkg...]
DESCRIPTION
apt-mark can be used as a unified front-end to set various settings for a package, such as marking a package as being automatically/manually installed or changing dpkg selections such as hold, install, deinstall and purge which are respected e.g. by apt-get dselect-upgrade or aptitude. ----snip---

PREVENT CHANGES FOR A PACKAGE
hold
hold is used to mark a package as held back, which will prevent the package from being automatically installed, upgraded or removed.

unhold
unhold is used to cancel a previously set hold on a package to allow all actions again.

showhold
showhold is used to print a list of packages on hold in the same way as for the other show commands.
----snip---

Image
==========================================
To see what packages were upgrade, check your
Code: Select all
/var/log/dpkg.log

There is more details, and commands shown here:
https://www.cyberciti.biz/faq/debian-ubuntu-linux-find-package-installed-updated-date/
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: understanding the hold command in apt

Postby dilberts_left_nut » 2020-08-14 06:18

What makes you think apt is not "respecting the hold"?
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 5071
Joined: 2009-10-05 07:54
Location: enzed

Re: understanding the hold command in apt

Postby milomak » 2020-08-15 18:04

dilberts_left_nut wrote:What makes you think apt is not "respecting the hold"?

i thought i had included that.
Code: Select all
mac ~ # apt-mark hold firmware-amd-graphics
firmware-amd-graphics was already set on hold.

Code: Select all
mac ~ # apt upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  budgie-core cheese dh-python eog evince evince-common [b]firmware-amd-graphics[/b] firmware-linux firmware-linux-nonfree firmware-misc-nonfree
  gir1.2-gnomedesktop-3.0 gir1.2-totem-1.0 gnome-control-center gnome-control-center-data gnome-desktop3-data gnome-font-viewer gnome-screensaver
  gnome-session-bin gnome-session-common gnome-settings-daemon gnome-settings-daemon-common grub-common grub-efi grub-efi-amd64 grub-efi-amd64-bin
  grub2-common libevdocument3-4 libevview3-3 libpython-all-dev libpython2-dev libpython2-stdlib libtotem0 netcat-traditional python-all
  python-all-dev python-pip-whl python2 python2-dev python2-minimal python3-chardet totem totem-plugins xdg-desktop-portal-gtk
0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.


apt still wants to upgrade the package even though it says it is marked as held

aptitude on the other hand
Code: Select all
# aptitude upgrade
Resolving dependencies...               
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 43 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.


the reason aptitude shows none to be updated is largely, i think, because of
Code: Select all
$ aptitude search ~ahold
ih  firmware-amd-graphics                                             - Binary firmware for AMD/ATI graphics chips                                 
ih  firmware-linux                                                    - Binary firmware for various drivers in the Linux kernel (metapackage)       
ih  firmware-linux-nonfree                                            - Binary firmware for various drivers in the Linux kernel (meta-package)     
ih  firmware-misc-nonfree                                             - Binary firmware for various drivers in the Linux kernel                     
ih  grub-efi-amd64                                                    - GRand Unified Bootloader, version 2 (EFI-AMD64 version)                     
ih  grub2-common                                                      - GRand Unified Bootloader (common files for version 2)                       
ih  netcat-traditional                                                - TCP/IP swiss army knife
Desktop: iMac Late-2015 27" 5K Retina (17,1 - 3.3GHz) - MacOS and Windows 10 (Bootcamp)/ Sid (External SSD)
Laptop: Lenovo ideapad Y700-15ISK [nVidia Optimus] (64-bit) - Sid, Win10, Solus
Kodi Box: AMD Athlon 5150 APU w/Radeon HD 8400 - Sid
milomak
 
Posts: 2046
Joined: 2009-06-09 22:20

Re: understanding the hold command in apt

Postby dilberts_left_nut » 2020-08-15 22:05

Still not seeing it.

milomak wrote:
Code: Select all
mac ~ # apt upgrade
...
The following packages have been kept back:
...
0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.

Code: Select all
# aptitude upgrade
...               
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 43 not upgraded.


What are you expecting?
AdrianTM wrote:There's no hacker in my grandma...
User avatar
dilberts_left_nut
 
Posts: 5071
Joined: 2009-10-05 07:54
Location: enzed

Re: understanding the hold command in apt

Postby cuckooflew » 2020-08-15 23:17

It looks to me like it does say it was not upgrade, it was kept back, ...that means it does respect the "hold",...
Code: Select all
The following packages have been kept back:
  budgie-core cheese dh-python eog evince evince-common firmware-amd-graphics-----snip----

Side note: There is no point in using bbcode when it is inside code boxes, it will not work, and all it will serve to do is clutter the code being shown: EG:
Code: Select all
The following packages have been kept back:
  budgie-core cheese dh-python eog evince evince-common [b]firmware-amd-graphics[/b]
notice , the
Code: Select all
[b] and [/b] 
had no effect.
In a quote, it (the bbcode tag) could be used:
and

Are the other packages listed, also marked hold ? Why are they also held back ?
=======================================
apt still wants to upgrade the package even though it says it is marked as held

Where does it say they will be upgraded ?
Code: Select all
mac ~ # apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
budgie-core cheese dh-python eog evince evince-common firmware-amd-graphics firmware-linux firmware-linux-nonfree firmware-misc-nonfree
gir1.2-gnomedesktop-3.0 gir1.2-totem-1.0 gnome-control-center gnome-control-center-data gnome-desktop3-data gnome-font-viewer gnome-screensaver
gnome-session-bin gnome-session-common gnome-settings-daemon gnome-settings-daemon-common grub-common grub-efi grub-efi-amd64 grub-efi-amd64-bin
grub2-common libevdocument3-4 libevview3-3 libpython-all-dev libpython2-dev libpython2-stdlib libtotem0 netcat-traditional python-all
python-all-dev python-pip-whl python2 python2-dev python2-minimal python3-chardet totem totem-plugins xdg-desktop-portal-gtk
0 upgraded, 0 newly installed, 0 to remove and 43 not upgraded.

Where does it say, they will be or were upgraded ?
Please Read What we expect you have already Done
Search Engines know a lot, and
"If God had wanted computers to work all the time, He wouldn't have invented RESET buttons"
and
Just say NO to help vampires!
cuckooflew
 
Posts: 683
Joined: 2018-05-10 19:34
Location: Some where out west

Re: understanding the hold command in apt

Postby emariz » 2020-08-17 20:44

dilberts_left_nut wrote:Still not seeing it.

What are you expecting?

milomak, I am with dilberts_left_nut here. I too fail to see the issue. What exactly were you expecting? It may need a more explicit message or warning, but I think that the hold is working as expected.

Now that we are at it, why are you holding 43 packages? More exactly (for the reason may be very specific), are you certain that keeping track of 43 packages on hold is the best solution for your situation?
emariz
 
Posts: 2922
Joined: 2008-10-17 07:59


Return to System configuration

Who is online

Users browsing this forum: No registered users and 20 guests

fashionable