Bastian Blank wrote:
> No, it is not. It is the behaviour of the original code of anna.
>
> The attached patch should fix the problem and a potential other bug but
> is untested.
I don't understand how this can possibly fix the reported problem, but
anna should not upgrade already installed udebs to newer versions in the
archive. To do so _will_ introduce other bugs, because udpkg does not
support proper upgrading of packages. A few of the potential problems
include, but are not limited to:
- Upgrading a package that provides a file that was also provided by
some other package, thus leaving us with the wrong version of the
file.
- Text file busy. udpkg does not move files out of the way like dpkg
does, so this can occur during an upgrade.
- Lack of versioned dependencies and conflicts in d-i make it impossible
to ensure that the upgraded system is internally consistent.
Not upgrading udebs in the running system is a longstanding design
decision of d-i, and changing this behavior now will break things.
> - if (is_installed(package, status))
> - continue;
>
> + /* If we don't understand the version number, we play safe
> + * and assume it is not installed */
> + if (package->version != NULL && (pv = di_package_version_parse(package))) {
> + q = di_packages_get_package(status, package->package, 0);
> + if (q != NULL && q->status == di_package_status_installed &&
> + q->version != NULL && (qv = di_package_version_parse(q))) {
> + int ret = di_package_version_compare(pv, qv);
> + di_package_version_free(pv);
> + di_package_version_free(qv);
> + /* Install if the version in the archive is higher */
> + if (ret > 0)
> + package->status_want = di_package_status_want_install;
> + /* Skip futher processing if the version is equal or higher */
> + if (ret >= 0)
> + continue;
> + }
> + else
> + di_package_version_free(pv);
> + }
--
see shy jo
Attachment:
signature.asc
Description: Digital signature