# Can not emerge broadcom-sta on 3.12.21-gentoo-r1

## xaon

Hi guys!

i got this errors, when trying to emerge broadcom-sta: 

```

>>> Preparing source in /var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/work ...

 * Applying broadcom-sta-5.10.91.9-license.patch ...

egrep: /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch: Permission denied

egrep: /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch: Permission denied

/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/temp/environment: line 907: /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch: Permission denied

/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/temp/environment: line 907: /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch: Permission denied

/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/temp/environment: line 907: /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch: Permission denied

/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/temp/environment: line 907: /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch: Permission denied

/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/temp/environment: line 907: /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch: Permission denied

 * Failed Patch: broadcom-sta-5.10.91.9-license.patch !

 *  ( /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch )

 *

 * Include in your bugreport the contents of:

 *

 *   /var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/temp/broadcom-sta-5.10.91.9-license.patch.out

 * ERROR: net-wireless/broadcom-sta-5.100.82.112-r3::x-portage failed (prepare phase):

 *   Failed Patch: broadcom-sta-5.10.91.9-license.patch!

 *

 * Call stack:

 *     ebuild.sh, line   93:  Called src_prepare

 *   environment, line 2945:  Called epatch '/usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch' '/usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.38-gcc.patch' '/usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.111-linux-3.0.patch' '/usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-2.6.39.patch' '/usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.100.82.112-linux-3.2.patch'

 *   environment, line  768:  Called epatch '/usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch'

 *   environment, line  945:  Called die

 * The specific snippet of code:

 *               die "Failed Patch: ${patchname}!";

 *

 * If you need support, post the output of `emerge --info '=net-wireless/broadcom-sta-5.100.82.112-r3::x-portage'`,

 * the complete build log and the output of `emerge -pqv '=net-wireless/broadcom-sta-5.100.82.112-r3::x-portage'`.

 * The complete build log is located at '/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/temp/environment'.

 * Working directory: '/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/work'

 * S: '/var/tmp/portage/net-wireless/broadcom-sta-5.100.82.112-r3/work'

```

my ' /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch'  has permission 

```
-rwx------ 1 root root 716 
```

and i was running as root

----------

## khayyam

 *xaon wrote:*   

> my ' /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch'  has permission ...
> 
> ```
> -rwx------ 1 root root 716 
> ```
> ...

 

xaon ... portage runs as a non-root user ... 'portage', so the above file can't be accessed. You can either change ownership or modify the permissions.

best ... khay

----------

## xaon

 *Quote:*   

> xaon ... portage runs as a non-root user ... 'portage', so the above file can't be accessed. You can either change ownership or modify the permissions. 

 

Hi khayyam, thanks for your reply.

i am logging as root and run 

```
emerge broadcom-sta
```

, so it should be root?

and i also modified the permission to 

```
-rwxrwxrwx 1 root root 716 Jan 30  2013 /usr/local/portage/net-wireless/broadcom-sta/files/broadcom-sta-5.10.91.9-license.patch

```

but still get the same errors  :Sad: 

----------

## khayyam

xaon ...

You are running the command as root but the process is run as portage ... by default FEATURES="userpriv" is set.

The only explanation for the above is that though the patch is readable the path to the patch is not. Most likely you created /usr/local/portage/**/* with the same ownership and permissions as the patch.

best ... khay

----------

## xaon

thanks khayyam! i think i got the driver installed. but it doesn't seems to work...

since it's a different problem, i have opened another post here:

https://forums.gentoo.org/viewtopic-p-7576544.html#7576544

----------

