First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 41093
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Karl Trygve Kalleberg (RETIRED) <karltk@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Andre Hinrichs <andre.hinrichs@gmx.de>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
equery.patch Patch for equery (gentoolkit-0.2.0-pre8) to handle missing ebuild exceptions patch Craig Lawson 2004-04-20 01:06 0000 1.39 KB Details | Diff
gentoolkit.patch Patch for gentoolkit.py (gentoolkit-0.2.0-pre8) for package lookup patch Craig Lawson 2004-04-21 15:06 0000 652 bytes Details | Diff
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 41093 depends on: Show dependency tree
Bug 41093 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2004-02-10 03:30 0000
The 'equery list' command fails to work on packages where the ebuild scripts
has been deleted. In my case this occures with gentoo-dev-sources because old
versions are not deleted when a new version is installed.


Reproducible: Always
Steps to Reproduce:
1. install a package
2. wait a few days until this ebuild has been deleted or delete it manually
3. try 'equery list' on this package

Actual Results:  
Script fails with the following error:

Searching for package 'gentoo-dev-sources' in all categories among:
 * installed packages
[I--] [  ] sys-kernel/gentoo-dev-sources-2.6.1-r1 (2.4.23-grsec-1.9.13)
!!! aux_get(): ebuild for 'sys-kernel/gentoo-dev-sources-2.6.1' does not exist
at:
!!!           
/usr/portage/sys-kernel/gentoo-dev-sources/gentoo-dev-sources-2.6.1.ebuild
Traceback (most recent call last):
  File "/usr/bin/equery", line 936, in ?
    if string.find(e[0], "Specific key requires operator") == 0:
IndexError: tuple index out of range


Expected Results:  
Should work even with missing ebuilds


Portage 2.0.50-r1 (default-x86-1.4, gcc-3.3.2, glibc-2.3.2-r9,
2.4.22-gentoo-r5)
=================================================================
System uname: 2.4.22-gentoo-r5 i686 Pentium III (Coppermine)
Gentoo Base System version 1.4.3.13
distcc 2.11.1 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632)
[enabled]
Autoconf: sys-devel/autoconf-2.58
Automake: sys-devel/automake-1.7.7
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O3 -march=i686 -funroll-loops -pipe"
CHOST="i686-pc-linux-gnu"
COMPILER="gcc3"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config
/usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/
/var/bind /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d"
CXXFLAGS="-O3 -march=i686 -funroll-loops -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs ccache distcc sandbox"
GENTOO_MIRRORS="http://www.mirror.ac.uk/sites/www.ibiblio.org/gentoo/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY=""
SYNC="rsync://192.168.68.1/gentoo-portage"
USE="X Xaw3d aalib alsa apache2 apm arts avi berkdb bonobo cdr crypt cups curl
dvd emacs encode esd flash foomaticdb gd gdbm ggi gif gnome gpm gtk gtk2
gtkhtml
guile imlib java jpeg kde lcms ldap libg++ libwww mad mikmod motif mozilla mpeg
mysql ncurses nls oggvorbis opengl oss pam pdflib perl png python qt quicktime
readline sdl slang spell ssl svga tcltk tcpd tetex tiff truetype usb wmf x86
xml
xml2 xmms xv zlib"

------- Comment #1 From Marius Mauch (RETIRED) 2004-03-13 03:03:43 0000 -------
It doesn't traceback any longer in pre7, but the "missing ebuild" message is a
portage thing and hard to work around.

------- Comment #2 From alex f 2004-03-20 12:02:40 0000 -------
Well, pre7 traces back as well for me. I stumbled over this bug while doing:

$ equery -q list \*
!!! aux_get(): ebuild for 'dev-util/subversion-0.26.0' does not exist at:
!!!            /usr/portage/dev-util/subversion/subversion-0.26.0.ebuild
Traceback (most recent call last):
  File "/usr/bin/equery", line 949, in ?
    if e and type(e[0]) == types.ListType and \
IndexError: tuple index out of range
134

the aquivalent of 'qpkg -I'

$ equery list gentoolkit
Searching for package 'gentoolkit' in all categories among:
 * installed packages
[I--] [  ] app-portage/gentoolkit-0.2.0_pre7 (0)

------- Comment #3 From Craig Lawson 2004-04-20 01:02:06 0000 -------
Does for me, too, in gentoolkit-0.2.0_pre8.

The equery's depgraph function has the same problem.

Although the missing ebuild message (as was stated) comes from the portage module, the unhandled exception can be dealt with in equery. The following patch does just that.

------- Comment #4 From Craig Lawson 2004-04-20 01:06:08 0000 -------
Created an attachment (id=29681) [details]
Patch for equery (gentoolkit-0.2.0-pre8) to handle missing ebuild exceptions

Patch catches KeyError exceptions raised by portage module when it discovers a
missing ebuild. Although portage has already printed a warning (too bad), this
patch allows equery to recover and continue rather than crash.

To apply patch:
1. cd to same directory as equery file
2. "patch -p0 < [patch-file]

------- Comment #5 From Craig Lawson 2004-04-21 15:06:29 0000 -------
Created an attachment (id=29777) [details]
Patch for gentoolkit.py (gentoolkit-0.2.0-pre8) for package lookup

Fixes the gentoolkit module so that when retrieving environment variable data
from an ebuild, it first checks portage's installed packages database. If the
package is not installed, the data instead comes from the available packages
database. Previous behavior was to only check the available packages database,
and this was a problem when the package was so old that it's ebuild had been
removed from the list of available packages.

Other gentoolkit utilities affected by this change are:
  * etcat's graph (-g) function. Seems to work better with patch.
  * etcat's depends (-d) function. Broken before; no change.
  * equery's list function. No longer prints warning for missing ebuild.
  * equery's depgraph function. No longer prints warning for missing ebuild,
    *and* completes the entire tree.

This patch is to be used with my previous patch for equery.

To apply patch:
1. cd to same directory as gentoolkit.py file
2. "patch -p0 < [patch-file]

------- Comment #6 From Karl Trygve Kalleberg (RETIRED) 2004-08-28 03:03:56 0000 -------
Will look at it.

------- Comment #7 From Karl Trygve Kalleberg (RETIRED) 2004-09-01 14:08:31 0000 -------
Fixed in CVS. Will be part of the next Gentoolkit release.

First Last Prev Next    No search results available      Search page      Enter new bug