[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Installing old/deprecated packages



riveravaldez writes:

I have this `phwmon.py`[1] which I use with fluxbox to have a couple
of system monitors at hand. It depends on some python2 packages, so
stopped working some time ago.

Any specific reason for preferring `phwmon.py` over a tool like `conky`?

I've just made it work, installing manually (# apt-get install packages.deb)
this packages that I've downloaded from Debian OldStable official archives:

python-psutil
python-is-python2 (this is in fact in Testing)
python-numpy
python-pkg-resources
python-cairo
libffi6
python-gobject-2
python-gtk2

Therefore, my questions:

How safe is this?

IMHO it's pretty OK because that is quite similar to having upgraded from an old system with the legacy packages installed to a new release where they are no longer part of.

Is it better to install them as I did, or adding the corresponding line in
sources.list and pull them from there? Is there any difference?

There are differences: Whenever you install packages, you may not notice that they are only avaliable in old releases because the output of `apt-cache search` and similar tools will include old packages. Also, running a release with stable+oldstable in sources.list is less common than the other case: stable in sources.list and some oldstable packages leftover from upgrades. In case bugs are fixed in the oldstable package, you will get them automatically if you have them in sources.list.

My personal choice would be to install the packages without adding the oldstable repositories as to be reminded that they are obsolete and are likely to stop working in the future.

Be aware that libraries like `python-psutil` may not work with newer kernels. Here (on oldstable with a backported kernel 5.10) the script would not run due to excess fields reported by the kernel for disk statistics:

| $ ./phwmon.py | Traceback (most recent call last):
|   File "./phwmon.py", line 341, in <module>
|     HardwareMonitor()
|   File "./phwmon.py", line 128, in __init__
|     self.initDiskIo()
|   File "./phwmon.py", line 274, in initDiskIo
|     v = psutil.disk_io_counters(perdisk=False)
|   File "/usr/lib/python2.7/dist-packages/psutil/__init__.py", line 2131, in disk_io_counters
|     rawdict = _psplatform.disk_io_counters(**kwargs)
|   File "/usr/lib/python2.7/dist-packages/psutil/_pslinux.py", line 1121, in disk_io_counters
|     for entry in gen:
|   File "/usr/lib/python2.7/dist-packages/psutil/_pslinux.py", line 1094, in read_procfs
|     raise ValueError("not sure how to interpret line %r" % line)
| ValueError: not sure how to interpret line ' 259       0 nvme0n1 42428 17299 3905792 8439 49354 7425 3352623 15456 0 48512 26929 43429 11 476835656 3033 0 0\n'

See also: https://forums.bunsenlabs.org/viewtopic.php?id=967

[...]

[1] https://gitlab.com/o9000/phwmon

Btw. it looks as if `python-is-python2` is not needed for this to run? `phwmon.py` states `python2` explicitly.

HTH
Linux-Fan

öö

PS: If you are interested in my thoughts on status bars, see here:
   https://masysma.lima-city.de/32/i3bar.xhtml

Attachment: pgpp4IGaXvDp7.pgp
Description: PGP signature


Reply to: