Giter Club home page Giter Club logo

package-query's People

Contributors

benoitzugmeyer avatar egormanga avatar f2404 avatar goreliu avatar larchunix avatar puckel avatar skunnyk avatar tuxce avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

package-query's Issues

Support querying AUR git URL

'%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)

Order when sorting results by votes?

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.

Invalid versions are shown with upgrade queries

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.

curl error causes infinite loop when searching in AUR by maintainer

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
...

Support for pacman .files databases

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

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

pacman < 1.4.2 ?

Il est partout noté avec une dépendance vers pacman < 1.4.2, est-ce nécessaire ?

Query makedepends option.

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.

curl: option -/extra.abs.tar.gz: is unknown curl: try 'curl --help' or 'curl --manual' for more information

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

Querying the local database is sometimes slow

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.

Sort search results by relevance

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.

Support AUR RPC version 5: search by name

'&by=field' parameter has been added:

  • name (search by package name only)
  • name-desc (search by package name and description) - default
  • maintainer (search by package maintainer)

Need to revise the --nameonly option implementation.

Foreign packages: \ NN / NN

@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

PQ_COLORS entrf for 'popularity'

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).

/usr/lib/yaourt/util.sh

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]

util.sh.txt

Package query segfault

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

The URL https://www.archlinux.org/packages/(null)/(null)/(null)/json/ returned error : 404

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 ~]$ 

@f2404

An issue with pacman 4.2.0-6

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.

Print size and date when using "--sort"?

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.

Segfault when format_out leads to empty out

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.

Error when using yaourt

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!

format_str(char *s) crashes on some input strings

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?

Add ability to request package's supported architectures list from AUR

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>.

Use .SRCINFO instead of PKGBUILD for pkgbase e.a. querying

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 OutOfDate flag is broken

The AUR OutOfDate flag is not recognized:

$ ./src/package-query -As freetype ubuntu
aur/freetype2-ubuntu 2.5.2-7 [installed] (422)

package-query cannot handle globs in Include

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.

Be compatible with AUR 4

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

Add format flag for pkgbase_id

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)

Package description is not shown sometimes in search results

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

Improve sorting results by relevance

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

Symbol lookup error in libcurl when using libressl

┌[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?

Search output when sorted by AUR only parameter (e.g. votes)

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.
...

Can't query AUR packages

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.