<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>163003</bug_id>
          
          <creation_ts>2007-01-21 00:27 0000</creation_ts>
          <short_desc>app-portage/cfg-update-1.8.0-r4.ebuild (Update)</short_desc>
          <delta_ts>2007-01-22 08:04:21 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          <bug_file_loc>http://people.zeelandnet.nl/xentric/cfg-update-1.8.0-r4.ebuild</bug_file_loc>
          
          
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>xentric@zeelandnet.nl</reporter>
          <assigned_to>truedfx@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>xentric@zeelandnet.nl</who>
            <bug_when>2007-01-21 00:27:55 0000</bug_when>
            <thetext>Hi Harold,

It&apos;s been over a year since the last update so it&apos;s time to update the script with some minor bugfixes.
I&apos;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 &quot;kde&quot; or &quot;gnome&quot; useflags are used. Don&apos;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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2007-01-21 08:41:02 0000</bug_when>
            <thetext>Hi,

&gt; Changed the ebuild so sux is a dependency when &quot;kde&quot; or &quot;gnome&quot; useflags are
&gt; used. Don&apos;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.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xentric@zeelandnet.nl</who>
            <bug_when>2007-01-21 12:52:58 0000</bug_when>
            <thetext>You&apos;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 &quot;kde&quot;  useflag is present. Can you do that in the ebuild?

Thanks for your quick reply,

Stephan</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2007-01-21 14:38:06 0000</bug_when>
            <thetext>&gt; You&apos;re right, sorry. But does that mean that xxdiff is not a dependency when
&gt; 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.

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

Okay, I&apos;ll change it, but if enough people complain because they have kde in their flags but don&apos;t want xxdiff, then I&apos;d like to change it back. I don&apos;t really expect that to happen, though.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2007-01-21 14:42:45 0000</bug_when>
            <thetext>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 &apos;cfg-update --on&apos;.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xentric@zeelandnet.nl</who>
            <bug_when>2007-01-21 16:54:16 0000</bug_when>
            <thetext>Are you running cfg-update with non-root priviledges?
That&apos;s one thing I had not thought about... hmmz, need to test this a bit further.

I&apos;ll test this and change the script where necessary, then I&apos;ll post a new version 1.8.0-r5.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2007-01-21 17:03:26 0000</bug_when>
            <thetext>&gt; Are you running cfg-update with non-root priviledges?

Nope. I&apos;ve tried running via sudo, and I&apos;ve tried running it as root directly.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xentric@zeelandnet.nl</who>
            <bug_when>2007-01-21 17:11:34 0000</bug_when>
            <thetext>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?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2007-01-21 17:41:41 0000</bug_when>
            <thetext>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&apos;t realise it immediately exited because of it.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xentric@zeelandnet.nl</who>
            <bug_when>2007-01-21 20:43:26 0000</bug_when>
            <thetext>Does running &quot;xhost +localhost&quot; as the user who started the X-server fix your problem?
Alternatively try sux to become root, it&apos;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&apos;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&apos;t behave nicely when used by non-root user. I&apos;ve fixed that in 1.8.0-r5, but I&apos;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 &quot;xhost +localhost&quot; (as the user who started X) fixes your problem?</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2007-01-22 06:37:49 0000</bug_when>
            <thetext>(In reply to comment #9)
&gt; Does running &quot;xhost +localhost&quot; as the user who started the X-server fix your
&gt; problem?

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

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

xhost:  unable to open display &quot;:0.0&quot;

&gt; Alternatively try sux to become root, it&apos;s a pain in the ass to get it to work
&gt; with regular su and sudo.

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

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

sourcing /etc/profile doesn&apos;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&apos;ll be able to properly test it now. :)</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>xentric@zeelandnet.nl</who>
            <bug_when>2007-01-22 07:39:59 0000</bug_when>
            <thetext>Ok, good to hear that you&apos;ve got it working...
I wonder how many users try cfg-update and struggle with the same problems.
Don&apos;t see a lot of questions about it in the support thread on the gentoo forums.

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

Have fun!</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>truedfx@gentoo.org</who>
            <bug_when>2007-01-22 08:04:21 0000</bug_when>
            <thetext>Thanks. I only took a quick look, but I didn&apos;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 &lt;http://devmanual.gentoo.org/ebuild-writing/functions/src_install/index.html&gt;. I hope you don&apos;t mind.</thetext>
          </long_desc>
      
    </bug>

</bugzilla>