[Aptitude-devel] Bug#561957: reinstall gives internal error if package is upgradeable

Manuel A. Fernandez Montecelo manuel.montezelo at gmail.com
Sat Nov 7 23:56:10 UTC 2015


Control: tags -1 + unreproducible
Control: close -1


2012-05-11 18:22 Daniel Hartwig:
>Hi -devel
>
>Just had a look at this:
>
>> One gets this internal error, (with bad grammar ("locate file"))
>> # aptitude reinstall asterisk
>> The following packages will be REINSTALLED:
>>   asterisk
>> 0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove
>>  and 18 not upgraded.
>> Need to get 0B of archives. After unpacking 0B will be used.
>> Do you want to continue? [Y/n/?] y
>> E: I wasn't able to locate file for the asterisk package. This might
>>  mean you need to manually fix this package.
>> Writing extended state information... Done
>> E: I wasn't able to locate file for the asterisk package. This might
>>  mean you need to manually fix this package.
>> E: Internal error: couldn't generate list of packages to download
>>
>> It occurs when reinstall is used on an upgradable package,
>
>The installed version is probably no longer available from any
>sources, so if it is not in the local cache either then you get that
>error.

The error comes from apt, and it's different now:

# aptitude reinstall man-db
The following packages will be REINSTALLED:
  man-db
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 47 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
E: Can't find a source to download version '2.7.4-1' of 'man-db:amd64'
E: Can't find a source to download version '2.7.4-1' of 'man-db:amd64'
E: Internal error: couldn't generate list of packages to download

With this message, I think that it's a good hint that it's the specific
version of the package which is not available (unlike the error of the
original report).

It can also happen for reasons other than packages updated within the
same distribution -- e.g. if one changes from stable to unstable, or if
one removes a repo / suite which was the only source for that version
(e.g. non-free).


>We could be more intelligent, providing a clearer error message, or
>perhaps we should do like "apt-get install --reinstall" and just
>upgrade it instead:
>
>>  --reinstall
>>       Re-Install packages that are already installed and at the newest
>>       version. Configuration Item: APT::Get::ReInstall.
>
>in which case I'd like to support "--reinstall" directly and back away
>from plain "reinstall" command, so that there is less distinction
>between apt-get/aptitude.
>
>Anyone have any thoughts?

I think that:

a) the behaviour as it happens now it's fine, in my opinion

b) the reinstall command has been present for many years, with valid use
   cases (simply reinstall a package that has been changed locally or
   files removed for some reason), so changing it in general and forcing
   users to adapt without strong reasons is not a very good idea

c) changing reinstall because of this specific problem is too much of a
   hassle (changing lots of documentation, possibly dealing with
   requests to revert the change, etc.) and overkill, specially now that
   the error message is much more clear

d) there have been no seconds in 6 years, and no reactions after more
   than 3 other than the one above


So I think that it's simply better to close this request, now that the
issue that triggered the main complaint is gone -- doing it now.


Cheers.
-- 
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>



More information about the Aptitude-devel mailing list