Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] i broke emerge
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
nickel
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 192
Location: Germany

PostPosted: Sat Sep 05, 2015 5:50 pm    Post subject: [SOLVED] i broke emerge Reply with quote

7hi everyone!

I did something pretty idiotic. I unemerged python-exec!!!!
I can't emerged anything and it also broke the system. Well, no wonder there.

I tried to fix it following this wiki.
It didn't work. Don't know why. I changed like suggesteddd DISTDIR, PORTDIR, etc, to point to my mounted gentoo, but the livecd still used its own portage.
I tried this post.
i can emerge apparently, but i got this:
Code:

# emerge --info
Error during set creation: Could not import 'portage._sets.ProfilePackageSet.ProfilePackageSet' for section 'profile'
Error during set creation: Could not import 'portage._sets.files.WorldSelectedPackagesSet' for section 'selected-packages'
Error during set creation: Could not import 'portage._sets.files.WorldSelectedSetsSet' for section 'selected-sets'
Error during set creation: Could not import 'portage._sets.dbapi.ChangedDepsSet' for section 'changed-deps'
Portage 2.2.8 (default/linux/amd64/13.0/desktop/kde/systemd, gcc-4.8.4, glibc-2.20-r2, 3.16.0-38-generic x86_64)
=================================================================
System uname: Linux-3.16.0-38-generic-x86_64-Intel-R-_Core-TM-_i7-2670QM_CPU_@_2.20GHz-with-gentoo-2.2
KiB Mem:     8157960 total,    678352 free
KiB Swap:    7560188 total,   7558404 free
Timestamp of tree: Sun, 30 Aug 2015 18:30:01 +0000
ld GNU ld (Gentoo 2.24 p1.4) 2.24
app-shells/bash:          4.3_p33-r2
dev-java/java-config:     2.2.0
dev-lang/perl:            5.20.2
dev-lang/python:          2.7.9-r1, 3.3.5-r1, 3.4.1
dev-util/cmake:           2.8.12.2-r1
dev-util/pkgconfig:       0.28-r2
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.13.11
sys-apps/sandbox:         2.6-r1
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.11.6-r1, 1.13.4, 1.14.1, 1.15
sys-devel/binutils:       2.24-r3
sys-devel/gcc:            4.8.4
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4.6
sys-devel/make:           4.1-r1
sys-kernel/linux-headers: 3.18 (virtual/os-headers)
sys-libs/glibc:           2.20-r2
Repositories: gentoo multimedia rebutia gnome sunrise lordvan betagarden java x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA Broadcom"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mno-avx -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.5/ext-active/ /etc/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/revdep-rebuild /etc/sandbox.d"
CXXFLAGS="-march=native -mno-avx -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="de_DE.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/multimedia /var/lib/layman/rebutia /var/lib/layman/gnome /var/lib/layman/sunrise /var/lib/layman/lordvan /var/lib/layman/betagarden /var/lib/layman/java /usr/local/portage"
USE="X a52 aac acl acpi alsa amd64 berkdb bluetooth bluray branding bzip2 cairo cdda cdr cli cracklib crypt cups cxx dbus declarative dri dts dvd dvdr emboss encode exif fam firefox flac fortran gdbm gif glamor gpm gtk iconv ipv6 jpeg kde kipi lcms ldap libnotify mad mmx mmxext mng modules mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qt3support qt4 readline sdl seccomp semantic-desktop session spell sse sse2 ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis wxwidgets x264 xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="64 32" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de en es" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby19 ruby20" USERLAND="GNU" VIDEO_CARDS="radeonhd radeon r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON



and it breaks:
Code:

