Jump to content
Read the Funtoo Newsletter: Summer 2023 ×
  • 0

Sync on system not updated in a while... Not good!


dkg

Question

I have a system that hasn't been updated in a few months.  I know it was updated to kits, but not yet to 1.2, which is what I was fixing to do today.  Started with 'ego sync', which had an error.  At that point profiles seemed to be trashed (0-length parent file), and various [ignorant] efforts to recover did not work out.  Where do I need to start?

[root@wolfie 61% backup-parts]# ego sync
Syncing meta-repo
remote: Enumerating objects: 200, done.
remote: Counting objects: 100% (200/200), done.
remote: Compressing objects: 100% (101/101), done.
remote: Total 1073 (delta 102), reused 195 (delta 98), pack-reused 873
Receiving objects: 100% (1073/1073), 161.63 KiB | 241.00 KiB/s, done.
Resolving deltas: 100% (362/362), completed with 20 local objects.
From https://github.com/funtoo/meta-repo
   ef81bf6..fb458da  master     -> origin/master
M       kits/core-hw-kit
M       kits/core-kit
M       kits/desktop-kit
M       kits/dev-kit
M       kits/editors-kit
M       kits/games-kit
M       kits/gnome-kit
M       kits/haskell-kit
M       kits/java-kit
M       kits/kde-kit
M       kits/lang-kit
M       kits/media-kit
M       kits/net-kit
M       kits/nokit
M       kits/php-kit
M       kits/python-kit
M       kits/ruby-kit
M       kits/science-kit
M       kits/text-kit
M       kits/xorg-kit
Already on 'master'
Your branch is behind 'origin/master' by 265 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
HEAD is now at ef81bf6 kit updates
Skipping repository kits/python-modules-kit/
remote: Enumerating objects: 34, done.
remote: Counting objects: 100% (34/34), done.
remote: Compressing objects: 100% (25/25), done.
remote: Total 34 (delta 10), reused 33 (delta 9), pack-reused 0
Unpacking objects: 100% (34/34), done.
From https://github.com/funtoo/meta-repo
 * [new branch]      1.3-release -> origin/1.3-release
Updating ef81bf6..fb458da
Fast-forward
 metadata/kit-info.json | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------
 metadata/kit-sha1.json |  79 +++++++++++++++++++++++-----------------------------------
 metadata/version.json  |   3 +++
 3 files changed, 152 insertions(+), 118 deletions(-)
 create mode 100644 metadata/version.json
Traceback (most recent call last):
  File "/usr/bin/ego", line 120, in <module>
    EgoModule.run_ego_module(action, econfig, args, VERSION)
  File "/usr/share/ego/python/ego/module.py", line 101, in run_ego_module
    ego_module(*args)
  File "/usr/share/ego/python/ego/module.py", line 86, in __call__
    self.handle()
  File "/usr/share/ego/modules/sync.ego", line 324, in handle
    self.sync_meta_repo()
  File "/usr/share/ego/modules/sync.ego", line 259, in sync_meta_repo
    success = self.sync_kit(kt, self.kits_root, branch=branch)
  File "/usr/share/ego/modules/sync.ego", line 53, in sync_kit
    branch = self.config.kit_info_metadata["kit_settings"][kit_name]["default"]
KeyError: 'default'
[root@wolfie 61% backup-parts]# epro update
Updating profiles at /etc/portage/make.profile/parent...
Traceback (most recent call last):
  File "/usr/bin/epro", line 120, in <module>
    EgoModule.run_ego_module(action, econfig, args, VERSION)
  File "/usr/share/ego/python/ego/module.py", line 101, in run_ego_module
    ego_module(*args)
  File "/usr/share/ego/modules/profile.ego", line 312, in __call__
    super().__call__(*args)
  File "/usr/share/ego/python/ego/module.py", line 86, in __call__
    self.handle()
  File "/usr/share/ego/modules/profile.ego", line 293, in handle
    handler()
  File "/usr/share/ego/modules/profile.ego", line 129, in handle_write
    self.tree.write(self.config, outfile)
  File "/usr/share/ego/python/ego/profile.py", line 449, in write
    python_kit_branch = config.get_configured_kit("python-kit")
  File "/usr/share/ego/python/ego/config.py", line 75, in get_configured_kit
    default = self.kit_info_metadata["kit_settings"][kit]["default"]
