2016-02-26 3:14 GMT+00:00 積丹尼 Dan Jacobson <[email protected]>: >>>>>> "MAFM" == Manuel A Fernandez Montecelo <[email protected]> >>>>>> 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 Dir::Cache "var/cache/apt/"; Dir::Cache::archives "archives/"; 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 pedestrian solutions: - 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. Cheers. -- Manuel A. Fernandez Montecelo <[email protected]> _______________________________________________ Aptitude-devel mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/aptitude-devel

