downstreaming this into debian?

Asked by anarcat on 2016-10-10

how ubuntu-specific is this project?

it seems to me it would be good for both Ubuntu and Debian if this project was made more distribution neutral and could be usable in Debian. i have done one upgrade after the other, and it has always been time consuming for no good reason: it seems that everyone writes their own little scripts and recipes to automate parts of this work.

this is the first project I see that tries to fix the problem of major upgrades head on, and I like it. i think it should be merged back into debian, and i would like to make it happen.

let me know how that would work.

Question information

anarcat (anarcat) said : #1

first hurdle is actually building that code. https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/1632072 makes it really hard for no apparent reason - i assume Ubuntu people never see this because it's been around for a while and always installed...

the other issue is missing dependencies in Debian. so far i have tried removing ubuntu-drivers-common from ubuntu-release-upgrader build-deps. the apt-clone dependency version is also too high in both source packages, 0.2.2 seems enough.

anarcat (anarcat) said : #2

a rather naive patch, necessary because python-launchpadlib is missing from debian jessie:

diff --git a/UpdateManager/Core/MyCache.py b/UpdateManager/Core/MyCache.py
index 6edfb2e..7e24603 100644
--- a/UpdateManager/Core/MyCache.py
+++ b/UpdateManager/Core/MyCache.py
@@ -43,7 +43,10 @@
 import re
 import DistUpgrade.DistUpgradeCache
 from gettext import gettext as _
-from launchpadlib.launchpad import Launchpad
+try:
+ from launchpadlib.launchpad import Launchpad
+except ImportError:
+ pass

 SYNAPTIC_PINFILE = "/var/lib/synaptic/preferences"
 CHANGELOGS_POOL = "http://changelogs.ubuntu.com/changelogs/pool/"

anarcat (anarcat) said : #3

with all of this, i could install the packages, but obviously, nothing is working:

[1157]anarcat@angela:src1$ sudo update-manager-text
Lecture des listes de paquets… Terminé
Construction de l'arbre des dépendances
Lecture des informations d'état… Terminé
Construction des structures de données… Terminé
Construction de la liste des mises à jour
Traceback (most recent call last):
  File "/usr/bin/update-manager-text", line 70, in <module>
    app = UpdateManagerText(data_dir)
  File "/usr/lib/python3/dist-packages/UpdateManagerText/UpdateManagerText.py", line 55, in __init__
    self.fillstore()
  File "/usr/lib/python3/dist-packages/UpdateManagerText/UpdateManagerText.py", line 90, in fillstore
    self.list.pkgs, key=operator.attrgetter("importance"),
AttributeError: 'UpdateList' object has no attribute 'pkgs'

probably a problem with the python-apt interface...

$ sudo do-release-upgrade
Recherche d'une nouvelle version d'Ubuntu
Aucune nouvelle version trouvée

that's actually true: i'm running the latest debian stable (jessie), but i suspect it's not really doing what i think it should be doing. :) indeed, this is looking at Ubuntu-specific "meta-release" files:

$ DEBUG_UPDATE_MANAGER=yes do-release-upgrade
Recherche d'une nouvelle version d'Ubuntu
MetaRelease.__init__() useDevel=False useProposed=False
/etc/update-manager/meta-release: http://changelogs.ubuntu.com/meta-release
/etc/update-manager/meta-release: http://changelogs.ubuntu.com/meta-release-lts
/etc/update-manager/meta-release: -development
/etc/update-manager/meta-release: -proposed
metarelease-uri: http://changelogs.ubuntu.com/meta-release
MetaRelease.download()
reading file '/home/anarcat/.cache/update-manager-core/meta-release'
have self.metarelease_information
MetaRelease.parse()
current dist name: 'jessie'
found distro name: 'warty'
found distro name: 'hoary'
found distro name: 'breezy'
found distro name: 'dapper'
found distro name: 'edgy'
found distro name: 'feisty'
found distro name: 'gutsy'
found distro name: 'hardy'
found distro name: 'intrepid'
found distro name: 'jaunty'
found distro name: 'karmic'
found distro name: 'lucid'
found distro name: 'maverick'
found distro name: 'natty'
found distro name: 'oneiric'
found distro name: 'precise'
found distro name: 'quantal'
found distro name: 'raring'
found distro name: 'saucy'
found distro name: 'trusty'
found distro name: 'utopic'
found distro name: 'vivid'
found distro name: 'wily'
found distro name: 'xenial'
current dist not found in meta-release file

Aucune nouvelle version trouvée

obviously, something needs to come up that will make that work in debian. that, or it should be possible to hardcode a specific release to upgrade to manually.

anarcat (anarcat) said : #4

i am rather surprised to see that the DistUpgrade library is shipped separately from the regular APT mechanisms. it also seems mandatory in the new do-release-upgrade script, which is unfortunate... it seems to me there would be room for a stable DistUpgrade library that would be shipped with every release normally, and maintained as usual.. hooks and other things could accomplish the deltas needed to settle any quirks.

anyways, i'm done looking at this for the day, but hopefully a future project will enable me to clean that up and merge this into debian eventually.

anarcat (anarcat) said : #5

i have opened this discussion on debian's side of things as well: https://wiki.debian.org/AutomatedUpgrade

Can you help with this problem?

Provide an answer of your own, or ask anarcat for more information if necessary.

To post a message you must log in.