KeyError: 'default'
[root@wolfie 61% backup-parts]# ego config
Traceback (most recent call last):
  File "/usr/bin/ego", line 120, in <module>
    EgoModule.run_ego_module(action, econfig, args, VERSION)
  File "/usr/share/ego/python/ego/module.py", line 101, in run_ego_module
    ego_module(*args)
  File "/usr/share/ego/python/ego/module.py", line 86, in __call__
    self.handle()
  File "/usr/share/ego/modules/config.ego", line 66, in handle
    handler()
  File "/usr/share/ego/modules/config.ego", line 12, in handle_get_action
    val = self.config.get_setting(self.options.section[0], self.options.key[0], default="")
AttributeError: 'Namespace' object has no attribute 'section'
[root@wolfie 61% portage]# cd /var/tmp
[root@wolfie 61% tmp]# git clone https://github.com/funtoo/ego.git
Cloning into 'ego'...
remote: Enumerating objects: 347, done.
remote: Counting objects: 100% (347/347), done.
remote: Compressing objects: 100% (231/231), done.
remote: Total 2635 (delta 237), reused 211 (delta 110), pack-reused 2288
Receiving objects: 100% (2635/2635), 670.85 KiB | 274.00 KiB/s, done.
Resolving deltas: 100% (1493/1493), done.
[root@wolfie 61% tmp]# cd ego
[root@wolfie 61% ego]# ego sync
Syncing meta-repo
M       kits/core-hw-kit
M       kits/core-kit
M       kits/desktop-kit
M       kits/dev-kit
M       kits/editors-kit
M       kits/games-kit
M       kits/gnome-kit
M       kits/haskell-kit
M       kits/java-kit
M       kits/kde-kit
M       kits/lang-kit
M       kits/media-kit
M       kits/net-kit
M       kits/nokit
M       kits/php-kit
M       kits/python-kit
M       kits/science-kit
M       kits/text-kit
M       kits/xorg-kit
Already on 'master'
Your branch is up to date with 'origin/master'.
HEAD is now at fb458da kit updates
Skipping repository kits/python-modules-kit/
Already up to date.
Traceback (most recent call last):
  File "/usr/bin/ego", line 120, in <module>
    EgoModule.run_ego_module(action, econfig, args, VERSION)
  File "/usr/share/ego/python/ego/module.py", line 101, in run_ego_module
    ego_module(*args)
  File "/usr/share/ego/python/ego/module.py", line 86, in __call__
    self.handle()
  File "/usr/share/ego/modules/sync.ego", line 324, in handle
    self.sync_meta_repo()
  File "/usr/share/ego/modules/sync.ego", line 259, in sync_meta_repo
    success = self.sync_kit(kt, self.kits_root, branch=branch)
  File "/usr/share/ego/modules/sync.ego", line 53, in sync_kit
    branch = self.config.kit_info_metadata["kit_settings"][kit_name]["default"]
KeyError: 'default'
[root@wolfie 61% make.profile.old]# epro list

=== arch: ===

    arm-32bit, arm-64bit, pure64, x86-32bit, x86-64bit

=== build: ===

    current, experimental, stable

=== subarch: ===

    None available
=== flavor: ===

    core, desktop, hardened, minimal, server, workstation

=== mix-ins: ===

    X, audio, cinnamon, console-extras, dvd, gfxcard-intel-glamor
    gnome, gnome-3.16-fixups, hardened, kde, kde-plasma-5, lxde
    lxqt, mate, media, media-pro, mediadevice-audio-consumer, mediadevice-audio-pro
    mediadevice-base, mediadevice-video-consumer, mediadevice-video-pro
    mediaformat-audio-common, mediaformat-audio-extra, mediaformat-gfx-common
    mediaformat-gfx-extra, mediaformat-video-common, mediaformat-video-extra
    no-emul-linux-x86, no-systemd, openvz-host, print, python3-only
    selinux, vmware-guest, xfce

WARNING: No arch defined. Please set.
WARNING: No build defined. Please set.
WARNING: No flavor defined. Please set.
[root@wolfie 61% make.profile.old]# epro arch x86-64bit
WARNING: None

=== Enabled Profiles: ===

        arch: x86-64bit
       build: (not set)
     subarch: (not set)
      flavor: (not set)
     mix-ins: (not set)

>>> Set arch to x86-64bit.
WARNING: No build defined. Please set.
WARNING: No flavor defined. Please set.
Updating profiles at /etc/portage/make.profile/parent...
Traceback (most recent call last):
  File "/usr/bin/epro", line 120, in <module>
    EgoModule.run_ego_module(action, econfig, args, VERSION)
  File "/usr/share/ego/python/ego/module.py", line 101, in run_ego_module
    ego_module(*args)
  File "/usr/share/ego/modules/profile.ego", line 312, in __call__
    super().__call__(*args)
  File "/usr/share/ego/python/ego/module.py", line 86, in __call__
    self.handle()
  File "/usr/share/ego/modules/profile.ego", line 305, in handle
    self.handle_write()
  File "/usr/share/ego/modules/profile.ego", line 129, in handle_write
    self.tree.write(self.config, outfile)
  File "/usr/share/ego/python/ego/profile.py", line 449, in write
    python_kit_branch = config.get_configured_kit("python-kit")
  File "/usr/share/ego/python/ego/config.py", line 75, in get_configured_kit
    default = self.kit_info_metadata["kit_settings"][kit]["default"]
KeyError: 'default'
[root@wolfie 61% make.profile.old]# epro build current
WARNING: None

=== Enabled Profiles: ===

        arch: (not set)
       build: current
     subarch: (not set)
      flavor: (not set)
     mix-ins: (not set)

>>> Set build to current.
WARNING: No arch defined. Please set.
WARNING: No flavor defined. Please set.
Updating profiles at /etc/portage/make.profile/parent...
Traceback (most recent call last):
  File "/usr/bin/epro", line 120, in <module>
    EgoModule.run_ego_module(action, econfig, args, VERSION)
  File "/usr/share/ego/python/ego/module.py", line 101, in run_ego_module
    ego_module(*args)
  File "/usr/share/ego/modules/profile.ego", line 312, in __call__
    super().__call__(*args)
  File "/usr/share/ego/python/ego/module.py", line 86, in __call__
    self.handle()
  File "/usr/share/ego/modules/profile.ego", line 305, in handle
    self.handle_write()
  File "/usr/share/ego/modules/profile.ego", line 129, in handle_write
    self.tree.write(self.config, outfile)
  File "/usr/share/ego/python/ego/profile.py", line 449, in write
    python_kit_branch = config.get_configured_kit("python-kit")
  File "/usr/share/ego/python/ego/config.py", line 75, in get_configured_kit
    default = self.kit_info_metadata["kit_settings"][kit]["default"]
KeyError: 'default'

 

Link to comment
Share on other sites

20 answers to this question

Recommended Posts

  • 0
38 minutes ago, palica said:

upgrade ego first then ego sync

Not so easy, when 1) I can't sync to pull an updated ego ebuild, and 2)...

[root@wolfie 61% make.profile]# emerge -tuND --pretend ego
!!! Unable to parse profile: '/etc/portage/make.profile'
!!! ParseError: Empty parent file: '/etc/portage/make.profile/parent'


