Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176008 - emerge-delta-webrsync stalls when run as non-root user
Summary: emerge-delta-webrsync stalls when run as non-root user
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on: 454046
Blocks:
  Show dependency tree
 
Reported: 2007-04-25 18:56 UTC by Rudi Lippert
Modified: 2013-01-25 17:24 UTC (History)
2 users (show)

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


Attachments
possible patch (emerge-delta-webrsync.patch,378 bytes, patch)
2007-04-25 19:10 UTC, Rudi Lippert
Details | Diff
Handle FEATURES=usersync (Handle-FEATURES-usersync.patch,1.14 KB, patch)
2012-08-14 03:32 UTC, Zac Medico
Details | Diff
Check write permission for PORTDIR and DISTDIR (Check-write-permission-bug-176008.patch,849 bytes, patch)
2012-08-14 03:48 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rudi Lippert 2007-04-25 18:56:12 UTC
I accidentally ran emerge-delta-webrsync as a normal user today, and it pretended to do something:
# emerge-delta-webrsync
Looking for available base versions for a delta
found a stale snapshot.  cleansing
...and stayed at that point forever.
The correct behavior would be to report that the program has to be run as root and exit.
Comment 1 Rudi Lippert 2007-04-25 19:10:17 UTC
Created attachment 117261 [details, diff]
possible patch

The user check could probably be performed at a more suitable position in the code, but I don't have enough knowledge of it.
Comment 2 Zac Medico gentoo-dev 2012-08-14 03:32:36 UTC
Created attachment 321266 [details, diff]
Handle FEATURES=usersync

(In reply to comment #1)
> Created attachment 117261 [details, diff] [details, diff]
> possible patch
> 
> The user check could probably be performed at a more suitable position in
> the code, but I don't have enough knowledge of it.

I don't want to disable running it as non-root, since it's valid to run as non-root with FEAUTURE=usersync if we apply the attached patch.

The reason it stalled for you is that rm went into interactive mode while its prompt was redirected to /dev/null. We can fix that by using rm -f (I'll attach a patch for that).
Comment 3 Zac Medico gentoo-dev 2012-08-14 03:48:34 UTC
Created attachment 321268 [details, diff]
Check write permission for PORTDIR and DISTDIR

These permission checks should make it bail out earlier, so you won't trigger the interactive rm call. I'll add in the rm -f option later.
Comment 4 Zac Medico gentoo-dev 2012-08-18 01:36:17 UTC
(In reply to comment #2)
> Created attachment 321266 [details, diff] [details, diff]
> Handle FEATURES=usersync

In git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=87a769bdab8e54c68260996026c87d3d7845d2e6

(In reply to comment #3)
> Created attachment 321268 [details, diff] [details, diff]
> Check write permission for PORTDIR and DISTDIR

Also in git:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9807b6646b8f9ce6d67b03cddfe4b9d0b02288bf
Comment 6 Zac Medico gentoo-dev 2012-08-19 06:17:28 UTC
This is fixed in version 3.6.