diff options
author | Raphaël Hertzog <hertzog@debian.org> | 2011-02-04 12:04:42 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2012-03-14 07:40:31 +0100 |
commit | e5bf4b7412bb2a4e5ff33f128c3cb8dcd96fcfdb (patch) | |
tree | 0cd98ce642dc9d3ef0207ed1c323d2211ed786b1 /src | |
parent | ea97a8b27d958de7ddfea5e2be623d8d16e998c4 (diff) | |
download | dpkg-e5bf4b7412bb2a4e5ff33f128c3cb8dcd96fcfdb.tar.gz |
dpkg: Deconfigure other instances of the unpacked package
When a new version of a “Multi-Arch: same” package is installed,
the other instances that are not synchronized (i.e. which
have a different version) must be deconfigured.
Sponsored-by: Linaro Limited
[guillem@debian.org:
- Ignore the package earlier if the package state is not correct.
- Use enqueue_deconfigure() instead of ad-hoc code. ]
Signed-off-by: Guillem Jover <guillem@debian.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/processarc.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/processarc.c b/src/processarc.c index a633e7908..dade1fad3 100644 --- a/src/processarc.c +++ b/src/processarc.c @@ -501,6 +501,17 @@ void process_archive(const char *filename) { * that we need. */ pkg->clientdata->istobe= itb_installnew; + /* Deconfigure other instances from a pkgset if they are not in sync. */ + for (otherpkg = &pkg->set->pkg; otherpkg; otherpkg = otherpkg->arch_next) { + if (otherpkg == pkg) + continue; + if (otherpkg->status <= stat_halfconfigured) + continue; + + if (versioncompare(&pkg->available.version, &otherpkg->installed.version)) + enqueue_deconfigure(otherpkg, NULL); + } + for (dsearch= pkg->available.depends; dsearch; dsearch= dsearch->next) { switch (dsearch->type) { case dep_conflicts: |