You are not logged in.
Is there anyway to list packages that are installed but are not in the archlinux repositories?
Say I built some arch packages and installed them and I forgot what the packages were. Or if some package is removed from the repository.
How would I know which are local?
Offline
You cant to my knowledge tell where they have been installed from.
Unless you dont clear you /var/cache/pacman dir. Then you know which ones you have downloaded from the net.
I keep all the pkgbuild i make my self in my documents and then cvs most other stuff i need.
Offline
Here's a quick-n-dirty bash thing:
for pkg in `pacman -Q | cut -d " " -f 1` ; do pacman -Si $pkg 1>/dev/null ; done
That will list all your non-repo packages like this:
Package "foo" was not found.
Package "bar" was not found.
etc ......
Offline
You can also try looking through the package names in /var/cache/pacman/src/ - IIRC they won't be removed at a clean of pacman cache. But note that it will also include packages that you have removed...
Offline
Is there anyway to list packages that are installed but are not in the archlinux repositories?
pacman -Qm
Offline
Jeez! Thanks Penguin!
Even after nearly two years on Arch, I still need to follow the advice I often give to others:
man pacman
Offline
Exactly !
in this case use tomk trick, so it's slower but gives u what u are seeking
[My Blog] | [My Repo] | [My AUR Packages]
Offline
-Qm must be new, at least I didn't see it when I read the manpage the last time.
Offline
-Qm must be new, at least I didn't see it when I read the manpage the last time.
yeah VMikos or whatever his name is from Frugalware was responsible for that. I too have noticed it doesn't display all foreign packages -for me it misses xarchive.
I'm not sure if there is a bug report about it but it may be a good idea to bring it to their attention before pacman3 is released.
Offline
for xarchive, it makes sense, because there is xarchiver in community.
And the comparison that is done is :
strstr("xarchiver", "xarchive") which returns not null since xarchive is in xarchiver. (quite easy to fix).
But for opera-devel and other svn packages, I don't see why it doesn't work. So I just tried to install opera-devel from aur, and it's correctly listed by pacman -Qm
What about locally updated packages (for example, when you add a patch to a package, and bump the revision) ?
hmm well, these ones are already displayed by pacman -Su :
:: pacman: local (2.9.8-2) appears to be newer than repo (current/2.9.8-1)
but, well they aren't part of archlinux repo, so maybe they should be displayed by pacman -Qm too ?
If anyone could explain pholie problem.. I don't see what provide has to do with it (in the code), but I'll check again.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
ha ok it's better now.
So here is a little fix for a stricter string comparison :
--- pacman-2.9.8/src/pacman.c.ori 2006-05-10 20:58:27.000000000 +0200
+++ pacman-2.9.8/src/pacman.c 2006-05-13 14:10:07.000000000 +0200
@@ -2648,10 +2648,8 @@
char *haystack;
char *needle;
haystack = strdup(pkg->name);
- strtoupper(haystack);
needle = strdup(info->name);
- strtoupper(needle);
- if(strstr(haystack, needle)) {
+ if(strlen(haystack) == strlen(needle) && strstr(haystack, needle)) {
match = 1;
}
FREE(haystack);
@@ -2740,10 +2738,8 @@
char *haystack;
char *needle;
haystack = strdup(pkg->name);
- strtoupper(haystack);
needle = strdup(info->name);
- strtoupper(needle);
- if(strstr(haystack, needle)) {
+ if(strlen(haystack) == strlen(needle) && strstr(haystack, needle)) {
match = 1;
}
FREE(haystack);
I just compare the length on the name first. And I removed the strtoupper since I don't think it should be done, but I could be wrong.
Every package should be in lowercase anyway..
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline