Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 236683 - sys-apps/portage-2.2_rc8 ebuild manifest write_atomic error
Summary: sys-apps/portage-2.2_rc8 ebuild manifest write_atomic error
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 210077 216231
  Show dependency tree
 
Reported: 2008-09-04 11:47 UTC by Duncan
Modified: 2008-12-05 02:49 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Duncan 2008-09-04 11:47:16 UTC
Severity trivial since it's just prettying an error message...

After having an emerge fail, I modified the ebuild to see what was up, and tried to remanifest it, only to get a traceback.

ebuild /p/sys-apps/hal/hal-0.5.11-r2.ebuild manifest
>>> Creating Manifest for /str/portage/sys-apps/hal
!!! write_atomic('/str/portage/sys-apps/hal/Manifest')

Tried digest, same error.

Checked the manpage for a debug to try, added --force, got a traceback which let me see the problem:

ebuild /p/sys-apps/hal/hal-0.5.11-r2.ebuild digest --force
Traceback (most recent call last):
  File "/usr/bin/ebuild", line 217, in <module>
    discard_digests(ebuild, tmpsettings, portage.portdb)
  File "/usr/bin/ebuild", line 163, in discard_digests
    mf.write()
  File "/usr/lib64/portage/pym/portage/manifest.py", line 226, in write
    "".join("%s\n" % str(myentry) for myentry in myentries))
  File "/usr/lib64/portage/pym/portage/util.py", line 945, in write_atomic
    raise PermissionDenied(func_call)
portage.exception.PermissionDenied: write_atomic('/str/portage/sys-apps/hal/Manifest')

Note that exception, permission denied.  DOH!  I was trying to manifest/digest as a regular user!  Ran it using sudo without issue.

I would have expected instead of that cryptic and a bit scary "write_atomic" a nice error telling me to try it as root, or to check permissions.

Duncan
Comment 1 Zac Medico gentoo-dev 2008-11-15 04:52:24 UTC
In svn r11922 its fixed to say 'Permission Denied' so there's no confusion.
Comment 2 Duncan 2008-11-15 10:39:42 UTC
As always, thanks!

(FWIW, I really do appreciate how user friendly you tend to be handling portage bugs.  It must get depressing sometimes, but having someone that actually takes time to explain what was going on and what the fix actually fixed, as well as how to apply the patches until a new version comes out, really DOES make a difference.  It's certainly noticed and appreciated here!)
Comment 3 Zac Medico gentoo-dev 2008-11-22 05:52:04 UTC
This is fixed in 2.2_rc15.

(In reply to comment #2)
> As always, thanks!

You're welcome. :)