Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 163003
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Harald van Dijk <truedfx@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: S. van Boven <xentric@zeelandnet.nl>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 163003 depends on: Show dependency tree
Bug 163003 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-01-21 00:27 0000
Hi Harold,

It's been over a year since the last update so it's time to update the script
with some minor bugfixes.
I've put the new ebuild on my webspace:
http://people.zeelandnet.nl/xentric/cfg-update-1.8.0-r4.ebuild
Changed the ebuild so sux is a dependency when "kde" or "gnome" useflags are
used. Don't know why you changed that in the previous ebuild.
The changelog shows all the code changes... I hope you have some time to put it
in the Portage tree.

Regards,

Stephan van Boven (aka xentric)

Reproducible: Always

------- Comment #1 From Harald van Dijk 2007-01-21 08:41:02 0000 -------
Hi,

> Changed the ebuild so sux is a dependency when "kde" or "gnome" useflags are
> used. Don't know why you changed that in the previous ebuild.

What did I change? sux is a dependency in 1.8.0-r3 too. As far as I can see,
the dependency difference between 1.8.0-r3 and your 1.8.0-r4 is only that in
1.8.0-r3, kdiff3 is accepted as an alternative to xxdiff.

------- Comment #2 From S. van Boven 2007-01-21 12:52:58 0000 -------
You're right, sorry. But does that mean that xxdiff is not a dependency when
kdiff3 is already installed?
The default settings are configured for xxdiff, and the tutorial recommends
this as the default tool, I would like it to always install xxdiff is the "kde"
 useflag is present. Can you do that in the ebuild?

Thanks for your quick reply,

Stephan

------- Comment #3 From Harald van Dijk 2007-01-21 14:38:06 0000 -------
> You're right, sorry. But does that mean that xxdiff is not a dependency when
> kdiff3 is already installed?

That is correct. The original ebuild (by you, I believe) depended
unconditionally on xxdiff and kdiff3 both, and I got a request to change it to
depend on only one of them.

> The default settings are configured for xxdiff, and the tutorial recommends
> this as the default tool, I would like it to always install xxdiff is the "kde"
>  useflag is present. Can you do that in the ebuild?

Okay, I'll change it, but if enough people complain because they have kde in
their flags but don't want xxdiff, then I'd like to change it back. I don't
really expect that to happen, though.

------- Comment #4 From Harald van Dijk 2007-01-21 14:42:45 0000 -------
I just gave -r4 a try, but it complains about the alias not being found and
exits without doing anything, even if I call it as 'cfg-update --on'.

------- Comment #5 From S. van Boven 2007-01-21 16:54:16 0000 -------
Are you running cfg-update with non-root priviledges?
That's one thing I had not thought about... hmmz, need to test this a bit
further.

I'll test this and change the script where necessary, then I'll post a new
version 1.8.0-r5.

------- Comment #6 From Harald van Dijk 2007-01-21 17:03:26 0000 -------
> Are you running cfg-update with non-root priviledges?

Nope. I've tried running via sudo, and I've tried running it as root directly.

------- Comment #7 From S. van Boven 2007-01-21 17:11:34 0000 -------
Can you run the same command again but now with -d as extra option (debugging
output) and send the output to xentric@zeelandnet.nl so I can check where
things go wrong?

------- Comment #8 From Harald van Dijk 2007-01-21 17:41:41 0000 -------
Actually... sorry for not being more specific about the error message. The
problem is that both inside sudo and after su, it cannot connect to the running
X server, so even though no editor is needed, and even though I am running
cfg-update from an xterm, cfg-update complains about that. I didn't realise it
immediately exited because of it.

------- Comment #9 From S. van Boven 2007-01-21 20:43:26 0000 -------
Does running "xhost +localhost" as the user who started the X-server fix your
problem?
Alternatively try sux to become root, it's a pain in the ass to get it to work
with regular su and sudo.
I have never found an easy fix for this, only sux seems to solve most problems
without any tinkering.

I ran xhost +localhost once, put the emerge alias in /root/.bashrc and added an
extra line in /root/.bashrc that sources /etc/profile to properly set up the
root environment.
Take a peek in the .bashrc file included in the tarball... it's a preconfigured
file that should make it work.
If you come up with any ideas to make it easier for root to use the X-server,
please tell me :)

I just found that cfg-update didn't behave nicely when used by non-root user.
I've fixed that in 1.8.0-r5, but I'll wait with posting until I have your
response regarding the issue you are having.
I have added some extra text explaining what to do when you are in an
X-terminal and still get that error-message just like on your box.

Can you confirm that running "xhost +localhost" (as the user who started X)
fixes your problem?

------- Comment #10 From Harald van Dijk 2007-01-22 06:37:49 0000 -------
(In reply to comment #9)
> Does running "xhost +localhost" as the user who started the X-server fix your
> problem?

I already tried that :) It should, and it used to, but now it doesn't.

$ xhost +localhost
localhost being added to access control list
$ su
Password:
# xhost
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

xhost:  unable to open display ":0.0"

> Alternatively try sux to become root, it's a pain in the ass to get it to work
> with regular su and sudo.

I got it working with regular sudo. Adding env_keep+=DISPLAY, and making sure
HOME remains the user's home instead of root's home (sudo normally doesn't
change HOME, so that's easy enough) makes it work.

> I have never found an easy fix for this, only sux seems to solve most problems
> without any tinkering.
> 
> I ran xhost +localhost once, put the emerge alias in /root/.bashrc and added an
> extra line in /root/.bashrc that sources /etc/profile to properly set up the
> root environment.
> Take a peek in the .bashrc file included in the tarball... it's a preconfigured
> file that should make it work.

sourcing /etc/profile doesn't make it work either with su.

Thanks for the advice though, and just let me know when 1.8.0-r5 is ready; I'll
be able to properly test it now. :)

------- Comment #11 From S. van Boven 2007-01-22 07:39:59 0000 -------
Ok, good to hear that you've got it working...
I wonder how many users try cfg-update and struggle with the same problems.
Don't see a lot of questions about it in the support thread on the gentoo
forums.

I've put the new r5 ebuild on my webspace:
http://people.zeelandnet.nl/xentric/cfg-update-1.8.0-r5.ebuild

Have fun!

------- Comment #12 From Harald van Dijk 2007-01-22 08:04:21 0000 -------
Thanks. I only took a quick look, but I didn't see any problems so far, so
added. A note though, unlike your ebuild the ebuild in the tree does not
install the COPYING file, as per policy
<http://devmanual.gentoo.org/ebuild-writing/functions/src_install/index.html>.
I hope you don't mind.

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug