You are not logged in.
Is it possible to install a list of packages contained in i file eg. a list created with "pacman -Qq"?
Last edited by AcId (2010-09-11 20:45:12)
Offline
Installs by pacman of all possible types are outlined in .....man pacman...
Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit! X-ray confirms Iam spineless!
Offline
Hmm,
for pkg in `cat list.txt`;do pacman S --asdeps $pkg;done
?
Offline
Is it possible to install a list of packages contained in i file eg. a list created with "pacman -Qq"?
Yes.
I think the wiki has some examples.
Offline
Installs by pacman of all possible types are outlined in .....man pacman...
Pacman man-pages shows no options for installing a list of packages contained in a file, so i guess there's no built-in function for it in pacman.
But i thought that maybe you could pipe the output of "cat /path/to/file" to a "pacman -S", maybe trough a bash script or somerhing.
I tried running:
cat /path/to/file | pacman -S But it didn't dó the trick.
Offline
lilsirecho wrote:Installs by pacman of all possible types are outlined in .....man pacman...
Pacman man-pages shows no options for installing a list of packages contained in a file, so i guess there's no built-in function for it in pacman.
But i thought that maybe you could pipe the output of "cat /path/to/file" to a "pacman -S", maybe trough a bash script or somerhing.
I tried running:
cat /path/to/file | pacman -SBut it didn't dó the trick.
Please, read again flamelab's post.
Offline
pacman -S `cat /path/to/file` works for me.
Last edited by anonymous_user (2010-09-11 20:32:00)
Offline
Hmm,
for pkg in `cat list.txt`;do pacman S --asdeps $pkg;done
?
Returns:
error: 'cat': could not be found or read packageSo i guess 'cat' isn't being run, but used as an argument.
Offline
flamelab wrote:Hmm,
for pkg in `cat list.txt`;do pacman S --asdeps $pkg;done
?
Returns:
error: 'cat': could not be found or read packageSo i guess 'cat' isn't being run, but used as an argument.
Are you sure you've used backticks? It seems to work for me.
`- backtick
' - single quote
Try this:
for pkg in $(cat list.txt);do pacman -S --asdeps $pkg; doneLast edited by karol (2010-09-11 20:39:20)
Offline
Make sure you are using backquotes ` not single quotes '
Offline
i found this method of install packaging kinda useless. All packages will be install as explicit and you can't really get rid of bloat ![]()
Give what you have. To someone, it may be better than you dare to think.
Offline
Make sure you are using backquotes ` not single quotes '
My bad; It works wondures now ![]()
Thanks y'all.
Offline
@wonder - But the end effect would be the same as if you manually typed out the package names, wouldn't it?
Offline
@wonder - But the end effect would be the same as if you manually typed out the package names, wouldn't it?
Yes.
pacman -S 'cat /path/to/file'(With backsticks instead of ' - my iPhone doesn't have backsticks)
Worked for me as if i types the package names manually.
Offline
@wonder - But the end effect would be the same as if you manually typed out the package names, wouldn't it?
no. if i use pacman -S $(cat somelist) and i decide to remove some package, pacman -Rs package would not remove the dependencies and neither pacman -Qdtq because all packages are installed explicit
Give what you have. To someone, it may be better than you dare to think.
Offline
So pacman -S package1 package2 doesn't install packages explictly but pacman -S $(cat somelist) does?
Offline
So pacman -S package1 package2 doesn't install packages explictly but pacman -S $(cat somelist) does?
'pacman -S pkg1' does install pkg1 explicitly.
I think wonder was talking about the dependencies.
Offline
what i'm saying is that the list was done with pacman -Qq -> all packages installed, explicit and as depends. ALL of them will be install explicit with pacman -S $(cat list)
if you still want to install in the same way, the list should be generated with pacman -Qqe
Last edited by wonder (2010-09-11 23:58:53)
Give what you have. To someone, it may be better than you dare to think.
Offline
This backup/restore listing of packages has been covered a couple of times. To recap the general consensus:
# backup a list of only explicitly installed packages omitting any foreign (AUR) packages:
pacman -Qqe | grep -Fvx "$(pacman -Qqm)" > ./paclog.list
# reinstall those packages (and let them pull in their own deps):
pacman -S --noconfirm --needed $(cat ./paclog.list)
# an alternate way without the subshell or [useless use of] cat
xargs pacman -S --noconfirm --needed < ./paclog.list//github/
Offline