[Aptitude-devel] Bug#766122: thwarted due to missing partial/ directory that we aren't going to use anyway
Manuel A. Fernandez Montecelo
manuel.montezelo at gmail.com
Fri Feb 26 10:56:07 GMT 2016
2016-02-26 3:14 GMT+00:00 積丹尼 Dan Jacobson <jidanni at jidanni.org>:
>>>>>> "MAFM" == Manuel A Fernandez Montecelo <manuel.montezelo at gmail.com> writes:
>>> E: Archives directory /mnt/usb/extra1/partial is missing. - Acquire (30: Read-only file system)
> MAFM> ... or alternatively, if it's a knowledgeable user, it can occur to
> MAFM> her/him to create a symlink/bind-mount/etc to somewhere writeable, like
> MAFM> the /tmp/blah directory, to appease the stubborn program.
> I think some variable
> $ apt-config dump|grep -i partial
> would be better, as for read-only media, one cannot create symlinks.
> Also that bind stuff might not work on all version of linux etc.
partial/ in this case is tied to
You have to have modified the above to point to /mnt/usb/extra1
instead, for the error message to include that string.
The thing is that partial/ cannot be changed in isolation to the
others, you cannot have "archives" pointing to /mnt/usb/extra1 and
partial to "/tmp/emergency-partial"; and if you just change "archives"
(without copying the files over), then the packages that you have
downloaded in "extra1" are of no use and would be downloaded again.
You are right about not always being able to create symlinks or
bind-mount not always working, etc; but there are other more
- hopefully just by remounting the USB partition as RW would have
worked (provided that it has permissions/space to create an empty
partial/ dir, which is only a few KB)
- same case as above, but creating the partial/ by hand, and then the
partition can be remounted RO again,
- copying those ~100MB of files to /somewhere/writable/ and point the
above variables to it instead of /mnt/usb/extra1
In short, there are many possible solutions less dramatic than having
to buy a new USB :-)
> MAFM> Anyway, got a way around this, so marking as +pending.
> Hope it involves a new variable.
No, it involves not trying to download when there's no need to (which
implies extra actions from libapt like "setting up the directories,
create partial if missing, etc").
I was doubting whether it was worthy of implement this extra check to
not download, since I think that this is relatively obscure
corner-case and easily solvable. But then I thought that might be
useful in the case of emergency recoveries with external media mounted
as RO, it's a small micro-optimisation for aptitude in itself, etc.
Manuel A. Fernandez Montecelo <manuel.montezelo at gmail.com>
More information about the Aptitude-devel