[gentoo-user] Cdda2wav testers needed

2015-10-20 Thread Joerg Schilling
There have been some problems in cdda2wav that could have been discovered much 
earlier if there was better feedback.

A nasty problem is active since Spring 2014 or even since late 2013 if you did 
not 
use c2checks. So the problem (that depends on some compiler constraints) was 
really
visible since Spring 2014 when (as a hacky fix against dumb drives) the c2check 
was removed from the paraopts=proof macro.

Since the problem is not triggered by the Sun C-compiler, it was not detected 
while testing at that time.


Since some years, there is unfortunately few feedback on cdrtools. But
quality also depends on user feedback.

The effect is that cdda2wav flags errors even though there is no problem:

 100%  track 21  recorded with audible hard errors
 100%  track 22  recorded with audible hard errors


There was a problem with an uninitalized variable in libparanoia in case of 
disabled C2 Checks. The problem was fixed two weeks ago and published in a 
preliminary copy of the schily tools:

http://sourceforge.net/projects/schilytools/files/

schily-dist-pre3.tar.xz

Since yesterday evening, the paraopts=proof macro again includes c2check and 
there is an automatic fallback to the "no c2" case when the drive does not 
support C2 Checks. Note that this was only tested with a single drive so far,
so we need more tests here from people with different hardware.

Please test and report.

Jörg

-- 
 EMail:jo...@schily.net(home) Jörg Schilling D-13353 Berlin
   joerg.schill...@fokus.fraunhofer.de (work) Blog: 
http://schily.blogspot.com/
 URL:  http://cdrecord.org/private/ 
http://sourceforge.net/projects/schilytools/files/'



[gentoo-user] How is /etc/portage/env supposed to work?

2015-10-20 Thread Nikos Chantziaras

I'm following the documentation here:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Using_.2Fetc.2Fportage.2Fenv

to hook into the postinst phase of an ebuild. The docs only provide an 
actual example for the global hook case (/etc/portage/bashrc), but it 
says it works the same way on a per-ebuild basis using /etc/portage/env. 
But it is totally silent on how to actually do that :-/


So I assume, since the docs don't mention anything special, that I 
should put the code in a conf file. So I created this file:


  /etc/portage/env/test.conf

and in it:

  if [ "${EBUILD_PHASE}" == "postinst" ];
  then
  echo ":: TEST"
  fi

Then I added this line to /etc/portage/package.env:

  app-misc/mc test.conf

But when I "emerge app-misc/mc", I get:

!!! Problem in 'app-misc/mc' dependencies.
!!! "/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=') 
portage.exception

... done!
"/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=')

I don't get it... Can't I have a per-package bashrc or something? The 
docs are suggesting that I can, but don't tell me how.





Re: [gentoo-user] How is /etc/portage/env supposed to work?

2015-10-20 Thread Michael Orlitzky
On 10/20/2015 10:04 AM, Nikos Chantziaras wrote:
> I'm following the documentation here:
> 
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Using_.2Fetc.2Fportage.2Fenv
> 
> to hook into the postinst phase of an ebuild.

Deja vu:

  http://comments.gmane.org/gmane.linux.gentoo.devhelp/151

  https://bugs.gentoo.org/show_bug.cgi?id=388781

There's two separate uses for /etc/portage/env -- one of them will get
you the make.conf parser (when you list the file in
/etc/portage/package.env) and the other that will get you the bash
parser (when you put the file at /etc/portage/env/${CATEGORY}/${PN}).

