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

Re: Proposal v2: enable stateless persistant network interface names

Le 03/06/2015 12:01, Martin Pitt a écrit :
>  stretch+1 (or maybe +2):
>   - Check existance/non-emptiness of
>     /etc/udev/rules.d/70-persistent-net.rules in udev.preinst,
>     Show critical debconf note, and refuse to upgrade

No. It is always a real pain when a preinst script fails.
It is (nearly) ok when you upgrade only one package. But if you
upgrade lots of packages, when the preinst script will fail, other
packages will be in non-canonical state (unpacked but unconfigurated,
etc.) and recovering from such a state is always really problematic.
"apt-get install -f" can help but, I observed several times, the
resolution is not necessarily the same as the one tried before,
leading to new packages installed and, more problematic, other
packages to be removed even if not expected initially.

So, you can show a debconf note, try (or not) to migrate the file
automatically, remove (or comment-out) the 70-persistent-net.rules,
or ... but, please, do not write a preinst script that fails
because the admin did not update its config before upgrading.

One "good" solution would probably a new kind of scripts run
by dpkg and apt *prior to any other things* (for all involved
packages) to decide if the upgrade can run or not. But that
would involve lots of change in apt/dpkg and I'm sure I do not
oversee all the implications of such a proposal.


>   - Drop our hack to retry renames for a while (to mitigate the race)
> Martin

Reply to: