February 1, 2016

Arch and the outdated package-query

Seems that the first story arrives sooner than expected, nevertheless my story is that I running my daily things on multiple PCs with different distros.
My first in command laptop when I'm not in my office is running Arch. If you are running Arch you know already that life is actually pretty smooth with it, but when things go wrong.. they can go very wrong.

The Problem

I tried to update today my system and ran into a strange problem. The update this time includes pacman 5.0.0, but when I try to do a system wide update one package namely package-query was causing a bit of a conflict requiring earlier version of pacman than 4.3. As it shows:

nuke@AuroraArch ~                                                 [13:37:15]
> $ sudo pacman -Syu                                                          
:: Synchronizing package databases...
 core is up to date
 extra is up to date
 community                  3.3 MiB   127K/s 00:27 [######################] 100%
 multilib is up to date
 archlinuxfr is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: package-query: requires pacman<4 .3="" br="">

The Solution

At the moment - as the dependencies part of the package is not yet updated although pacman 5.0.0. is now in core - is to grab the PKGBUILD of package-query, remove <4 .3="" and="" depends="" from="" install="" it.="" it="" line="" p="" recompile="" the="">

PKGBUILD files are generally speaking make files for creating packages for Arch Linux and I could start writing million lines of it, but the Arch guys are did that for us already and it is available here. Pretty handy little things, but how this will work?

First grab the PKGBUILD:
git clone https://aur.archlinux.org/package-query.git

Edit the PKGBUILD file
vim PKGBUILD

Look for the "depends" line and remove '<4 .3="" span="">from it and save it.

You are ready to compile it. While standing in the same folder with the PKGBUILD file:
makepkg

Should be fairly fast, but once it is done you just need to install it. As it is a local install you need the -U flag:
pacman -U  package-query-1.7-1-x86_64.pkg.tar.xz

After this you can go wild and update the system pacman -Syu.
Package-query is compatible with pacman 5.0.0., but till the dependencies of it is not update this will do.

Conclusion
Frankly this wasn't my first encounter with PKGBUILD on Arch or pacman issues for that matter, but it always amaze me the great way of taking care of packaging business, the ease of use and distribution of the package as well. Hopefully this guide - besides offering a quick solution for the problem - can give to many a short and quick introduction to PKGBUILD.
Arch is a fantastic rolling release distro and honestly once you get it running and you maintain it properly you can end up with an awesome, fresh and stable OS on your box. 



A Fresh Start

2011, August 19. The day I made my last post on this blog... on Hungarian though. Very strange to see that such old posts are still have some readers now and then. Not much of course, not really advertising my page.

Long time and a lot of things happened in the world of tech, the world of Linux just like in my own little world.

A little from my life: I live in South-East Asia in the last 2.5yrs, have a beautiful 19month old son who developed an early interest in IT, although he's mostly just smashing keyboards and press glowing buttons.
Quite frankly 2015 was a great year for me and it seems that the early predictions what much smarter people made before seems to become reality. These are very interesting times for Linux, it is literally everywhere. It's in your pocket, in your tablet, in the cloud, the services you use etc. Incredible!

I just finished creating a retail analytic product on top of Linux called Lynx, keeping privacy in mind. No footage storage, no back-doors just the data what one would still argue how ethical it is, but I think my mate and I did a great job keeping it as low-profile as possible. If you are interested you can get more info about it here.

Anyhow that's all about the self advertisement. It looks like I will have a bit more of free time in the upcoming months and strongly thinking of sharing my experiences with the community again. Keeping distro reviews as far as possible from here as this page is not really about that, but might slip with that promise and some comparison might show up now and then.
I will try and focus on desktop use cases as it seems that more and more people - maybe thanks to the rapid changes in the MS Windows EULA - wants to try out a free and open source operating systems. Of course will touch some of the server side of things and maybe a little IoT.

I really hope that I will have the time to deliver my promise to you and myself as well and start recording my experiences once again in the magical world of Linux.

Happy coding!
Attila