archlinuxfr / package-query Goto Github PK
View Code? Open in Web Editor NEWQuery alpm database and AUR
Query alpm database and AUR
'%u' allows me to query the package tarball url:
$ package-query --aur-url "https://aur4.archlinux.org" -Aif "%u" yaourt
https://aur4.archlinux.org/cgit/aur.git/snapshot/yaourt.tar.gz
Is it possible to query the git URL? For example:
$ package-query --aur-url "https://aur4.archlinux.org" -Aif "%g" yaourt
https://aur4.archlinux.org/yaourt.git/
"%g" is just my naive intuition. (git)
See #122
Current, the vote numbers are increasing in the output - this means that the packages with the least numbers of votes come first, and the most voted packages are among the last.
Is this order correct? I mean, I'd rather expect seeing the "best" (most votes) packages first than having to scroll all the way down the screen.
The same question applies to the popularity sort - do the most popular packages appear first or last?
And to the relevance sort as well.
nevermind
Apparently, 7c64833 broke it.
Are there any reasons why the -1 option is not applied to the search results?
Well, I think that we need to release a new version of package-query.
Since this morning, the "old" api seems broken : https://aur.archlinux.org/rpc.php?type=search&arg=yaourt
Fortunally, package-query-git now support rpc v=5 and works
Here is an example:
$ package-query -Qu
multilib/lib32-systemd 221-1 -> 221-1
...
In other hand if I add -A
flag the versions will be correct:
$ package-query -QAu
multilib/lib32-systemd 221-1 -> 222-1
...
Seems the error is related to this line and has been introduced (again?) by 8724261. Unfortunately I didn't read carefully the source code, but all seems to be ok if I revert this commit locally.
E.g. the following command (supplying incorrect proxy address) causes infinite loop:
$ https_proxy=abc ./src/package-query -As f2404 --maintainer
curl error: Couldn't resolve proxy name
curl error: Couldn't resolve proxy name
curl error: Couldn't resolve proxy name
...
pacman 5.0 introduced new functionality: .files databases:
pacman can now sync and read .files databases (-Fy) and do basic searching for files in sync repos (-Fs, -Fo) (FS#23787)
Do we want to also support this?
aur-url is used twice, but i think it only happens since ~today (Last time it worked was slightly past 2015-06-10 13:54, time from aur)
Example:
package-query --aur-url 'https://aur4.archlinux.org' -1Aif "%n %i %v %w %o %u %m %l %L" gputest
gputest 190320 0.7.0-1 18 0 https://aur4.archlinux.orghttps://aur4.archlinux.org/cgit/aur.git/snapshot/gputest.tar.gz swiftgeek 0.7.0-1 1433892021
And also improve its description in the help message.
Il est partout noté avec une dépendance vers pacman < 1.4.2, est-ce nécessaire ?
Would be useful to have --qmakedepends option to filter out packages installed when building some AUR packages (stuff like: asciidoc, automoc, apache-ant etc..). That how you could filter those out when removing 'truly' unneeded packages, preserving makedeps for later AUR upgrades.
I using lastest development snapshot. Normally yaourt -G packagename download whole tarball from ABS and extract selected dir:
(standard output on stable release)
[tomasz@arch ~]$ export LANG=C
[tomasz@arch ~]$ yaourt -G gparted
==> Download gparted sources
x gparted.install
x PKGBUILD
x org.archlinux.pkexec.gparted.policy
x gparted_polkit
[tomasz@arch ~]$
After install lastest package-query-git and yaourt-git I get issue:
[tomasz@arch ~]$ yaourt -G krusader
==> Download krusader sources
==> community-testing/krusader: Download abs archive
curl: option -/community-testing.abs.tar.gz: is unknown
curl: try 'curl --help' or 'curl --manual' for more information
steps:
upgrade package-query-git > upgrade yaourt-git > close and open new terminal window > type yaourt -G gparted
(for example)
@Skunnyk Regards
FadeMind
The first time I run yaourt -Syua
each day it takes a long time (20-60 seconds) before prompting for a password for sudo. I did some profiling and narrowed it down to this command:
package-query --aur-url https://aur.archlinux.org -Qdtf %n --sort n
It seems like the first time I run that command each day it is slow and then after that it is fast (less than half a second), though I'm not sure it is exactly once a day.
I think the --aur-url ...
is just there because of the way yaourt
wraps package-query
and doesn't do matter here because this is a local database query (if it were connecting to the aur I could understand the variable time). Do you have any idea why the speed varies like this? I thought maybe a large shared library could be getting loaded and cached into memory and that was why subsequent tries were fast, but package-query
and all of its dependencies seem very small.
The info has been extended with the "Keywords" array.
In the command package-query -SAs fish
, results are sorted alphabetically by name, but this is sometimes undesirable, as the exact match fish
is listed fifth in this list. A string metric could be used, like sorting the Levenshtein distance from the search term, although something a bit simpler could solve the problem as well. I believe this would improve the user experience of the yaourt package when searching for the exact names of packages.
This is a reference to archlinuxfr/yaourt#164
package-query gives an error to includes like below, while pacman supports them:
Include= /etc/pacman.d/include-*.conf
'&by=field' parameter has been added:
Need to revise the --nameonly
option implementation.
See last comment : https://aur.archlinux.org/packages/package-query-git
Git bisect say to me that this PR introduce the bug : #45 :)
@f2404 this is normal result at the end?
Foreign packages: \ 87 / 87
IMO mark \
is here useless
$ yaourt -Syua
:: Synchronizing package databases...
testing is up to date
core is up to date
extra is up to date
community-testing is up to date
community is up to date
infinality-bundle is up to date
infinality-bundle-fonts is up to date
Foreign packages: \ 87 / 87
Add an option to take into account only package names when searching (-s option). This is referred to yaourt issue 73 - "yaourt rar" not working.
How to indicate the popularity field to change its color in PQ_COLORS variable?
It is undocumented (unlike votes
) inthe manual page package-query(8).
Will package-query be updated to AUR4?
Hi Folks,
Hey thanks for all your timely hard work on this project.
Listen, I am stuck 'in the middle' on an issue which I believe is not yours but one belonging to the Antergos Linux Devs.
It comes down to this: Pamac, the gui software updater, calls the yaourt wrapper which calls /usr/lib/yaourt/util.sh, which invokes package-query at line 190 with the following error:
http://i.imgur.com/UwQvIac.png
and then does a core dump.
From my vantage point, it would appear that your command tail args have changed in 1.8, yes?
If so, then, util.sh needs to pass into package-query the appropriate args, yes?
Arghhhhhhhhhhhh.
Seriously, could I have your opinion on this issue?
Many thanks
Kindest Regards,
Dietrich
[email protected]
Just notice a segfault when using with yaourt on the following args
$ yaourt python whatever
This command provoke the segfault
$ package-query -S -s -A python whatever
Seems to be reproducible on at least 2 installs.
Here is the backtrace in gdb
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff7412c8e in __strcasestr_sse2 () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff7412c8e in __strcasestr_sse2 () from /usr/lib/libc.so.6
#1 0x00000000004044ae in aur_request (targets=0x7fffffffe3f8, type=2) at aur.c:604
#2 0x000000000040487f in aur_search (targets=0x6119f0) at aur.c:692
#3 0x000000000040a73e in main (argc=6, argv=0x7fffffffe5e8) at package-query.c:543
Commit b8c322a DON'T have this issue.
Some one of recent commits give in results at the end The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
[tomasz@arch ~]$ export LANG=C
[tomasz@arch ~]$ yaourt -Syua --noconfirm
:: Synchronizing package databases...
kde-unstable is up to date
testing is up to date
core is up to date
extra is up to date
community-testing is up to date
community is up to date
multilib-testing is up to date
multilib is up to date
infinality-bundle is up to date
infinality-bundle-multilib is up to date
infinality-bundle-fonts is up to date
repo-ck is up to date
atom is up to date
xyne-x86_64 is up to date
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404
Foreign packages: \ 183 / 183
[tomasz@arch ~]$
Hi, everyone:
After upgrading to pacman 4.2.0-6, I get an issue "package-query: error while loading shared libraries: libalpm.so.8: cannot open shared object file: No such file or directory" when I use yaourt to install packages from aur.
BTW, I'm pretty sure this issue is linked with package-query! As I can use yaourt to install packages with pacman 4.1.2-7 and package-query 1.5-2.
Any help?
Thanks.
Do we want to see size and date of the packages when using corresponding sorting types?
Now the output is looking like
$ package-query -Qs terminal --sort size
community/python-colorama 0.3.3-3
Python API for cross-platform colored terminal text.
core/less 481-2 (base)
A terminal based program for viewing text files
extra/vte 0.28.2-6
Virtual Terminal Emulator widget for use with GTK2
extra/xfce4-terminal 0.6.3-2 (xfce4)
A modern terminal emulator primarly for the Xfce desktop environment
And it could be looking like
$ package-query -Qs terminal --sort size
community/python-colorama [84KiB] 0.3.3-3
Python API for cross-platform colored terminal text.
core/less 481-2 [201KiB] (base)
A terminal based program for viewing text files
extra/vte 0.28.2-6 [1182KiB]
Virtual Terminal Emulator widget for use with GTK2
extra/xfce4-terminal 0.6.3-2 [1338KiB] (xfce4)
A modern terminal emulator primarly for the Xfce desktop environment
For example, AUR search shows votes count in its output.
Step to reproduce:
package-query -Qs firefox -f "%t"
or
package-query -Qs firefox -f ""
That issue is rare but it's a segfault after all.
It comes from util.c, string_t.s is NULL as long as there is nothing to add (including empty string). Then pkg_to_str return NULL instead of empty string and print_package doesn't handle it.
The flag needs to be retrieved from the web as the sync databases do not contain it.
I got this error while updating with yaourt this morning :
package-query: error while loading shared libraries: libalpm.so.10: cannot open shared object file: No such file or directory
No database errors have been found!
For instance:
$ package-query -Qu
extra/git 2.7.0-1 -> (null)
$ pacman -Qu
git 2.7.0-1 -> 2.7.1-1
Looks like this is required in order to resolve yaourt issue: archlinuxfr/yaourt#39
format_str(char *s) function from util.c crashes on some input strings like "str\ning" - i.e. when the "\" sequence is followed by one of the special chars: e, n, r, t.
I'm not sure how critical this issue is - what kind of strings can this function accept in reality?
Pacman 5.0 is out, in [testing] for now (see https://lists.archlinux.org/pipermail/arch-dev-public/2016-January/027732.html).
Just tried it on a VM, of course you need to recompile package-query to link to the new alpm version.
It seems to works, no compilation warnings and basic operations works (good news).
This issue in only to follow potential broken features in pacakge-query with pacman 5.0 :)
A use case: recently, Chrome pepper-flash plugin stopped supporting i686 architecture. And it would be nice to see supported architectures right within the search results - something like
$ package-query -As pepper flash
aur/chromium-pepper-flash 1:21.0.0.197-1 (1228) (39.31) (x86_64)
Google Chrome's Pepper Flash plugin for Chromium (stable version)
aur/chromium-pepper-flash-dev 21.0.0.193-1 (255) (3.81) (x86_64)
Google Chrome's Pepper Flash plugin for Chromium (Dev Channel)
aur/chromium-pepper-flash-standalone 21.0.0.197-1 (63) (8.40) (i686 x86_64)
Google Chrome's Pepper Flash plugin for Chromium (stable version) - Standalone version
To achieve this, the package's PKGBUILD has to be downloaded from AUR as the RPC API does not provide such info. The URL looks like https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=<package>
.
SRCINFO has a more stable format than PKGBUILD as it is a simple key/value format generated by the user. It contains the same metadata the PKGBUILD contains. (*) For example, compare:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=aws-cli-git
to
https://aur.archlinux.org/cgit/aur.git/tree/.SRCINFO?h=aws-cli-git
(*) The SRCINFO has to be explicitely generated by the maintainer, but this shouldn't be a problem since the AUR warns explicitely on this when pushing changes.
The AUR OutOfDate flag is not recognized:
$ ./src/package-query -As freetype ubuntu
aur/freetype2-ubuntu 2.5.2-7 [installed] (422)
I've got the following option in my pacman.conf file: Include = /etc/pacman.d/options/*.conf
The pacman.conf is according to the manpage correct and pacman works flawless.
$ man pacman.conf
[...]
Include = path
Include another configuration file. This file can include repositories or
general configuration options. Wildcards in the specified paths will get
expanded based on glob(7) rules.
[...]
But when I execute package-query
$ package-query [pkg]
Unable to open file: /etc/pacman.d/options/*.conf
$
After deleting the Include-line, it works correct.
AUR4 ( https://aur4.archlinux.org ) will be managed via git (see https://lists.archlinux.org/pipermail/aur-dev/2014-December/003013.html for details).
The API has changed :
https://aur4.archlinux.org/rpc.php?type=search&arg=yaourt-git
vs
https://aur.archlinux.org/rpc.php?type=search&arg=yaourt-git
package-query segfault because of missing fields…(%u for example)
➜ ~ package-query -1Aif '%u %v %o' --aur-url https://aur4.archlinux.org yaourt-git [1] 29073 segmentation fault (core dumped) package-query -1Aif '%u %v %o' --aur-url https://aur4.archlinux.org yaourt-git
aur.c:347:21: warning: ‘aur_pkg_get_pkgbase_id’ defined but not used [-Wunused-function]
static unsigned int aur_pkg_get_pkgbase_id (const aurpkg_t *pkg)
Not shown for cinnamon-screensaver-git
:
$ package-query -As cinnamon
...
aur/cinnamon-menus-git 27.50310b1-1 (0) (0.00)
Cinnamon menu specifications
aur/cinnamon-screensaver-git 119.8de7ff0-1 (4) (0.00)
aur/cinnamon-session-git 126.8c1b918-1 (4) (0.00)
The Cinnamon Session Handler
Shown here:
$ package-query -As cinnamon --nameonly
aur/cinnamon-menus-git 27.50310b1-1 (0) (0.00)
Cinnamon menu specifications
aur/cinnamon-screensaver-git 119.8de7ff0-1 (4) (0.00)
Screensaver for cinnamon desktop
aur/cinnamon-session-git 126.8c1b918-1 (4) (0.00)
The Cinnamon Session Handler
The sorting should be improved: "yaourt-git" should be put before "aurtab".
Maybe take into account the number of consequential characters matching the query (i.e. "yaourt-git" has 6 of those while "aurtab" only has 2)?
$ package-query -As yaourt --sort r
aur/yaourt 1.8.1-1 (2850) (55.15)
A pacman wrapper with extended features and AUR support
aur/aurtab 1-2 (12) (1.52)
AUR tab completion for yaourt and apacman using zsh.
aur/yaourt-git 1.8.1.r11.g153c1f3-1 [installed] (182) (5.94)
A pacman wrapper with extended features and AUR support
aur/yaourt-gui 1.5-2 (201) (5.74)
A bash GUI for yaourt
aur/safeaur 1.1.2-1 (2) (1.06)
safeaur is auto Backup and re-store System for yaourt.
aur/pacmind 2.5-4 (54) (1.08)
A gtkdialog frontend gui for the package manager, inspired to yaourt-gui
aur/pacmanxg 4.17.0-1 (7) (0.88)
Yet another GUI for pacman and yaourt. Depends on neither GTK or Qt: only X11
aur/pac_manage 1.4-1 (0) (0.00)
pacman/yaourt helper - manage packages in a single file
aur/yaourt-gui-manjaro 1.4.5-2 (16) (0.69)
A bash GUI for yaourt (Manjaro theming) and Romanian translation added
aur/lightspark-local 20120810-1 (0) (0.00)
My modified version of the lightspark-git PKGBUILD; Enhancements: choose between devel and normal buildtype, save
changes local even if you use yaourt
┌[txtsd@dungeon-of-data]─[~] [127] [16-11-07 10:59:22]
└─▶ package-query -AQ package-query
aur/package-query 1.8-2 [installed] (1133) (7.27)
package-query: symbol lookup error: /usr/lib/libcurl.so.4: undefined symbol: SSL_COMP_free_compression_methods
┌[txtsd@dungeon-of-data]─[~] [1] [16-11-07 11:14:50]
└─▶ yaourt -S yaourt
package-query: symbol lookup error: /usr/lib/libcurl.so.4: undefined symbol: SSL_COMP_free_compression_methods
package-query: symbol lookup error: /usr/lib/libcurl.so.4: undefined symbol: SSL_COMP_free_compression_methods
==> Downloading yaourt PKGBUILD from AUR...
curl: symbol lookup error: /usr/lib/libcurl.so.4: undefined symbol: SSL_COMP_free_compression_methods
==> ERROR: yaourt not found in AUR.
Can this be fixed?
The output does not look right - the AUR and sync db packages get mixed:
$ yaourt -Ss nemo --sort w
aur/mnemosyne 2.3.5-1 (67) (0.13)
A flash-card tool with a sophisticated card review algorithm
aur/nemo-dropbox 2.8.0-3 (47) (2.41)
Dropbox for Linux - Nemo extension
...
aur/otf-nemoy 20110513-2 (1) (0.00)
A font for space traveler.
community/cinnamon-translations 2.8.3-1 [installed]
Translations for Cinnamon and Nemo
...
community/nemo-share 2.8.0-3
Samba extension for Nemo
aur/nemo-qml-plugin-dbus-git 2.0.r97.c4d9847-1 (0) (0.00)
The Nemo Mobile D-Bus QML Plugin allows you to access services on the system and session bus, as well as provide
your own services.
...
Not sure exactly when this started happening (probably within the last few days), but I just noticed that I can't query AUR packages anymore.
$ package-query -A package-query
AUR error : Invalid query arguments
I noticed this when attempting to do a system upgrade with yaourt, which prints the same error message while checking the AUR for updates.
Only the AUR is affected by this. Querying local/sync packages still works fine:
$ package-query -Q package-query
local/package-query 1.6.2-1
EDIT: Just noticed that the AUR was down for maintenance while I was performing those commands. However, the AUR is back up now and I'm still seeing the same issue.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.