OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version All
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by Josef Schlehofer - 11.01.2020

FS#2725 - opkg remove does not remove empty folders

Tested: Turris Omnia, mvebu, OpenWrt {18.06,19.07,master}

When you install python3-simplejson on router, it will install following files:

tree /usr/lib/python3.7/site-packages/simplejson*
/usr/lib/python3.7/site-packages/simplejson
├── __init__.pyc
├── _speedups.cpython-37.so
├── compat.pyc
├── decoder.pyc
├── encoder.pyc
├── errors.pyc
├── ordered_dict.pyc
├── raw_json.pyc
├── scanner.pyc
└── tool.pyc
/usr/lib/python3.7/site-packages/simplejson-3.16.0-py3.7.egg-info
├── PKG-INFO
├── SOURCES.txt
├── dependency_links.txt
└── top_level.txt

When you do opkg-remove python3-simplejson, it will not remove folder egg-info, but contents of that folder, it does.

When the folder is present, Python3 detects is as installed.

root@turris:~# python3
Python 3.7.4 (default, Oct 01 2019, 23:50:45) 
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import simplejson
>>> simplejson.loads('{}')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'simplejson' has no attribute 'loads'
>>> 

When you remove the folders manually, which were not removed by opkg then the import of simplejson does not work as it should.

root@turris:~# python3
Python 3.7.4 (default, Oct 01 2019, 23:50:45) 
[GCC 7.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import simplejson
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'simplejson'

Explained here: https://github.com/openwrt/packages/issues/10136

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing