Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Portage sync errors after moving Gentoo repo
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
nagmat84
Apprentice
Apprentice


Joined: 27 Mar 2007
Posts: 218

PostPosted: Sat Mar 30, 2024 2:54 pm    Post subject: [SOLVED] Portage sync errors after moving Gentoo repo Reply with quote

I moved the Gentoo repository directory from its old location "/usr/lib/portage" to "/var/db/repos/gentoo" and updated "/etc/portage/repos.conf/gentoo.conf" accordingly. When I run "emerge --sync" now, I get the following error message during the final phase after the actual sync has already completed:
Code:

 * Manifest timestamp: 2024-03-30 14:07:00 UTC
 * Valid OpenPGP signature found:
 * - primary key: DCD05B71EAB94199527F44ACDB6B8C1F96D8BF6D
 * - subkey: E1D6ABB63BFCFB4BA02FDF1CEC590EEAC9189250
 * - timestamp: 2024-03-30 14:07:00 UTC
 * Verifying /var/db/repos/gentoo/.tmp-unverified-download-quarantine ...                                                                                                                                                                             [ ok ]
=== Sync completed for gentoo
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.11/emerge", line 57, in main
    retval = emerge_main()
             ^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/main.py", line 1308, in emerge_main
    return run_action(emerge_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/actions.py", line 3839, in run_action
    return action_sync(emerge_config)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/actions.py", line 2422, in action_sync
    success, msgs = syncer.auto_sync(options=options)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/emaint/modules/sync/sync.py", line 89, in auto_sync
    return self._sync(repos, return_messages, emaint_opts=options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/emaint/modules/sync/sync.py", line 263, in _sync
    display_news_notification(
  File "/usr/lib/python3.11/site-packages/portage/proxy/objectproxy.py", line 31, in __call__
    return result(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/post_emerge.py", line 41, in display_news_notification
    news_counts = count_unread_news(portdb, vardb)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/news.py", line 485, in count_unread_news
    count = manager.getUnreadItems(repo, update=True)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/news.py", line 224, in getUnreadItems
    self.updateItems(repoid)
  File "/usr/lib/python3.11/site-packages/portage/news.py", line 186, in updateItems
    if item.isRelevant(
       ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/news.py", line 302, in isRelevant
    matches = [restriction.checkRestriction(**kwargs) for restriction in values]
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/news.py", line 302, in <listcomp>
    matches = [restriction.checkRestriction(**kwargs) for restriction in values]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/news.py", line 413, in checkRestriction
    return kwargs["profile"].startswith(self.profile[:-1])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'startswith'
How do I get "emerge --sync" to work again? Is it save to to completely clear the repository directory and try to start a sync on an empty directory?

Here is my "/etc/portage/repos.conf/gentoo.conf" in case it helps:
Code:
[DEFAULT]
main-repo = gentoo
 
[gentoo]
location = /var/db/repos/gentoo
sync-type = rsync
sync-uri = rsync://rsync.de.gentoo.org/gentoo-portage
auto-sync = yes
sync-rsync-verify-jobs = 1
sync-rsync-verify-metamanifest = yes
sync-rsync-verify-max-age = 24
sync-openpgp-key-path = /usr/share/openpgp-keys/gentoo-release.asc
sync-openpgp-keyserver = hkps://keys.gentoo.org
sync-openpgp-key-refresh-retry-count = 40
sync-openpgp-key-refresh-retry-overall-timeout = 1200
sync-openpgp-key-refresh-retry-delay-exp-base = 2
sync-openpgp-key-refresh-retry-delay-max = 60
sync-openpgp-key-refresh-retry-delay-mult = 4
sync-webrsync-verify-signature = yes


Last edited by nagmat84 on Tue Apr 02, 2024 3:07 pm; edited 1 time in total
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 1688

PostPosted: Sat Mar 30, 2024 3:18 pm    Post subject: Reply with quote

If you move the repository, you must also rm /etc/portage/make.profile and then reselect your profile.
Back to top
View user's profile Send private message
nagmat84
Apprentice
Apprentice


Joined: 27 Mar 2007
Posts: 218

PostPosted: Tue Apr 02, 2024 3:08 pm    Post subject: Reply with quote

That was indeed the cause for the error.
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