Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 291790 - sys-apps/portage-2.2_rc48[python3]: bytes/str-related TypeError in _emerge.actions.git_sync_timestamps()
Summary: sys-apps/portage-2.2_rc48[python3]: bytes/str-related TypeError in _emerge.ac...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 288499
  Show dependency tree
 
Reported: 2009-11-04 01:00 UTC by Robin Hallabro-Kokko
Modified: 2009-11-07 02:40 UTC (History)
0 users

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


Attachments
portage-git_sync_timestamps.patch (portage-git_sync_timestamps.patch,810 bytes, patch)
2009-11-04 21:45 UTC, Arfrever Frehtes Taifersar Arahesis (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Robin Hallabro-Kokko 2009-11-04 01:00:35 UTC
When syncing the portage tree with python3 enabled, I get this error every time when synchronizing the timestamps.

I have tried syncinc without python3 and it works just fine.

Reproducible: Always

Steps to Reproduce:
1. Sync the portage tree (emerge --sync)
2. Wait for the timestamps to be synchronized

Actual Results:  
This error:

Traceback (most recent call last):
  File "/usr/bin/emerge", line 42, in <module>
    retval = emerge_main()
  File "/usr/lib/portage/pym/_emerge/main.py", line 1443, in emerge_main
    return action_sync(settings, trees, mtimedb, myopts, myaction)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 1767, in action_sync
    exitcode = git_sync_timestamps(settings, myportdir)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 2468, in git_sync_timestamps
    modified_files = set(l.rstrip("\n") for l in proc.stdout)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 2468, in <genexpr>
    modified_files = set(l.rstrip("\n") for l in proc.stdout)
TypeError: Type str doesn't support the buffer API

Expected Results:  
A successful sync.

Using the funtoo branch, although I really doubt that seems relevant to the actual bug.
Comment 1 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2009-11-04 21:45:38 UTC
Created attachment 209277 [details, diff]
portage-git_sync_timestamps.patch

If you save this patch as /tmp/portage-git_sync_timestamps.patch, then you can apply it using this command:
patch /usr/lib/portage/pym/_emerge/actions.py /tmp/portage-git_sync_timestamps.patch
Comment 2 Robin Hallabro-Kokko 2009-11-05 04:36:38 UTC
(In reply to comment #1)
> Created an attachment (id=209277) [details]
> portage-git_sync_timestamps.patch
> 
> If you save this patch as /tmp/portage-git_sync_timestamps.patch, then you can
> apply it using this command:
> patch /usr/lib/portage/pym/_emerge/actions.py
> /tmp/portage-git_sync_timestamps.patch
> 

Works as expected with the patch provided. Thank you.
Comment 3 Zac Medico gentoo-dev 2009-11-07 02:40:27 UTC
This is fixed in 2.1.7.4 and 2.2_rc49.