Skip to content

Commit

Permalink
Rewrite dependencies on removed python packages
Browse files Browse the repository at this point in the history
Using the now removed, obsoleted package name causes the solver to want
to uninstall anything which depends on these, which isn't helpful right
now.

Theoretically, the information to generate these exists in our "retired
old-style obsoleting packages" data, but do it manually for speed right
now.
  • Loading branch information
jon-turney committed Jan 18, 2024
1 parent 9aa9586 commit 78c36ba
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 32 deletions.
2 changes: 1 addition & 1 deletion calm/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def process_package_constraint_list(pcl):
deplist[item] = item + ' ' + r
else:
item = r
deplist[item] = item
deplist[item] = past_mistakes.substitute_dependency.get(r, r)

# return a sorted list of package names with an optional version constraint.
return sorted(deplist.values())
Expand Down
101 changes: 70 additions & 31 deletions calm/past_mistakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,44 +171,83 @@
'python2',
'python2-devel',
'python27',
'python-appindicator',
'python-avahi',
'python-cairo',
'python-chardet',
'python-dbus',
'python-docutils',
'python-fontforge',
'python-gconf',
'python-gi',
'python-gnome2',
'python-gnomevfs2',
'python-gobject',
'python-gtk2.0',
'python-jinja2',
'python-keybinder',
'python-lxml',
'python-marisa',
'python-mx',
'python-numpy',
'python-orbit',
'python-pygments',
'python-pykde4',
'python-pynotify',
'python-pyqt4',
'python-rdflib',
'python-reportlab',
'python-twisted',
'python-vte',
'python-wnck',
'python-xdg',
'python-zeitgeist',
'python27-.*',
# random build-depends
'python2-cython',
'python2-wheel',
'python2-cairo-devel',
'_windows',
r'perl5_\d+',
r'ruby_\d+',
r'tl_\d+',
r'tl_basic_\d+',
]

# provides which don't exist, and were obsoleted by something else which we've
# forgotten about..
substitute_dependency = {
'python-appindicator': 'python27-appindicator',
'python-avahi': 'python27-avahi',
'python-cairo': 'python27-cairo',
'python-chardet': 'python27-chardet',
'python-dbus': 'python27-dbus',
'python-docutils': 'python27-docutils',
'python-fontforge': 'python27-fontforge',
'python-gconf2': 'python27-gconf2',
'python-gi': 'python27-gi',
'python-gnome2': 'python27-gnome2',
'python-gnomevfs2': 'python27-gnomevfs2',
'python-gobject': 'python27-gobject',
'python-gtk2.0': 'python27-gtk2.0',
'python-jinja2': 'python27-jinja2',
'python-keybinder': 'python27-keybinder',
'python-lxml': 'python27-lxml',
'python-marisa': 'python27-marisa',
'python-numpy': 'python27-numpy',
'python-orbit': 'python27-orbit',
'python-pygments': 'python27-pygments',
'python-pykde4': 'python27-pykde4',
'python-pynotify': 'python27-pynotify',
'python-pyqt4': 'python27-pyqt4',
'python-rdflib': 'python27-rdflib',
'python-reportlab': 'python27-reportlab',
'python-twisted': 'python27-twisted',
'python-vte': 'python27-vte',
'python-wnck': 'python27-wnck',
'python-xdg': 'python27-xdg',
'python-zeitgeist': 'python27-zeitgeist',
'python2-avogadro': 'python27-avogadro',
'python2-ayatana_appindicator': 'python27-ayatana_appindicator',
'python2-clang': 'python27-clang',
'python2-dbus': 'python27-dbus',
'python2-fontforge': 'python27-fontforge',
'python2-future': 'python27-future',
'python2-gi': 'python27-gi',
'python2-gobject': 'python27-gobject',
'python2-gv': 'python27-gv',
'python2-imaging': 'python27-imaging',
'python2-ipaddr': 'python27-ipaddr',
'python2-ipython': 'python27-ipython',
'python2-jinja2': 'python27-jinja2',
'python2-libvirt': 'python27-libvirt',
'python2-libxml2': 'python27-libxml2',
'python2-lxml': 'python27-lxml',
'python2-magic': 'python27-magic',
'python2-matemenu': 'python27-matemenu',
'python2-nghttp2': 'python27-nghttp2',
'python2-numpy': 'python27-numpy',
'python2-pykde4': 'python27-pykde4',
'python2-pyqt4': 'python27-pyqt4',
'python2-pyqt5': 'python27-pyqt5',
'python2-requests': 'python27-requests',
'python2-setuptools': 'python27-setuptools',
'python2-six': 'python27-six',
'python2-tkinter': 'python27-tkinter',
'python2-wheel': 'python27-wheel',
'python2-xdg': 'python27-xdg',
'python2-yaml': 'python27-yaml',
}

# provides: which don't exist and packages which require them should be expired
expired_provides = [
'python2',
Expand Down

0 comments on commit 78c36ba

Please sign in to comment.