The whole thing is confusing. If you ever get it working please put a
decent example on the wiki because I remember spending hours trying to
do the same thing.




Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan McKinnon
On 20/10/2015 19:57, Marc Joliet wrote:
> On Tuesday 20 October 2015 19:22:48 Matthias Gerstner wrote:
>> Hi Alan,
>>
>>> I simply want to disable that one particular beeping at shutdown time.
>>
>> well this topic made me curious where the beep is coming from.
>>
>> It does originate from the shutdown command itself which is part of the
>> sys-apps/sysvinit package. In this package's source you find can a file
>> "src/dowall.c", where you will in turn find a function "wall(...)".
>>
>> This is the function where the warning messages will be produced that
>> show up in the terminal and the message is produced like this:
>>
>> snprintf(line, sizeof(line),
>>  "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>>  user, hostname, tty, date);
>>
>> The "\007" is the beep you're getting. It's a bell character that you
>> can produce manually by doing this, too:
>>
>> echo -e "\007"
>>
>> Unfortunately the bell character is hard coded into the warning message.
>> Also there seems to be no way to suppress the warning message.
> [...]
> 
> If it's caused by the call to wall(), then maybe the --no-wall option to 
> shutdown will help?


I don't have that option in my ~arch shutdown


-- 
Alan McKinnon
alan.mckin...@gmail.com




[gentoo-user] Re: Can I suppress the bleep when shutting down?

2015-10-20 Thread James
Alan Mackenzie  muc.de> writes:


> > > Every time I shut down my gentoo system with "shutdown -h now", it beeps
> > > at me.  This is becoming steadily more irritating as the months go by.
> > > Just what is this beep supposed to be telling me?  I _know_ I'm shutting
> > > the machine down.

> From a virtual console.  Matthias has tracked it down for me, and it is
> hard coded in one of the C files building shutdown itself.  I think I'm
> going to edit the source and rebuild it without the bleep.


Check out 'epatch_user' [1].
This is exactly what epatch-user was design for. And
you get 'persistence' with this type of patch. In fact,
this would be a perfect example to find it's way to
the gentoo wiki!

Bravo, a frequent nuisance, the sounds, and folks could add lots
of patches to shut off differnet annoying sounds..

Great Find there Alan...


hth,
James



[1] https://wiki.gentoo.org/wiki//etc/portage/patches




Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Marc Joliet
On Tuesday 20 October 2015 19:22:48 Matthias Gerstner wrote:
>Hi Alan,
>
>> I simply want to disable that one particular beeping at shutdown time.
>
>well this topic made me curious where the beep is coming from.
>
>It does originate from the shutdown command itself which is part of the
>sys-apps/sysvinit package. In this package's source you find can a file
>"src/dowall.c", where you will in turn find a function "wall(...)".
>
>This is the function where the warning messages will be produced that
>show up in the terminal and the message is produced like this:
>
>snprintf(line, sizeof(line),
>   "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>   user, hostname, tty, date);
>
>The "\007" is the beep you're getting. It's a bell character that you
>can produce manually by doing this, too:
>
>echo -e "\007"
>
>Unfortunately the bell character is hard coded into the warning message.
>Also there seems to be no way to suppress the warning message.
[...]

If it's caused by the call to wall(), then maybe the --no-wall option to 
shutdown will help?

>Regards
>
>Matthias

HTH
-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan Mackenzie
Hello, Alan.

On Tue, Oct 20, 2015 at 07:22:12PM +0200, Alan McKinnon wrote:
> On 20/10/2015 18:10, Alan Mackenzie wrote:
> > Hello, Gentoo.

> > Every time I shut down my gentoo system with "shutdown -h now", it beeps
> > at me.  This is becoming steadily more irritating as the months go by.
> > Just what is this beep supposed to be telling me?  I _know_ I'm shutting
> > the machine down.

> > Can anybody here tell me how to disable this ing annoyance?

> > Many thanks in advance!



> Where is the beep coming from?

The beep speaker in my PC case.

> Real speakers (like where music comes out) - check Alerts &
> Notifications or similar in your DE.

I use XFCE.  I get a similar beep on exiting XFCE, and I've sent a
similar request to an XFCE list asking how I can disable that beep.

> That silly monotone speaker that can only make bing noises and has been
> in pc's since the first one?

Yes, that one!  After spending all the time I did trying to get my
kernel to drive it, I now want to suppress it (sometimes).

> Is this happening inside a DE session, or from a virtual console?

>From a virtual console.  Matthias has tracked it down for me, and it is
hard coded in one of the C files building shutdown itself.  I think I'm
going to edit the source and rebuild it without the bleep.

> -- 
> Alan McKinnon
> alan.mckin...@gmail.com

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] How is /etc/portage/env supposed to work?

2015-10-20 Thread Alan McKinnon
On 20/10/2015 16:26, Michael Orlitzky wrote:
> On 10/20/2015 10:04 AM, Nikos Chantziaras wrote:
>> I'm following the documentation here:
>>
>> https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Using_.2Fetc.2Fportage.2Fenv
>>
>> to hook into the postinst phase of an ebuild.
> 
> Deja vu:
> 
>   http://comments.gmane.org/gmane.linux.gentoo.devhelp/151
> 
>   https://bugs.gentoo.org/show_bug.cgi?id=388781
> 
> There's two separate uses for /etc/portage/env -- one of them will get
> you the make.conf parser (when you list the file in
> /etc/portage/package.env) and the other that will get you the bash
> parser (when you put the file at /etc/portage/env/${CATEGORY}/${PN}).
> 
> The whole thing is confusing. If you ever get it working please put a
> decent example on the wiki because I remember spending hours trying to
> do the same thing.


I had to go down this road too recently. The portage man pages mention
the two ways and recommend the completely non-obvious one that melted my
brain. It works like this:

$ cat /etc/portage/package.env
=app-emulation/virtualbox-5.0.6 vbox-makeopts
=app-emulation/virtualbox-5.0.6-r1 vbox-makeopts

$ cat /etc/portage/env/vbox-makeopts
MAKEOPTS="-j2 -l4"

All the atoms listed in package.env (2 virtual box ebuilds in this case)
will apply the environment settings in a file called vbox-makeopts. I
had to do this because virtualbox-5 has a weird parallel build bug - it
often fails with j=1 or j>2 but never with j=2. Odd.


The other method is very obvious but somehow not recommended:

$ ls -l /etc/portage/env/mail-client
-rw-r--r-- 1 root root 92 Sep 25 17:00 thunderbird-38.2.0
-rw-r--r-- 1 root root 92 Oct  1 14:52 thunderbird-38.3.0

$ cat /etc/portage/env/mail-client/thunderbird-38.2.0
LDFLAGS="${LDFLAGS}
-Wl,-rpath,/usr/lib/thunderbird,-rpath,/usr/lib/thunderbird/components"


The dir and version structure of env/- is compared to
what is being merged (IIRC $P, $PN, $PV all work) and the env in the
file is applied.



-- 
Alan McKinnon
alan.mckin...@gmail.com




[gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan Mackenzie
Hello, Gentoo.

Every time I shut down my gentoo system with "shutdown -h now", it beeps
at me.  This is becoming steadily more irritating as the months go by.
Just what is this beep supposed to be telling me?  I _know_ I'm shutting
the machine down.

Can anybody here tell me how to disable this ing annoyance?

Many thanks in advance!

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan Mackenzie
Hello, Matthias.

On Tue, Oct 20, 2015 at 07:22:48PM +0200, Matthias Gerstner wrote:
> Hi Alan,

> > I simply want to disable that one particular beeping at shutdown time.

> well this topic made me curious where the beep is coming from.

> It does originate from the shutdown command itself which is part of the
> sys-apps/sysvinit package. In this package's source you find can a file
> "src/dowall.c", where you will in turn find a function "wall(...)".

> This is the function where the warning messages will be produced that
> show up in the terminal and the message is produced like this:

> snprintf(line, sizeof(line),
>   "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>   user, hostname, tty, date);

> The "\007" is the beep you're getting. It's a bell character that you
> can produce manually by doing this, too:

> echo -e "\007"

> Unfortunately the bell character is hard coded into the warning message.
> Also there seems to be no way to suppress the warning message.

> But you could still try is to disable the interpretation of the bell
> character by your terminal. Then you could make an alias or wrapper
> around the original shutdown command that does this.

> According to Arch Linux docs here:

> https://wiki.archlinux.org/index.php/Disable_PC_speaker_beep

> You can locally disable the bell in the terminal by calling "setterm
> -blength 0". But this doesn't work with my terminals. Says it's
> unsupported.

> Then you can put this in your ~/.inputrc: "set bell-style none". This
> works for me. Then, however, all terminals stop beeping. The pcspkr is
> still loaded though and can be used.

> As you only want to stop the beep only during shutdown you might also be
> able to call "xset -b", disabling the bell on the X-server (globally?).
> This is not persistent across reboots and you won't have any beeps until
> the machine shuts down.

Hey, that's brilliant!  Thank you very much indeed!  That is an answer
much more complete than I could have expected.

Probably the most satisfactory way for me to make it work the way I want
is to build my own version of shutdown, removing the offending \007 from
that sprintf format string. and then to watch out for new versions
of sys-apps/sysvinit.  The package appears to be relatively stable.

> Regards

> Matthias

-- 
Alan Mackenzie (Nuremberg, Germany).



[gentoo-user] Re: Can I suppress the bleep when shutting down?

2015-10-20 Thread »Q«
On Tue, 20 Oct 2015 19:22:48 +0200
Matthias Gerstner  wrote:

> It does originate from the shutdown command itself which is part of
> the sys-apps/sysvinit package. In this package's source you find can
> a file "src/dowall.c", where you will in turn find a function
> "wall(...)".
> 
> This is the function where the warning messages will be produced that
> show up in the terminal and the message is produced like this:
> 
> snprintf(line, sizeof(line),
>   "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>   user, hostname, tty, date);
> 
> The "\007" is the beep you're getting. It's a bell character that you
> can produce manually by doing this, too:

To add one more suggestion to your very good ones (which I've snipped),
there is a very small patch to remove the \007 at
.




Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan Mackenzie
Hello, Wabe.

On Tue, Oct 20, 2015 at 06:27:04PM +0200, waben...@gmail.com wrote:
> Alan Mackenzie  wrote:

> > Every time I shut down my gentoo system with "shutdown -h now", it
> > beeps at me.  This is becoming steadily more irritating as the months
> > go by. Just what is this beep supposed to be telling me?  I _know_
> > I'm shutting the machine down.

> > Can anybody here tell me how to disable this ing annoyance?

> > Many thanks in advance!


> IIRC you must disable CONFIG_INPUT_PCSPKR in the Kernel config.

No, no, no!  I don't want to disable my loudspeaker!  For example, I get
beeps through my ssh connection with my ISP telling me that new mail has
arrived.

I simply want to disable that one particular beeping at shutdown time.
(OK, I want to disable the beeping when I click to exit XFCE too, but
I've sent that question to an XFCE list.)

> --
> Regards
> wabe

-- 
Alan Mackenzie (Nuremberg, Germany).



Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Matthias Gerstner
Hi Alan,

> I simply want to disable that one particular beeping at shutdown time.

well this topic made me curious where the beep is coming from.

It does originate from the shutdown command itself which is part of the
sys-apps/sysvinit package. In this package's source you find can a file
"src/dowall.c", where you will in turn find a function "wall(...)".

This is the function where the warning messages will be produced that
show up in the terminal and the message is produced like this:

snprintf(line, sizeof(line),
"\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
user, hostname, tty, date);

The "\007" is the beep you're getting. It's a bell character that you
can produce manually by doing this, too:

echo -e "\007"

Unfortunately the bell character is hard coded into the warning message.
Also there seems to be no way to suppress the warning message.

But you could still try is to disable the interpretation of the bell
character by your terminal. Then you could make an alias or wrapper
around the original shutdown command that does this.

According to Arch Linux docs here:

https://wiki.archlinux.org/index.php/Disable_PC_speaker_beep

You can locally disable the bell in the terminal by calling "setterm
-blength 0". But this doesn't work with my terminals. Says it's
unsupported.

Then you can put this in your ~/.inputrc: "set bell-style none". This
works for me. Then, however, all terminals stop beeping. The pcspkr is
still loaded though and can be used.

As you only want to stop the beep only during shutdown you might also be
able to call "xset -b", disabling the bell on the X-server (globally?).
This is not persistent across reboots and you won't have any beeps until
the machine shuts down.

Regards

Matthias


signature.asc
Description: Digital signature


[gentoo-user] Re: How is /etc/portage/env supposed to work?

2015-10-20 Thread Nikos Chantziaras

On 20/10/15 17:26, Michael Orlitzky wrote:

On 10/20/2015 10:04 AM, Nikos Chantziaras wrote:

I'm following the documentation here:

https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Using_.2Fetc.2Fportage.2Fenv

to hook into the postinst phase of an ebuild.


Deja vu:

   http://comments.gmane.org/gmane.linux.gentoo.devhelp/151

   https://bugs.gentoo.org/show_bug.cgi?id=388781

There's two separate uses for /etc/portage/env -- one of them will get
you the make.conf parser (when you list the file in
/etc/portage/package.env) and the other that will get you the bash
parser (when you put the file at /etc/portage/env/${CATEGORY}/${PN}).

The whole thing is confusing. If you ever get it working please put a
decent example on the wiki because I remember spending hours trying to
do the same thing.


As suggested by Neil, putting the code in /etc/portage/env/app-misc/mc 
worked.


Will later write an example in the Wiki.




Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alan McKinnon
On 20/10/2015 18:10, Alan Mackenzie wrote:
> Hello, Gentoo.
> 
> Every time I shut down my gentoo system with "shutdown -h now", it beeps
> at me.  This is becoming steadily more irritating as the months go by.
> Just what is this beep supposed to be telling me?  I _know_ I'm shutting
> the machine down.
> 
> Can anybody here tell me how to disable this ing annoyance?
> 
> Many thanks in advance!
> 


Where is the beep coming from?

Real speakers (like where music comes out) - check Alerts &
Notifications or similar in your DE.

That silly monotone speaker that can only make bing noises and has been
in pc's since the first one?

Is this happening inside a DE session, or from a virtual console?

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Alec Ten Harmsel



On 2015-10-20 12:10, Alan Mackenzie wrote:

Hello, Gentoo.

Every time I shut down my gentoo system with "shutdown -h now", it beeps
at me.  This is becoming steadily more irritating as the months go by.
Just what is this beep supposed to be telling me?  I _know_ I'm shutting
the machine down.


Eh, you may not know. What if someone is SSH'd in and shuts it down? 
Anyways, disabling this is always the first thing I do when I boot 
ArchLinux.




Can anybody here tell me how to disable this ing annoyance?


I am unfortunately on a Windows box and do not have access to Linux at 
the moment, but there is a kernel module - pcspkr - that causes this. 
You can remove this from your kernel config to prevent it from ever 
happening again. It is also possible to blacklist it, but I'm not sure 
how to do that since I only build in modules for my kernels that I may 
need/are useful.


To test right now, you can 'rmmod pcspkr' and try shutting down.

Alec



Re: [gentoo-user] How is /etc/portage/env supposed to work?

2015-10-20 Thread Neil Bothwick
On Tue, 20 Oct 2015 17:04:10 +0300, Nikos Chantziaras wrote:

> I'm following the documentation here:
> 
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Using_.2Fetc.2Fportage.2Fenv
> 
> to hook into the postinst phase of an ebuild. The docs only provide an 
> actual example for the global hook case (/etc/portage/bashrc), but it 
> says it works the same way on a per-ebuild basis
> using /etc/portage/env. But it is totally silent on how to actually do
> that :-/
> 
> So I assume, since the docs don't mention anything special, that I 
> should put the code in a conf file. So I created this file:
> 
>/etc/portage/env/test.conf
> 
> and in it:
> 
>if [ "${EBUILD_PHASE}" == "postinst" ];
>then
>echo ":: TEST"
>fi
> 
> Then I added this line to /etc/portage/package.env:
> 
>app-misc/mc test.conf
> 
> But when I "emerge app-misc/mc", I get:
> 
> !!! Problem in 'app-misc/mc' dependencies.
> !!! "/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=') 
> portage.exception
> ... done!
> "/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=')
> 
> I don't get it... Can't I have a per-package bashrc or something? The 
> docs are suggesting that I can, but don't tell me how.

I'm nut sure you can put that sort of thing in package.env, I thought it
was only for settings variables, like make.conf but per-package. You can
add function calls in /etc/portage/env/cat/pkg, for example I have
used this for a couple of packages that didn't support epatch_user

post_src_unpack() {
cd "${S}"
epatch_user
}

AFAIK you can do this for any of the standard ebuild functions listed in
man 5 ebuild.


-- 
Neil Bothwick

"We demand rigidly defined areas of doubt and uncertainty!"


pgpYc64XEVc9K.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread wabenbau
Alan Mackenzie  wrote:

> Hello, Gentoo.
> 
> Every time I shut down my gentoo system with "shutdown -h now", it
> beeps at me.  This is becoming steadily more irritating as the months
> go by. Just what is this beep supposed to be telling me?  I _know_
> I'm shutting the machine down.
> 
> Can anybody here tell me how to disable this ing annoyance?
> 
> Many thanks in advance!
> 

IIRC you must disable CONFIG_INPUT_PCSPKR in the Kernel config.

--
Regards
wabe



[gentoo-user] Re: How is /etc/portage/env supposed to work?

2015-10-20 Thread Nikos Chantziaras

On 20/10/15 18:37, Neil Bothwick wrote:

On Tue, 20 Oct 2015 17:04:10 +0300, Nikos Chantziaras wrote:


So I assume, since the docs don't mention anything special, that I
should put the code in a conf file. So I created this file:

/etc/portage/env/test.conf

and in it:

if [ "${EBUILD_PHASE}" == "postinst" ];
then
echo ":: TEST"
fi
 [...]

But when I "emerge app-misc/mc", I get:

!!! Problem in 'app-misc/mc' dependencies.
!!! "/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=')
portage.exception
... done!
"/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=')


I'm nut sure you can put that sort of thing in package.env, I thought it
was only for settings variables, like make.conf but per-package. You can
add function calls in /etc/portage/env/cat/pkg, for example I have
used this for a couple of packages that didn't support epatch_user

post_src_unpack() {
 cd "${S}"
 epatch_user
}

AFAIK you can do this for any of the standard ebuild functions listed in
man 5 ebuild.


Thanks! That works just fine.

Btw, you can put your epatch_user in /etc/portage/bashrc instead and 
have it for all packages. It is safe to have it twice even in packages 
that do support epatch_user. That function is specifically written for 
this use case, so that even when using it multiple times, the patches 
are only applied once.





Re: [gentoo-user] Re: How is /etc/portage/env supposed to work?

2015-10-20 Thread Neil Bothwick
On Tue, 20 Oct 2015 19:32:15 +0300, Nikos Chantziaras wrote:

> Btw, you can put your epatch_user in /etc/portage/bashrc instead and 
> have it for all packages. It is safe to have it twice even in packages 
> that do support epatch_user. That function is specifically written for 
> this use case, so that even when using it multiple times, the patches 
> are only applied once.

That's good to know. I only set it where I knew I needed it because I was
unsure of that. However, the files are dated Feb 2012, so things have
probably improved since then.


-- 
Neil Bothwick

- We are but packets in the internet of Life-


pgpCFdUhbTwnT.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Can I suppress the bleep when shutting down?

2015-10-20 Thread Marc Joliet
On Tuesday 20 October 2015 20:48:22 Alan McKinnon wrote:
>On 20/10/2015 19:57, Marc Joliet wrote:
>> On Tuesday 20 October 2015 19:22:48 Matthias Gerstner wrote:
>>> Hi Alan,
>>> 
 I simply want to disable that one particular beeping at shutdown time.
>>> 
>>> well this topic made me curious where the beep is coming from.
>>> 
>>> It does originate from the shutdown command itself which is part of the
>>> sys-apps/sysvinit package. In this package's source you find can a file
>>> "src/dowall.c", where you will in turn find a function "wall(...)".
>>> 
>>> This is the function where the warning messages will be produced that
>>> show up in the terminal and the message is produced like this:
>>> 
>>> snprintf(line, sizeof(line),
>>> 
>>> "\007\r\nBroadcast message from %s@%s %s(%s):\r\n\r\n",
>>> user, hostname, tty, date);
>>> 
>>> The "\007" is the beep you're getting. It's a bell character that you
>>> can produce manually by doing this, too:
>>> 
>>> echo -e "\007"
>>> 
>>> Unfortunately the bell character is hard coded into the warning message.
>>> Also there seems to be no way to suppress the warning message.
>> 
>> [...]
>> 
>> If it's caused by the call to wall(), then maybe the --no-wall option to
>> shutdown will help?
>
>I don't have that option in my ~arch shutdown

*Sigh* then it's probably unique to systemd[sysv-utils].  Sorry for not 
thinking about that.

-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup


signature.asc
Description: This is a digitally signed message part.


Re: [gentoo-user] How is /etc/portage/env supposed to work?

2015-10-20 Thread Alexander Kapshuk
On Tue, Oct 20, 2015 at 5:04 PM, Nikos Chantziaras  wrote:

> I'm following the documentation here:
>
>
> https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Using_.2Fetc.2Fportage.2Fenv
>
> to hook into the postinst phase of an ebuild. The docs only provide an
> actual example for the global hook case (/etc/portage/bashrc), but it says
> it works the same way on a per-ebuild basis using /etc/portage/env. But it
> is totally silent on how to actually do that :-/
>
> So I assume, since the docs don't mention anything special, that I should
> put the code in a conf file. So I created this file:
>
>   /etc/portage/env/test.conf
>
> and in it:
>
>   if [ "${EBUILD_PHASE}" == "postinst" ];
>   then
>   echo ":: TEST"
>   fi
>
> Then I added this line to /etc/portage/package.env:
>
>   app-misc/mc test.conf
>
> But when I "emerge app-misc/mc", I get:
>
> !!! Problem in 'app-misc/mc' dependencies.
> !!! "/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=')
> portage.exception
> ... done!
> "/etc/portage/env/test.conf", line 1: Invalid token '[' (not '=')
>

According to test(1), comparing two strings for equality is done using a
single '=':
STRING1 = STRING2
  the strings are equal

Try '[ "${EBUILD_PHASE}" = postinst ]' to hush the 'invalid token' thingie.


>
> I don't get it... Can't I have a per-package bashrc or something? The docs
> are suggesting that I can, but don't tell me how.
>
>
>