!!! /etc/portage/make.profile is not a symlink and will probably prevent most merges.
!!! It should point into a profile within /var/git/meta-repo/kits/core-kit/profiles/
!!! (You can safely ignore this message when syncing. It's harmless.)


!!! Your current profile is invalid. If you have just changed your profile
!!! configuration, you should revert back to the previous configuration.
!!! Allowed actions are limited to --help, --info, --search, --sync, and
!!! --version.

 

Link to comment
Share on other sites

  • 0
7 hours ago, palica said:

and you could try putting this into your /etc/portage/make.profile/parent file


core-kit:funtoo/1.0/linux-gnu/arch/x86-64bit
core-kit:funtoo/1.0/linux-gnu/arch/x86-64bit/subarch/generic_64
core-kit:funtoo/1.0/linux-gnu/build/current
core-kit:funtoo/1.0/linux-gnu/flavor/core

 

Sync was successful.  I did the above.  Still had issues getting ego to merge.  I had to add PYTHON_SINGLE_TARGET and PYTHON_TARGETS to make.conf for some reason.  Had to use this to turn ignore a file collision with a man page for boot.conf:

[root@wolfie 61% ego]# FEATURES="-collision-detect -protect-owned" ebuild ego-2.5.0.4.ebuild merge

Got this QA warning:

 * QA Notice: Symbolic link /usr/sbin/boot-update points to /usr/sbin/ego which does not exist.
[root@wolfie 61% portage]# whereis ego
ego: /usr/bin/ego /etc/ego.conf /usr/share/ego /usr/share/man/man1/ego.1.bz2

But at this point, epro worked well enough to get my profiles back where they were, and ego worked well enough to sync.  Any tips on why I needed to set the PYTHON variables in make.conf and why 'eselect python' isn't working?

[root@wolfie 61% ego]# eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7
[root@wolfie 61% ego]# eselect python set 1
[root@wolfie 61% ego]# eselect python list
Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7

 

Link to comment
Share on other sites

  • 0
11 minutes ago, palica said:

please provide the error messages with PYTHON_TARGET stuff.

[root@wolfie 61% ego]# emerge -1 ego

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

Calculating dependencies... done!
[ebuild     U  ] app-admin/ego-2.4.2 [2.4.0] PYTHON_SINGLE_TARGET="-python3_4* -python3_7%" PYTHON_TARGETS="-python3_4* -python3_7%"

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) app-admin/ego-2.4.2::core-kit
>>> Failed to emerge app-admin/ego-2.4.2, Log file:
>>>  '/var/tmp/portage/app-admin/ego-2.4.2/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.08, 0.07, 0.02
 * Package:    app-admin/ego-2.4.2
 * Repository: core-kit
 * Maintainer: drobbins@funtoo.org funtoo
 * Upstream:   https://bugs.funtoo.org/
 * USE:        amd64 elibc_glibc kernel_linux userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * No Python implementation selected for the build. Please set
 * the PYTHON_SINGLE_TARGET variable in your make.conf to one
 * of the following values:
 *
 * python3_7 python3_4 python3_5 python3_6

 * ERROR: app-admin/ego-2.4.2::core-kit failed (setup phase):
 *   No supported Python implementation in PYTHON_SINGLE_TARGET/PYTHON_TARGETS.
 *
 * Call stack:
 *                 ebuild.sh, line  92:  Called pkg_setup
 *                 ebuild.sh, line 331:  Called python-single-r1_pkg_setup
 *   python-single-r1.eclass, line 562:  Called python_setup
 *   python-single-r1.eclass, line 552:  Called die
 * The specific snippet of code:
 *              die "No supported Python implementation in PYTHON_SINGLE_TARGET/PYTHON_TARGETS."
 *
 * If you need support, post the output of `emerge --info '=app-admin/ego-2.4.2::core-kit'`,
 * the complete build log and the output of `emerge -pqv '=app-admin/ego-2.4.2::core-kit'`.
 * The complete build log is located at '/var/tmp/portage/app-admin/ego-2.4.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-admin/ego-2.4.2/temp/die.env'.
 * Working directory: '/var/tmp/portage/app-admin/ego-2.4.2/homedir'
 * S: '/var/tmp/portage/app-admin/ego-2.4.2/work/ego-2.4.2'
 
 [root@wolfie 61% ego]# PYTHON_SINGLE_TARGET="python3_4" emerge -1 ego

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

