You are not logged in.
I just upgraded over the weekend. I installed the missing dependencies first (pacman -S fakeroot blabla) and then ran pacman -Syu and everything went like a charm! After I'd rebooted I wasn't even sure things were upgraded: everything behaved the same!
Kudos to everybody involved on pacman3!
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
Offline
Just to mention of those "who arent aware of this". I'm the one of them. Checking arch page and forums rarely. So last friday i tried to do pacman -Syu and it said newer version of pacman is available. But i couldnt upgrade it because of dependencies. So i ran pacman -Syu again and press No for pacman upgrade. And everything went fine. So i didnt need to go to forums at all
Offline
Just came back from two weeks holiday straight to the forum. Did a pacman -Sy pacman followed by pacman -Syu and sat there watching the brand new pacman 3 flawlessly updating all the packages which had gone out of sync while I was gone. By the way, pacman 3 is really damn fast.
www.geekslot.com - a place where peculiar people fit
Offline
Not sure if I should start a new thread for this question. I do cleanups every now and then, and remove stuff that I don't use. Now with the "-Qe" behaviour being changed, how do I list all explicitly installed packages, i.e. those that were not pulled in as dependencies? (IMVHO, it would've been better to keep the old -Qe behaviour (e as in explicit), and make a new option that works as -Qe do now (search for orphans).)
Offline
Not sure if I should start a new thread for this question. I do cleanups every now and then, and remove stuff that I don't use. Now with the "-Qe" behaviour being changed, how do I list all explicitly installed packages, i.e. those that were not pulled in as dependencies? (IMVHO, it would've been better to keep the old -Qe behaviour (e as in explicit), and make a new option that works as -Qe do now (search for orphans).)
I agree, this is functionality I want.
Offline
Not sure if I should start a new thread for this question. I do cleanups every now and then, and remove stuff that I don't use. Now with the "-Qe" behaviour being changed, how do I list all explicitly installed packages, i.e. those that were not pulled in as dependencies? (IMVHO, it would've been better to keep the old -Qe behaviour (e as in explicit), and make a new option that works as -Qe do now (search for orphans).)
find /var/lib/pacman/local/*/desc | xargs grep -L %REASON% | cut -d / -f 6
to live is to die
Offline
I was figuring a way myself before I saw Romashka's. Much harder on the cpu, neverthless by some reason it's outputting what seems a more accurate list.
for i in $( pacman -Q | cut -d ' ' -f 1 ); do pacman -Qi $i | grep -B 16 -i '^install.*explicitly' | grep -i '^name' | cut -d : -f 2; done
www.geekslot.com - a place where peculiar people fit
Offline
I was figuring a way myself before I saw Romashka's. Much harder on the cpu, neverthless by some reason it's outputting what seems a more accurate list.
for i in $( pacman -Q | cut -d ' ' -f 1 ); do pacman -Qi $i | grep -B 16 -i '^install.*explicitly' | grep -i '^name' | cut -d : -f 2; done
hmm, I don't understand why that -B 16 hack, and grep name after, while you already have it : $i
16 wasn't high enough for some packages here, but anyway, it's unnecessary :
for i in $( pacman -Q | cut -d ' ' -f 1 ); do (LANG=C pacman -Qi $i | grep -i '^install.*explicitly') &> /dev/null && echo $i; done
Also, pacman -Q looks in /var/lib/pacman/local anyway, so you can always get the same result by looking there directly, like Romashka said.
Though, his version outputs only the packages that doesn't contain %REASON%, while pacman -Qi reports a package is explicitly installed when either REASON is missing, or REASON section contains 0. So that complicates the script.
I didn't find a short way to do this in one line script, so here is a verbose version
#!/bin/sh
for i in /var/lib/pacman/local/*/desc; do
bla=`grep -A1 %REASON% $i | tail -n1`
if [ -z "$bla" -o "$bla" = "0" ]; then
echo $i | cut -d'/' -f6 | sed 's/-[^-]*-[^-]*$//';
fi
done
Or you could do in 2 steps, first with Romashka's version for finding the packages without %REASON%, then a similar one for finding the ones with reason set to 0 :
find /var/lib/pacman/local/*/desc | xargs grep -L %REASON% | cut -d / -f 6 | sed 's/-[^-]*-[^-]*$//'
find /var/lib/pacman/local/*/desc | xargs grep -A1 %REASON% |grep -e '-0$' | cut -d / -f 6 | sed 's/-[^-]*-[^-]*$//'
That's by far the quickest, I'm not sure why, it looks at each package twice, while the above ones do it only once.
Last edited by shining (2007-05-16 17:00:22)
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Yes, I believe shining's for loop solution imitates what pacman -Qe did previously. I really do appreciate the new pacman, and the work on it, but to me it seems a bit, er, counterproductive to replace one need for scripting (finding "real" orphans) with another (finding explicitly installed packages), especially when the latter was implemented before.
Offline
hmm, I don't understand why that -B 16 hack, and grep name after, while you already have it : $i
16 wasn't high enough for some packages here, but anyway, it's unnecessary :
You're right... I did it in a hurry. Your final version looks good, though as you mentioned the best approach is obviously reading the database directly. Again I did it while on the phone and didn't had the time to go through the database format, just wanted to help Bebo quickly.
Last edited by anakin (2007-05-16 18:20:48)
www.geekslot.com - a place where peculiar people fit
Offline
Please add a feature request to the bug tracker if you want this functionality back. The reason it was changed is that it was supposed to list "orphans" but did something else.
Offline
Yes, I've read the discussions on that. Somehow it seems to me that people were confused with the long option name, --orphan, as compared to the short option name, -e, and the description of the action.
Okay, I'll see if I can make a feature request of it (should've thought of that at once, instead of whining here...). I've realized that I have to think it through a bit more, though. Maybe it was only _almost_ doing what I wanted...
Anyway, thanks for all the responses
Offline
Please add a feature request to the bug tracker if you want this functionality back. The reason it was changed is that it was supposed to list "orphans" but did something else.
Someone reported it here: http://bugs.archlinux.org/task/7208
to live is to die
Offline
erm, I'm just realizing, what does listing all explicitly installed packages have to do with orphans ?
All scripts above show all explicitly installed packages, not only orphans.
I think the bug report makes more sense :
"I'd like to request for a Pacman Query functionality that lists all packages (explicitly installed or installed as a dep) that are not required by any other package."
So, I wrote a 2 lines patch that makes pacman -Qee list all orphans. (which was the old -Qe behavior I guess)
pacman -Qe behavior is kept (list orphans installed as dep).
I'm attaching it to the bug report.
pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))
Offline
Someone reported it here: http://bugs.archlinux.org/task/7208
Great! After pondering what I was after, that FR fits perfectly. "Explicitly" installed packages aren't that interesting, but the "top of the food chain" packages are, i.e. those that no other package depend on.
Offline
Until this feature hits current, here's what I use to find packages that no others depend on:
#!/bin/sh
for i in /var/lib/pacman/local/*; do
test `sed -n '/%REQUIREDBY%/ {n; p}' $i/depends` || sed -n '/%NAME%/ {n; p}' $i/desc
done
Offline