Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Improvements to equery
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Wed Jan 30, 2013 12:51 pm    Post subject: Improvements to equery Reply with quote

In the beginning was equery 0.1.4, written by Karl Trygve Kalleberg,
which searched the portage tree for matching package names:
Code:

equery list man-page
   * installed packages
  sys-apps/man-pages-3.23
  sys-apps/man-pages-posix-2003a

Then it was improved to the current equery 0.3.07, with explicit wild-cards:
Code:

equery list \*man-page\*
  !!! Invalid CPV: '*man-page*'

There were problems with the pattern matching, which couldn't handle
entries with '-', but there's a patch for that somewhere in the archives
and I finally got annoyed enough by inadmissable searches to add it:
Code:

equery list \*man-page\*
  sys-apps/man-pages-3.44
  sys-apps/man-pages-posix-2003a

Then equery started detecting invalid package names; a really good idea,
except that one way of temporarily keeping local overlay entries out of
the way of emerge is, you've guessed it, renaming them:
Code:

equery list -p \*man-page\*
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.4.5.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-3.1.1-r2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.4.6-r1.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-3.2.3-r4.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.1.2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.4.3-r3.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.6.1-r1.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-3.3.6-r1.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.5.1-r1.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-3.2.2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.5.2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.3.6-r1.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.2.4-r1.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.5.3-r1.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.0.4.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-2.95.3-r9.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.3.4.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-2.95.3-r10.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.3.3-r2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-3.4.6-r2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.3.5.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.6.0.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.6.2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.4.4-r2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.4.2.ebuild
  Invalid ebuild name: /usr/local/portage/sys-devel/gcc.org/gcc-4.5.3-r2.ebuild

  app-i18n/man-pages-da-0.1.2
  app-i18n/man-pages-de-0.8
  app-i18n/man-pages-de-0.12
  app-i18n/man-pages-fr-2.39.0
  app-i18n/man-pages-it-2.65
  app-i18n/man-pages-it-2.80
  app-i18n/man-pages-ja-20070515
  app-i18n/man-pages-ja-20101110
  ... etc

But being intelligent as well as beautiful I soon found a way around the problem:
Code:

equery list -p \*man-page\* 2>/dev/null
  sys-apps/man-pages-3.28
  sys-apps/man-pages-3.29
  sys-apps/man-pages-3.30
  sys-apps/man-pages-3.31
  sys-apps/man-pages-3.32
   ... etc

So finally, after a lot of work by skilled developers, we have an equery
that is only slightly more inconvenient than the original.

Excuse me, but I'm off to write a quick and simple Portage tree scanner...


Will
Back to top
View user's profile Send private message
FuzzyRay
Retired Dev
Retired Dev


Joined: 02 Oct 2003
Posts: 79

PostPosted: Thu Jan 31, 2013 5:43 pm    Post subject: Reply with quote

Have you looked at app-portage/portage-utils?
Back to top
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 9530
Location: beyond the rim

PostPosted: Fri Feb 01, 2013 9:53 am    Post subject: Reply with quote

To put things into perspective, half of those "problems" were caused by changes in portage, not equery.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Fri Feb 01, 2013 10:23 am    Post subject: Reply with quote

They could also use something like porthole, that is if it being run from within X.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum