Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 199665 - sys-apps/portage-2.2.00.8523: emerge -uDNavt not working
Summary: sys-apps/portage-2.2.00.8523: emerge -uDNavt not working
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Gentoo non-Linux Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-19 15:34 UTC by Jakob Dettner
Modified: 2007-11-21 20:09 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (x86 system) (emerge-info.txt,2.34 KB, text/plain)
2007-11-19 17:33 UTC, Jeremy Olexa (darkside) (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Dettner 2007-11-19 15:34:38 UTC
emerge seems to have a problem with the 'tree' (-t) view in combination with the 'deep' (-D) option.

Same problem with 2.2.00.8515 and 

Reproducible: Always

Steps to Reproduce:
test: emerge -uDNavt world

Actual Results:  
% emerge --version                                                                                                         348 1 ttys005 ~ jdettner@localhost 07-11-19 16:33:14
Portage 2.2.00.8523-prefix (default-prefix/darwin/macos/10.5/x86, gcc-4.0.1, unavailable, 9.1.0 i386)
% emerge -uDNavt world                                                                                                     348 1 ttys005 ~ jdettner@localhost 07-11-19 16:33:18

These are the packages that would be merged, in reverse order:

Calculating dependencies... done!
Traceback (most recent call last):
  File "/Users/jdettner/Gentoo/usr/bin/emerge", line 18, in <module>
    retval = _emerge.emerge_main()
  File "/Users/jdettner/Gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 7176, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/Users/jdettner/Gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 6475, in action_build
    favorites=favorites)
  File "/Users/jdettner/Gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 3579, in display
    repoadd = repo_display.repoStr(repo_path_real)
  File "/Users/jdettner/Gentoo/usr/lib/portage/pym/_emerge/__init__.py", line 3974, in repoStr
    real_index = self._repo_paths_real.index(repo_path_real)
ValueError: list.index(x): x not in list
1 %                                                                                                                        349 1 ttys005 ~ jdettner@localhost 07-11-19 16:33:24
Comment 1 Jakob Dettner 2007-11-19 15:42:30 UTC
Portage 2.2.00.8523-prefix (default-prefix/darwin/macos/10.5/x86, gcc-4.0.1, unavailable, 9.1.0 i386)
=================================================================
System uname: 9.1.0 i386 i386
Timestamp of tree: Mon, 19 Nov 2007 12:13:51 +0000
distcc 2.18.5-Apple.1 powerpc-apple-darwin9.0 (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p17-r1
dev-lang/python:     2.5.1-r4
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
ACCEPT_KEYWORDS="x86-macos ~x86-macos"
CBUILD="i686-apple-darwin9"
CFLAGS="-O2 -pipe -march=prescott"
CHOST="i686-apple-darwin9"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=prescott"
DISTDIR="/Users/jdettner/Gentoo/usr/portage/distfiles"
EPREFIX="/Users/jdettner/Gentoo"
FEATURES="collision-protect distlocks metadata-transfer nostrip sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="UTF-8"
PKGDIR="/Users/jdettner/Gentoo/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/Users/jdettner/Gentoo/var/tmp"
PORTDIR="/Users/jdettner/Gentoo/usr/portage"
PORTDIR_OVERLAY="/Users/jdettner/Gentoo/usr/portage/local/layman/prefix-users"
SYNC="svn+http://overlays.gentoo.org/svn/proj/alt/trunk/prefix-overlay"
USE="aqua coreaudio cracklib ipv6 midi mmx mmxext ncurses nls objc objc++ prefix readline sse sse2 ssl unicode x86-macos zlib" ELIBC="Darwin" INPUT_DEVICES="keyboard mouse" KERNEL="Darwin" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2007-11-19 15:44:01 UTC
This happens on x86 hardware as well - NOT OSX specific. Problem is as far back as 8280.
Comment 3 Fabian Groffen gentoo-dev 2007-11-19 16:35:26 UTC
zmedico, got an idea on this?
Comment 4 Zac Medico gentoo-dev 2007-11-19 17:26:20 UTC
I(In reply to comment #1)
> PORTDIR="/Users/jdettner/Gentoo/usr/portage"
> PORTDIR_OVERLAY="/Users/jdettner/Gentoo/usr/portage/local/layman/prefix-users"

Just a guess, but it looks like it might be getting confused by the fact that PORTDIR_OVERLAY is nested inside of PORTDIR.
Comment 5 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2007-11-19 17:32:07 UTC
(In reply to comment #4)
> Just a guess, but it looks like it might be getting confused by the fact that
> PORTDIR_OVERLAY is nested inside of PORTDIR.

That is not the case on my prefix, however, same error. I will attach my emerge --info. 

Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2007-11-19 17:33:19 UTC
Created attachment 136409 [details]
emerge --info (x86 system)
Comment 7 Marius Mauch (RETIRED) gentoo-dev 2007-11-19 18:46:51 UTC
Does this also happen with a non-prefix portage version?
Comment 8 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2007-11-19 18:57:28 UTC
(In reply to comment #7)
> Does this also happen with a non-prefix portage version?

Portage 2.1.3.* works fine in a non-prefix env but maybe someone else can chime in about 2.2.* in a non-prefix env. 
Comment 9 Fabian Groffen gentoo-dev 2007-11-21 19:58:35 UTC
I added two prints right before where it goes wrong, one to print repo_path_real and one to print the list:

/private/var/automount/nfs/ra/export/gentoo/prefix-tree
['/private/var/automount/nfs/ra/export/gentoo/prefix-tree', '/private/var/automount/nfs/ra/export/gentoo/gnustep-overlay/prefix-overlay', 'http://tinderbox.dev.gentoo.org/default-prefix/darwin/macos/10.4/ppc/']
/private/var/automount/nfs/ra/export/gentoo/prefix-tree
['/private/var/automount/nfs/ra/export/gentoo/prefix-tree', '/private/var/automount/nfs/ra/export/gentoo/gnustep-overlay/prefix-overlay', 'http://tinderbox.dev.gentoo.org/default-prefix/darwin/macos/10.4/ppc/']
gentoo_prefix
['/private/var/automount/nfs/ra/export/gentoo/prefix-tree', '/private/var/automount/nfs/ra/export/gentoo/gnustep-overlay/prefix-overlay', 'http://tinderbox.dev.gentoo.org/default-prefix/darwin/macos/10.4/ppc/']

It fails with the last one for obvious reasons.  I have yet to find out why it has the repo_name file contents there instead of the path to the tree.
Comment 10 Fabian Groffen gentoo-dev 2007-11-21 20:06:58 UTC
problem is introduced here:

line 3339 of _emerge/__init__.py:
                if pkg_type == "ebuild":
                    ebuild_path = portdb.findname(pkg_key)
                    if not ebuild_path: # shouldn't happen
                        raise portage.exception.PackageNotFound(pkg_key)
                    repo_path_real = os.path.dirname(os.path.dirname(
                        os.path.dirname(ebuild_path)))
                    pkgsettings.setcpv(pkg_key, mydb=mydbapi)
                    metadata["USE"] = pkgsettings["USE"]
                else:
                    repo_path_real = repo_name

It falls in the "else" case, because pkg_type == "installed".

trunk has
  repo_path_real = portdb.getRepositoryPath(repo_name)
here, so I guess I missed a patch/hunk or merged wrongly.
Comment 11 Fabian Groffen gentoo-dev 2007-11-21 20:09:41 UTC
Fixed in revision 8591