You are not logged in.
Pages: 1
Hi,
while searching the database with "pacman -Ss foobar", is it possible to show which of the resulting package names are already installed? In Debian it's shown via "aptitude search foobar", but I can't find the corresponding option for pacman in its man page.
Thanks for your answer.
Offline
Try ....pacman -Q |less.....
Shows all pkgs installed in your system.....
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
Yes, I already stumbled upon that. But it would be nice to be able to see, when searching for a packet, that a similar one is already installed.
Offline
Pacman -S (pkg name)....will give a response indicating it is already installed if it is indeed in your system.
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
Yaourt will do this. The output from yaourt -Ss packagename will show the list of available packages and will highlight the ones already installed sort of like this:
yaourt -Ss foo
/current
foo 1.0 [installed]
foo-cvs
foo-fake
Yaourt is available in the archlinuxfr respository. See this thread for info: http://bbs.archlinux.org/viewtopic.php?id=25718
It has the added benefit of searching and installing packages from the AUR too.
Smarter than a speeding bullet
My Goodreads profile
Offline
the best command for packages info is:
$psearch -ac pkgname
(don't forget "man psearch"...).
Get it from AUR and you'll enjoy a new life!
for "global picture" of packages - jacman (just a bit slow...).
Offline
Yaourt looks exactly like the way I wanted pacman :-) I will also try psearch, installing with yaourt from AUR :]
Thanks!!
Offline
yaourt was noticably slower than psearch when I tried. And somehow I didn't like yaourt building management. (For building I use my own bash script which works in most cases. But that just taste.)
But the main thing - I couldn't find in yaourt the elegant compact analogue output as $psearch -ac keyword
Can anyone tell?
Offline
the best command for packages info is:
$psearch -ac pkgname
(don't forget "man psearch"...).
Get it from AUR and you'll enjoy a new life!
for "global picture" of packages - jacman (just a bit slow...).
psearch is great!
here you are a package http://grizz.pl/PKG/psearch-0.8-3-i686.pkg.tar.gz
Last edited by grizz (2007-06-11 21:00:33)
http://galeria.firlej.org
Voiceless it cries,Wingless flutters,Toothless bites,Mouthless mutters.
http://grizz.pl
Offline
As I said,
$psearch gimp [b]!=[/b] $psearch -ac gimp
-a - includes searches from AUR
-c - gives you a compact view which you never forget in your life!!!
use
$psearch -ac gnome games
should give logical AND.
Yes... OR should?... because at this moment of writing, after upgrading from AUR, psearch started giving errors... It looks like I will need to write something like psearch for myself, too...
Offline
i installed psearch, but I just gave an error message and listed the repository names.... do I have to configure it somewhere or is that the error you mentioned, aris?
Last edited by Kei (2007-06-11 21:57:14)
Offline
Yes, this is the error. Let's try to investigate. Someone might have already found this on forums or in AUR comments...
Offline
thanks to a clever man grizz , I can confirm that psearch (0.8.3 - see post above) is working once again. Let's hope someone will repair the one in the AUR, too.
So, Kei and others , if you don't have your own repo, it's time to start one:
1. Create a dir e.g #mkdir /home/keipkgs
2. #cd /home/keipkgs
3. #wget http://grizz.pl/PKG/psearch-0.8-3-i686.pkg.tar.gz
4. as root edit /etc/pacman.conf - add above all servers 2 lines like:
[keipkgs]
Server = file:///home/keipkgs
5. pacman -S psearch
Enjoy psearch!
Last edited by aris002 (2007-06-11 23:17:55)
Offline
Thanks! But I'm a little bit confused about the local repository. When I follow your instructions, I get an error that no 'myLocalRepo.db.tar.gz' file is present. That's right, but how do I get this file? I looked in the wiki, where it says, that the new script repo-add should be used, but this script also need the *db.tar.gz file to be present. How do I generate it?
Last edited by Kei (2007-06-12 14:18:26)
Offline
Thanks! But I'm a little bit confused about the local repository. When I follow your instructions, I get an error that no 'myLocalRepo.db.tar.gz' file is present. That's right, but how do I get this file? I looked in the wiki, where it says, that the new script repo-add should be used, but this script also need the *db.tar.gz file to be present. How do I generate it?
Use 'gensync'. There's a wiki page about it.
Offline
Sorry, I've forgot to mention - but I think "repo-add" is more elegant solution. Personaly, I use a script which I call "auri" based on "aur-install", too. It also builds packages.
If anyone likes it you can improve
#!/bin/bash
#/usr/local/sbin/auri
###############################################################################
# Author: Luis Useche <lusec001@cs.fiu.edu>
# Modified by: aris002 (no warranty and no reponsabilty for the damages to your system)
# Date: 10/20/2006
# License: GPL
#
# aur-install is a tool to install any AUR package in one command. It is needed
# to pass the url of the tarball package. It allows to see the code of both
# PKGBUILD and install file beforme performing the installation.
###############################################################################
ABS_LOCAL_DIR="/var/abs/local"
WGET="/usr/bin/wget"
UNTAR="/bin/tar xzf"
MAKEPKG="/usr/bin/makepkg"
PACMAN_INSTALL="/usr/bin/pacman -U"
REMOVE="/bin/rm -rf"
READER="/bin/less"
ADD_TO_MY_REPO="/usr/bin/repo-add"
HOME_REPO_DIR="/home/myrepo"
HOME_REPO_NAME="myrepo"
AUR_URLPKGS="http://aur.archlinux.org/packages"
# Function that make a yes or no question a return true in case of
# yes otherwise false
ask_question() {
echo -n "$1(y/n)[y]: "; read ANSWER
while [ -n "$ANSWER" ] && [ "$ANSWER" != "y" ] && [ "$ANSWER" != "n" ]; do
echo -n "\"y\" or \"n\": "; read ANSWER
done
return `[ "$ANSWER" = "y" ] || [ -z "$ANSWER" ]`
}
# Verifying root permisions
if [ `id -u` != "0" ]; then
echo "You need root to execute this script"
exit 1
fi
# Veryfing parameters
if [ -z "$1" ]; then
echo "You need to pass an aur package URL or aur package name as an argument"
echo "Usage: aur-install <pkgname>|<package tarball URL>"
exit 1
fi
# Verifying if the argument is a URL or a pkg name
if echo $1 | grep -q "http://"; then
URL_PKGTAR=$1
TAR_FILE=`basename $1`
PKGNAME=`basename $1 .tar.gz`
else
URL_PKGTAR="$AUR_URLPKGS/$1/$1.tar.gz"
TAR_FILE="$1.tar.gz"
PKGNAME="$1"
fi
# Changing directory
pushd $ABS_LOCAL_DIR > /dev/null
# Download the file and place it in abs dir
#aris002 TODO check if exists!!!
$WGET $URL_PKGTAR
# Untaring tar file
$UNTAR $TAR_FILE
# Removing the file
#aris002 KEEP???
$REMOVE $TAR_FILE
# Go inside package directory
pushd $PKGNAME > /dev/null
# Verifying the packages
if ask_question "Do you want to look the PKGBUILD file in case of malicious code?"; then
$READER PKGBUILD
# Continue?
if ! ask_question "Do you want to continue?"; then
exit 1
fi
fi
# Including PKGBUILD
source PKGBUILD
if [ -n "$install" ] && ask_question "Do you want to look the $install file in case of malicious code?"; then
$READER $install
# Continue?
if ! ask_question "Do you want to continue?"; then
exit 1
fi
fi
#repair (insert) arch=('i686') in PKGBUILD
sed -i.BAK -e '/^arch/d' -e '/^pkgdesc/a \arch=('\''i686'\'')' $ABS_LOCAL_DIR/$PKGNAME/PKGBUILD
echo "Making and installing the package..."
# Making Package
$MAKEPKG
#aris002 repo-add
$ADD_TO_MY_REPO "$HOME_REPO_DIR/$HOME_REPO_NAME.db.tar.gz" "$HOME_REPO_DIR/$pkgname-$pkgver-$pkgrel-i686.pkg.tar.gz"
# Installing with pacman
$PACMAN_INSTALL "$HOME_REPO_DIR/$pkgname-$pkgver-$pkgrel-i686.pkg.tar.gz"
# Returning to the original directory
popd > /dev/null
popd > /dev/null
Offline
Pages: 1