I'd suggest going with something like this in Jammy, to make sure
netplan.io, python3-netplan and libnetplan1 are upgraded prior to
network-manager triggering the Netplan integration, calling "netplan
generate".

```diff
diff --git a/debian/control b/debian/control
index a82f4c0c..25651a34 100644
--- a/debian/control
+++ b/debian/control
@@ -10,6 +10,7 @@ Standards-Version: 4.6.2
 Rules-Requires-Root: no
 Build-Depends:
  debhelper-compat (= 13),
+ dh-python,
  pkg-config,
  bash-completion,
  libyaml-dev,
@@ -54,7 +55,8 @@ Depends:
  systemd (>= 248~),
 Suggests: python3-rich
 Conflicts: netplan
-Breaks: nplan (<< 0.34~)
+Breaks: nplan (<< 0.34~),
+  network-manager (>= 1.46~),
 Replaces: nplan (<< 0.34~)
 Provides: nplan
 Description: YAML network configuration abstraction for various backends
@@ -97,12 +99,13 @@ Section: python
 Architecture: linux-any
 Multi-Arch: foreign
 Depends:
+ ${python3:Depends},
  ${shlibs:Depends},
  ${misc:Depends},
  libnetplan0 (= ${binary:Version}),
- python3,
  python3-cffi-backend,
-Breaks: netplan.io (<< 0.107-3~)
+Breaks: netplan.io (<< 0.107-3~),
+ netplan.io (>= 1.0~),
 Replaces: netplan.io (<< 0.107-3~)
 Description: YAML network configuration abstraction Python bindings
  netplan reads YAML network configuration files which are written
diff --git a/debian/rules b/debian/rules
index 059693b2..64736568 100755
--- a/debian/rules
+++ b/debian/rules
@@ -3,7 +3,7 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 %:
-   dh $@ --buildsystem=meson
+   dh $@ --buildsystem=meson --with=python3
 
 override_dh_auto_clean:
    dh_auto_clean
```

Here's a full apt upgrade log for a Ubuntu Jammy Desktop system (VM) to
Noble, using this patch:

https://dpaste.org/P6OgS

Especially in the "Setting up ..." section we can see the expected
ordering:

Setting up libnetplan1:amd64 (1.0.1-1ubuntu2~24.04.1) ...
[...]
Setting up netplan-generator (1.0.1-1ubuntu2~24.04.1) ...
[...]
Setting up python3-netplan (1.0.1-1ubuntu2~24.04.1) ...
[...]
Setting up netplan.io (1.0.1-1ubuntu2~24.04.1) ...
[...]
Setting up network-manager (1.46.0-1ubuntu2) ...
Removing obsolete conffile /etc/NetworkManager/dispatcher.d/01-ifupdown ...
Migrating my-test-con (3d113709-ec0b-3589-a97c-39e6db8febb2) to /etc/netplan

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2033259

Title:
  netplan.script crashed with AttributeError in __getitem__():
  /usr/bin/python3: undefined symbol: netplan_get_id_from_nm_filename

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2033259/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to