...
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking for x86_64-pc-linux-gnu-gcc... x86_64-pc-linux-gnu-gcc
checking whether the C compiler works... no
configure: error: in `/var/tmp/portage/dev-lang/python-exec-2.0.1-r1/work/python-exec-2.0.1_build':
configure: error: C compiler cannot create executables
...

when i try gcc-config -l
Code:

 * gcc-config: Could not get portage CHOST!
 * gcc-config: You should verify that CHOST is set in one of these places:
 * gcc-config:  - //etc/portage/make.conf
 * gcc-config:  - active environment

so, i thought, i forgot to run source /etc/profile && env-update and i got this
Code:
/usr/sbin/env-update: no supported Python implementation variant found!


can i fix it? or it is beyond salvation and have to reinstall the whole system?


Last edited by nickel on Wed Sep 09, 2015 1:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
hasufell
Retired Dev
Retired Dev


Joined: 29 Oct 2011
Posts: 429

PostPosted: Sat Sep 05, 2015 6:07 pm    Post subject: Re: i broke emerged Reply with quote

nickel wrote:
I tried to fix it following this wiki.
It didn't work. Don't know why. I changed like suggesteddd DISTDIR, PORTDIR, etc, to point to my mounted gentoo, but the livecd still used its own portage.

I'm not sure I can follow. The livecd is _supposed_ to use its own portage. You use the livecd portage version to install a new portage into the chroot environment.

Please be more specific about what you did and what didn't work.
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Sat Sep 05, 2015 6:11 pm    Post subject: Reply with quote

Quote:
I unemerged python-exec!!!!


http://unix.stackexchange.com/questions/47290/accidentally-removed-dev-libs-mpc-from-gentoo
Quote:
3
down vote


Phew, not so bad after all. Recording here for posterity, and for the next time I do this.

edit make.conf, add the line: PORTAGE_BINHOST="http://tinderbox.dev.gentoo.org/default-linux/amd64/"
sync the new repo: emerge --sync
install binary version: emerge -av --binpkgonly --usepkgonly dev-libs/mpc
compile source version: emerge -av dev-libs/mpc



should be similar afaik. ... you need to search for the binary host ...

and just pull back that pyton-exec. and you may also find a clue what it does when you look at the ebuild and try to do it by hand ...
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Sat Sep 05, 2015 6:20 pm    Post subject: Reply with quote

I wrote you a personal message ...


So it should be only this when only python-exec is the issue.
Code:
ls -alh /usr/lib/python-exec/python-exec2-c
-rwxr-xr-x 1 root root 8,1K Sep  5 20:16 /usr/lib/python-exec/python-exec2-c


[code]make[1]: Leaving directory '/var/tmp/portage/dev-lang/python-exec-2.0.2/work/python-exec-2.0.2_build'
>>> Completed installing python-exec-2.0.2 into /var/tmp/portage/dev-lang/python-exec-2.0.2/image/

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment -R .GCC.command.line -R .note.gnu.gold-version
usr/lib/python-exec/python-exec2-c
ecompressdir: bzip2 -9 /usr/share/doc

>>> Installing (1 of 1) dev-lang/python-exec-2.0.2::gentoo

>>> Recording dev-lang/python-exec in "world" favorites file...
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

* GNU info directory index is up-to-date.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54908
Location: 56N 3W

PostPosted: Sat Sep 05, 2015 6:30 pm    Post subject: Reply with quote

nickel,

Its very difficult to break Gentoo so badly that a reinstall is the only way to fix it.
unemerging python-exec is not one of the ways.

This thread will help and you don't even need a BINHOST, as you might if you removed glibc or gcc.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
nickel
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 192
Location: Germany

PostPosted: Sun Sep 06, 2015 3:58 pm    Post subject: Re: i broke emerged Reply with quote

hasufell wrote:
nickel wrote:
I tried to fix it following this wiki.
It didn't work. Don't know why. I changed like suggesteddd DISTDIR, PORTDIR, etc, to point to my mounted gentoo, but the livecd still used its own portage.

I'm not sure I can follow. The livecd is _supposed_ to use its own portage. You use the livecd portage version to install a new portage into the chroot environment.

Please be more specific about what you did and what didn't work.

you're right. Sorry about that!

If i understand correctly, the whole idea of that wiki, was to re-emerged portage in the broken system.
Using a livecd with portage, it should be achieved by changing some global variable to emerge in /dev/sda5 (my system, which is mounted in /mnt/gentoo).
But it doesn't work. No idea why. The vars are correctly changed
Back to top
View user's profile Send private message
hasufell
Retired Dev
Retired Dev


Joined: 29 Oct 2011
Posts: 429

PostPosted: Sun Sep 06, 2015 4:15 pm    Post subject: Re: i broke emerged Reply with quote

nickel wrote:
But it doesn't work. No idea why. The vars are correctly changed

That's not a useful error description. What does not work? Did you re-emerge python-exec in the same way?
Back to top
View user's profile Send private message
nickel
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 192
Location: Germany

PostPosted: Sun Sep 06, 2015 4:50 pm    Post subject: Reply with quote

NeddySeagoon wrote:
nickel,

Its very difficult to break Gentoo so badly that a reinstall is the only way to fix it.
unemerging python-exec is not one of the ways.

This thread will help and you don't even need a BINHOST, as you might if you removed glibc or gcc.


i followed that post, but i got some problems:
Code:

 # /usr/lib64/python-exec/python2.7/emerge -av1 dev-lang/python-exec

 * IMPORTANT: 21 news items need reading for repository 'gentoo'.
 * Use eselect news read to view new items.


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

Calculating dependencies... done!
[ebuild  N     ] dev-lang/python-exec-2.0.1-r1:2::gentoo  PYTHON_TARGETS="(jython2_5) (jython2_7) (pypy) (pypy3) (python2_7) (python3_3) (python3_4)" 0 KiB

Total: 1 package (1 new), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) dev-lang/python-exec-2.0.1-r1::gentoo
[dev-lang/python-exec-2.0.1-r1] bash: /usr/lib/portage/python2.7/ebuild.sh: No such file or directory
/bin/bash: /usr/lib/portage/python2.7/misc-functions.sh: No such file or directory
 * The ebuild phase 'die_hooks' has exited unexpectedly. This type of
 * behavior is known to be triggered by things such as failed variable
 * assignments (bug #190128) or bad substitution errors (bug #200313).
 * Normally, before exiting, bash should have displayed an error message
 * above. If bash did not produce an error message above, it's possible
 * that the ebuild has called `exit` when it should have called `die`
 * instead. This behavior may also be triggered by a corrupt bash binary or
 * a hardware problem such as memory or cpu malfunction. If the problem is
 * not reproducible or it appears to occur randomly, then it is likely to
 * be triggered by a hardware problem. If you suspect a hardware problem
 * then you should try some basic hardware diagnostics such as memtest.
 * Please do not report this as a bug unless it is consistently
 * reproducible and you are sure that your bash binary and hardware are
 * functioning properly.

>>> Failed to emerge dev-lang/python-exec-2.0.1-r1

 * Messages for package dev-lang/python-exec-2.0.1-r1:


what can i do?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54908
Location: 56N 3W

PostPosted: Sun Sep 06, 2015 5:15 pm    Post subject: Reply with quote

nickel,

/usr/lib/portage/python2.7/ebuild.sh: No such file or directory
Do you really not have that file?

Portage works with Python 3 too.

You can try
Code:
/usr/lib64/python-exec/python<ver>/emerge -av1 dev-lang/python-exec

Where <ver> is a version of Python that you do have.

If /usr/lib/portage/python2.7/ebuild.sh is missing, it looks like you did more than remove python-exec
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
nickel
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 192
Location: Germany

PostPosted: Sun Sep 06, 2015 5:41 pm    Post subject: Reply with quote

NeddySeagoon wrote:
nickel,

/usr/lib/portage/python2.7/ebuild.sh: No such file or directory
Do you really not have that file?

Portage works with Python 3 too.

You can try
Code:
/usr/lib64/python-exec/python<ver>/emerge -av1 dev-lang/python-exec

Where <ver> is a version of Python that you do have.

If /usr/lib/portage/python2.7/ebuild.sh is missing, it looks like you did more than remove python-exec

don't kill me. I forgot to mention, i used this wiki as well, after the first one didn't work. But i didn't remove anything in /usr/lib/portage/ only in /usr/lib64/portage/. Perhaps can i do a symbolink link back to /usr/lib/portage?
No matter what version i use, i still got the same error.
Back to top
View user's profile Send private message
nickel
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 192
Location: Germany

PostPosted: Sun Sep 06, 2015 5:49 pm    Post subject: Re: i broke emerged Reply with quote

hasufell wrote:
nickel wrote:
But it doesn't work. No idea why. The vars are correctly changed

That's not a useful error description. What does not work? Did you re-emerge python-exec in the same way?

the problem is, it still uses its own DISTDIR, PORTDIR, PKGDIR, ... and not the ones i "changed". So, t emerges in the livecd, not in /mnt/gentoo
Back to top
View user's profile Send private message
hasufell
Retired Dev
Retired Dev


Joined: 29 Oct 2011
Posts: 429

PostPosted: Sun Sep 06, 2015 7:40 pm    Post subject: Re: i broke emerged Reply with quote

nickel wrote:
hasufell wrote:
nickel wrote:
But it doesn't work. No idea why. The vars are correctly changed

That's not a useful error description. What does not work? Did you re-emerge python-exec in the same way?

the problem is, it still uses its own DISTDIR, PORTDIR, PKGDIR, ... and not the ones i "changed". So, t emerges in the livecd, not in /mnt/gentoo

try
Code:
emerge --root=/mnt/gentoo --config-root=/mnt/gentoo -v1 portage python-exec
Back to top
View user's profile Send private message
nickel
Apprentice
Apprentice


Joined: 21 Oct 2005
Posts: 192
Location: Germany

PostPosted: Wed Sep 09, 2015 1:00 pm    Post subject: Re: i broke emerged Reply with quote

hasufell wrote:
nickel wrote:
hasufell wrote:
nickel wrote:
But it doesn't work. No idea why. The vars are correctly changed

That's not a useful error description. What does not work? Did you re-emerge python-exec in the same way?

the problem is, it still uses its own DISTDIR, PORTDIR, PKGDIR, ... and not the ones i "changed". So, t emerges in the livecd, not in /mnt/gentoo

try
Code:
emerge --root=/mnt/gentoo --config-root=/mnt/gentoo -v1 portage python-exec

that worked! thx!
turned out, i have to emerge python, gcc as well.
running emerge -avuDNe system right now :D
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