Calculating dependencies... done!
[ebuild     U  ] app-admin/ego-2.4.2 [2.4.0] PYTHON_SINGLE_TARGET="-python3_7%" PYTHON_TARGETS="-python3_4* -python3_7%"

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) app-admin/ego-2.4.2::core-kit
>>> Failed to emerge app-admin/ego-2.4.2, Log file:
>>>  '/var/tmp/portage/app-admin/ego-2.4.2/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.08, 0.02, 0.01
 * Package:    app-admin/ego-2.4.2
 * Repository: core-kit
 * Maintainer: drobbins@funtoo.org funtoo
 * Upstream:   https://bugs.funtoo.org/
 * USE:        amd64 elibc_glibc kernel_linux python_single_target_python3_4 userland_GNU
 * FEATURES:   preserve-libs sandbox userpriv usersandbox
 * The implementation chosen as PYTHON_SINGLE_TARGET must be added
 * to PYTHON_TARGETS as well. This is in order to ensure that
 * dependencies are satisfied correctly. We're sorry
 * for the inconvenience.

 * ERROR: app-admin/ego-2.4.2::core-kit failed (setup phase):
 *   Build target (python3_4) not in PYTHON_TARGETS.
 *
 * Call stack:
 *                 ebuild.sh, line  92:  Called pkg_setup
 *                 ebuild.sh, line 331:  Called python-single-r1_pkg_setup
 *   python-single-r1.eclass, line 562:  Called python_setup
 *   python-single-r1.eclass, line 532:  Called die
 * The specific snippet of code:
 *                                      die "Build target (${impl}) not in PYTHON_TARGETS."
 *
 * If you need support, post the output of `emerge --info '=app-admin/ego-2.4.2::core-kit'`,
 * the complete build log and the output of `emerge -pqv '=app-admin/ego-2.4.2::core-kit'`.
 * The complete build log is located at '/var/tmp/portage/app-admin/ego-2.4.2/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/app-admin/ego-2.4.2/temp/die.env'.
 * Working directory: '/var/tmp/portage/app-admin/ego-2.4.2/homedir'
 * S: '/var/tmp/portage/app-admin/ego-2.4.2/work/ego-2.4.2'

 

Link to comment
Share on other sites

  • 0

well, basically you should follow the steps that are described on the wiki.

  1. ego sync with your old ego.conf settings
  2. upgrade ego
  3. change to release = 1.2 in ego.conf
  4. ego sync
  5. and follow the steps further like emerge gcc, upgrade glibc and co and
  6. emerge -e @world

then you don't need any tweaking of make.conf

Link to comment
Share on other sites

  • 0
6 minutes ago, palica said:

well, basically you should follow the steps that are described on the wiki.

  1. ego sync with your old ego.conf settings
  2. upgrade ego
  3. change to release = 1.2 in ego.conf
  4. ego sync
  5. and follow the steps further like emerge gcc, upgrade glibc and co and
  6. emerge -e @world

then you don't need any tweaking of make.conf

I was following those steps.  I didn't touch ego.conf.  I tried to upgrade ego, and got the errors about PYTHON_TARGETS above.

Link to comment
Share on other sites

  • 0
6 minutes ago, palica said:

and please note 1.3 release is not ready yet - the dev cycle has just started on this branch so DO NOT use it in PRODUCTION.

Are you saying that there are steps I should follow to avoid 1.3?  I did not put 1.3 in ego.conf, if that's what you mean.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...