Tuesday·26·November·2013
Showing packages newer than in archive with aptitude //at 22:14 //by abe
I happens quite often that I install a manually built, newer version of some package on a machine. Occassionally I forget to remove it or to downgrade it to the version in the APT repo.
$ apt-show-versions | fgrep newer
easily finds those packages.
But usually when doing such a check, I want this list of packages in my aptitude TUI to have a look at the other versions of that package and to take actions. And I don’t want to manually search for each of the package manually.
This can be done with the following “one-liner”:
# aptitude -o "Aptitude::Pkg-Display-Limit=( `apt-show-versions | fgrep newer | awk -F '[ :]' '{printf "~n ^"$1"$ | "}' | sed -e 's/| *$//'` )"
It uses apt-show-version
’s output, searches for the right
packages, takes the first column and transforms it into an aptitude
search pattern matching all packages whose name is exactly one of the
listed packages.
But this solution is quite ugly and slow. So I wondered if this is also doable with pure aptitude search patterns which likely would also be faster.
And after some playing around I found the following working aptitude search term:
~i ?any-version(!~O.) !~U !~o
This matches all packages which which are installed and which have a
version which has no origin, i.e. no associated APT repository. Since
this also matches all hold packages as well as all packages not
available in any archive, I use !~U !~o
to exclude those
packages from that list again.
Since nobody can remember that nor wants to type that everytime needed, I added the following alias to my setup:
alias aptitude-newer-than-in-archive='aptitude -o "Aptitude::Pkg-Display-Limit=~i ?any-version(!~O.) !~U !~o"'
Only caveat so far:
It seems to also match packages from APT repos which haven’t set an “Origin”. This should not happen with any Debian or Ubuntu APT repository, but seems to happen occasionally with privately run APT repositories.
And using ~A
instead of ~O
, i.e. ~i
?any-version(!~A.)
, does not work for this case either, despite
it matches installed packages of which versions not in any available
archive exist. But unfortunately aptitude seems to remember in some
way if a package was in some archive in the past, so this only shows
packages installed with dpkg -i
, but not packages removed
from e.g. unstable but with older versions still being available in
stable.
Tagged as: alias, apt-show-versions, aptitude, awk, CLI, Debian, filter, grep, one-liner, Package Management, Quoting, UUUCO
// show without comments // write a comment
Related stories
Monday·30·October·2006
BarCamp Zurich — Resumé //at 02:02 //by abe
The BarCamp Zurich 2006 is over. On the way there I thought about what I would do during time slots with no interesting talks. But when I tried to make up my personal schedule, I noticed that I rather would have the opposite problem: Too many interesting talks at the same time… Well, to many interesting talks at all, although I only went to tech talks and left out the biz talks.
I first went to the Podcasting & Co. talk by Timo Hetzel, since I never heard or made a podcast, but was curious about podcasts in general. Besides statistics and rankings he spoke about where people listen to podcast (most listeners seem to do that during commuting), what people like in podcasts, why companies podcast, etc. And that a very big share of all podcast listeners use iTunes as podcast client and except juice (never heard of it before) all other podcast clients seem to be irrelevant.
My conclusion: I haven’t missed anything not having listened to or made podcasts neither do I need to listen or make podcasts in the future. They’re irrelevant. To me. :-)
Then I had to choose between the talks AJAX@localhost (PDF) by Harry Fuecks and Realtime Collaborative Text Editing and SubEthaEdit by the Coding Monkeys. I heard about realtime collaborative editing once know that it’s a challenging task for the developer. I also know what AJAX is (and that I would only use or recommend it for bells and whistles, but not for content in general), but “AJAX@localhost” sounded like writing normal applications using AJAX. It sounded interesting and evil at the same time. I had to go there! ;-) Others had similar expectations after reading the talk’s title, so I was quite surprised that it was about something completely different, namely about debugging AJAX on the localhost but under conditions usually only appearing if you’re running AJAX application not from localhost but from somewhere on the net: You may have different lags with every request, so some requests may reach the server before others, which may screw up the whole AJAX application, if the developers didn’t think about it and only tested it on localhost. (Hence the talk’s title…)
My conlusion: I will use and recommend AJAX even more seldom, since there seem to be even more design misconceptions than I thought before. But I’ll once have a look at the Webtuesday meeting, he mentioned.
For the third time-slot, I didn’t need long to decide where to go: I already knew a little bit about Microformats and I wanted to know more. Tag Trade also sounded interesting, but the second part of the talk’s title, Paid Learning sounded like business and so I had no scruples to cold-shoulder that talk. I probably didn’t learn anything really new in the microformats talk, but my knowledge about microformats is now more concrete, and after talking with Cédric Hüsler later during a break, I would even trust myself to start and define a new microformat.
Then I went to the HG Caféteria together with Gürkan and two German guys. While waiting in the queue, we were talking about our jobs and our favourite Linux distributions. I got some rhubarb pie and a rum truffles, assuming that the Caféteria uses no alcohol in their products like all other SV restaurant I know. But this one seemed to have quite a lot of alcohol, since it felt like my breath was burning… Well, this resulted in my second SV feedback form submission…
Next I went to Alex Schröder’s talk about multilingual websites, Oddmuse and the Emacs Wiki, although also the talk A-Life about simulating evolution sounded promising. Alex asked the listeners about their experiences with multilingual websites and showed what Oddmuse offers as partial solution to the general multilingualism problems. But regarding the comments from the auditorium, there probably won’t be a perfect solution until computers can translate perfectly…
The next talk I visited was Gabor’s talk about his master thesis Organizing E-Mail which resulted in a soon to be released Mozilla Thunderbird extension called BuzzTrack. From the other concepts he showed, I found Microsoft’s SNARF (Social Network and Relationship Finder) and IBM’s Thread Arcs most interesting as well as the fact that there is no e-mail client seems to have a majority at all.
Directly after Gabor I had my own talk about Understanding Shell Quoting, so I also couldn’t go to Adrian Heydecker’s talk about Learning with Hypertext and Search Engines. I had only about three and a half listeners of whom several to my surprise where here because they didn’t know what “shell quoting” is.
I really didn’t expect that.
But that seems to be one of the differences between a BarCamp and a Linux Conferences: People come here to see something new, something they haven’t heard about before. On Linux events most people come, because they already heard about some special topic and want to know more or learn something about it. On Linux event my shell talks usually were attracting many visitors while at a BarCamp, talks presenting an idea, a concept or a tool seem to much more interesting for the attendees. So for the next BarCamp I perhaps exhume my Website Meta Language talk which never seemed to hit the nerve of Linux event attendees, since it tried to “sell” a different concept of generating website than most were used to.
At least one listener excepted the talk to be named “shell escaping”, but IMHO escaping is only one quoting technic and it’s not only used for quoting. But perhaps I should take the word “escaping” in the title though for the next time.
Happily most of the listeners seem to have learned something new from the talk and Silvan Gebhardt was really happy about his new knowledge about ssh ~ escapes, although I mainly talked about how to quote them than how to use them. :-)
During the last slot I visited the session about the upcoming BarCamp Alsace 2 and the yet to be planned BarCamp Rhine, a BarCamp to be held on a ship traveling from Basel in Switzerland down the Rhine, stopping in Strasbourg, Karlsruhe, Rhein-Main-Area and perhaps even Cologne and Amsterdam.
Contrary to my initial thoughts, the day was over very fast and I had no single boring minute during the BarCamp. Wow!
After we’ve been kicked out of the building by ETH janitors, we joined again at the Bar N-68. On the way there I met Urban Müller who attended BarCamp Zurich, too. We talked quite a lot and it was very interesting to see behind the scenes of e.g. map.search.ch. Later I joined the French speaking table, talking with Gregoire Japiot from WineCamp France and Alex Schröder.
Around 9pm I left the N-68 as one of the last BarCampers, tired but with new knowledge, new ideas, new acquaintances and a new hobby: BarCamping. What a luck that BarCamps aren’t that often, otherwise I couldn’t afford this new hobby. ;-)
As a relaxing end I met with Alex Schröder and Christophe
Ducamp on Sunday morning for brunch in the restaurant Gloria in the Industriequartier. When we were leaving
the Gloria I noticed their book board with a lots of BookCrossing books and I took
“The Da Vinci Code” with me, since I saw the movie and people were
telling me that the book is much better. I’ll see…
Tagged as: AJAX, BarCamp, barcampzurich, barcampzurich2006, BookCrossing, BuzzTrack, E-Mail, Emacs, ETH Zürich, Events, Gloria, IBM, Industriequartier, Mensa, Microformats, Microsoft, Multilingualism, Oddmuse, Other Blogs, Podcast, Quoting, Shell, SNARF, Talk, The Da Vinci Code, Unconference, Wiki, Zürich
// show without comments // write a comment
Related stories
Saturday·28·October·2006
Next Shell Quoting Talks //at 12:33 //by abe
There are a several events coming up where I plan to hold my Shell Quoting Talk: First, there will be the BarCamp Zurich on October, the 28th at ETH Zürich HG and then there will be the 8th Linuxday.at on November, the 18th at the HTL at Dornbirn (Vorarlberg, Austria) organised by the LUG Vorarlberg. It’s also possible that, in addition to the Shell Quoting talk, I’ll also give a talk for beginners about Commandline Helpers. (Probably all the talks will be held in German.)
I’m quite curious on both events, for very different reasons. On the
one hand, a BarCamp is
something completely new for me and it sounds like a very
interesting mixture of a real life Wikipedia meeting and a flash
mob to me.
On the other hand, this year’s Linuxday.at will have several new
facettes for me: First there were several changes in the organising
team, so I wonder if and in that case how much this will change the
face of the event. Then it’s the first Linxuday.at since I live in
Zurich, which means it’s the first Linuxday without 1000km travelling
during that weekend, so I also have some time to meet friends in the
area in advance to or after the event. Yeah!
Tagged as: BarCamp, barcampzurich, barcampzurich2006, Dornbirn, ETH Zürich, Events, Flash Mob, Linuxday.at, Quoting, Shell, Talk, Unconference, Wikipedia, Zürich
// show without comments // write a comment