FS#9710 - pacman install package with minimum disk space usage

Attached to Project: Pacman
Opened by Daniel YC Lin (dlin) - Thursday, 28 February 2008, 05:03 GMT
Last edited by Dan McGee (toofishes) - Wednesday, 16 July 2008, 00:28 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To Dan McGee (toofishes)
Architecture All
Severity Very Low
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: pacman install package with minimum disk space


Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
I install archlinux with limited free disk space partition.
I required to upgrade system, but it required about 200 M bytes to download all disk. I think this function could be implement another option (eg. pacman -S1) by following step:

for every file required to install:
1. download one file.
2. install it
3. delete the installed file

instead of previouse steps
1. download all files
2. install all files
This task depends upon

Closed by  Dan McGee (toofishes)
Wednesday, 16 July 2008, 00:28 GMT
Reason for closing:  Won't implement
Additional comments about closing:  Pacman just isn't architected to work this way, and it would be a lot of work for only a little gain on the end users part.
Comment by Roman Kyrylych (Romashka) - Thursday, 28 February 2008, 08:58 GMT
Daniel, what with dependencies?
I think implementing this won't be easy with current libalpm design.
Comment by Daniel YC Lin (dlin) - Thursday, 28 February 2008, 09:41 GMT
Oh, it should installed according the dependency.
The previous steps is still the same as pacman.
Comment by Nagy Gabor (combo) - Thursday, 28 February 2008, 12:53 GMT
Romashka, there is no problem with dependencies (depcheck and sortbydeps is done before the actual download with the help of syncdbs). However, for fileconflict checks we need to download the package files to get the filelist.

Apart from fileconflict check [:-P] this could be implemented easily... Transaction rollback could eliminate the fileconflict check in this case, so after implementing FS#8585 we can return to this bug...
Comment by Dan McGee (toofishes) - Monday, 24 March 2008, 04:38 GMT
Hmm, I see no need to do anything this complicated. You could script it quite easily with a text file list of packages and some rm foo. I'd like to close this as a won't implement. Pacman wasn't designed so much for a low memory environment, but for dependency correctness and (usually) successful transactional installation.
Comment by Daniel YC Lin (dlin) - Monday, 24 March 2008, 05:09 GMT
If it is not so difficult to implement, could you do it?

Do you mean I could trust the pacman -Syup 's download url listing?
Or, is there any better command I could know to do?

I think there still lack the ability like pacman could do.
Comment by Nagy Gabor (combo) - Monday, 24 March 2008, 11:34 GMT
I have to modify my last comment. Transaction rollback needs some extra disk space to maintain the rollback info. Current HDD usage: installed packages (varying during transaction) + downloaded packages (.tar.gz), rollback HDD usage: downloaded packages + old installed packages + new installed packages.

So Daniel, IMHO this is quite hard to implement. The reason: We must get all filelists in order to be able to do fileconflict check, and filelists are computed from package files... Well, we could download package files twice, but probably AL server maintainers wouldn't like it;-) I don't think that -Syup + script magic can solve your request neither (but in many cases that may work if you upgrade packages _in correct order_).
On the other hand there were some requests to add option to find files in sync packages, if this were implemented then your request could be done easily too. But I cannot predict the future.
In -f special case we don't need filelists, so in that case your request could be implemented easily too. But -f is not recommended, so probably we won't implement it there.
Comment by Dan McGee (toofishes) - Monday, 24 March 2008, 11:59 GMT
for pkg in $(cat pkgnames.txt); do
pacman -S pkg --noconfirm
rm /var/cache/pacman/pkg/*.pkg.tar.gz
done
Comment by Daniel YC Lin (dlin) - Monday, 24 March 2008, 12:08 GMT
Thanks toofishes,
I know how to do the install and remove step.
But I'm not sure, could I use the result order of pacman -Sup as my install packages order?
Comment by Nagy Gabor (combo) - Monday, 24 March 2008, 12:38 GMT
You can also use "pacman -Scc" instead of rm.
In Dan's script you can use any order of packages, that won't break anything. The order affects only the needed (extra) disk space. [A package can pull many deps, but this is probably less than the packages of -Su]
See also: -Qu
Comment by Roman Kyrylych (Romashka) - Saturday, 05 April 2008, 09:16 GMT
can this be closed now?
Comment by Daniel YC Lin (dlin) - Saturday, 05 April 2008, 13:20 GMT
I think the order is very important. Because for long time not upgraded images, upgrade without correct order will cause the system crash.

eg. the image files which I put on colinux
http://sourceforge.net/project/showfiles.php?group_id=98788&package_id=122245&release_id=436233
ArchLinux-0.7.2-ext3-512mb.7z can't not smoothly upgrade now. (Because the repository's name changed from current to core).
ArchLinux-2007.08-2-ext3-256m.7z can't not smoothly upgrade, if all package required to upgrade after about one or two year.

But, anyway if it will too difficult to implement. OK, just close this ticket.

Loading...