Bug 117546 - ndiswrapper ebuild fails while trying to re-install windows drivers
Bug#: 117546 Product:  Gentoo Linux Version: 2005.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: mobile@gentoo.org Reported By: carenas@sajinet.com.pe
Component: Ebuilds
URL: 
Summary: ndiswrapper ebuild fails while trying to re-install windows drivers
Keywords:  
Status Whiteboard: 
Opened: 2006-01-02 23:45 0000
Description:   Opened: 2006-01-02 23:45 0000
as shown by :

 * Attempting to automatically reinstall any Windows drivers
 * you might already have.
 * Driver: netbc564
mv: cannot overwrite directory `/tmp/netbc564'
netbc564 is already installed. Use -e to remove it

how to reproduce :

  `module-rebuild rebuild` twice

problems :

* mv won't succeed if another directory with the same name already exists
* if forced, it will lead to a security problem (race condition)
* assumes /tmp is available as a TMPDIR
* leaves /tmp dirty

------- Comment #1 From Carlo Marcelo Arenas Belon 2006-01-03 01:02:22 0000 -------
Created an attachment (id=76051) [details]
"obvious" patch to the problem

still problematic as :

0) not tested
1) not using a real lock and therefore has a race condition between the test
and the mv/rm
2) probably still violates the sandbox rules by using ${TMPDIR}

------- Comment #2 From Petteri Räty 2006-06-22 05:33:57 0000 -------
(In reply to comment #1)
> Created an attachment (id=76051) [edit] [details]
> "obvious" patch to the problem
> 
> still problematic as :
> 
> 0) not tested
> 1) not using a real lock and therefore has a race condition between the test
> and the mv/rm
> 2) probably still violates the sandbox rules by using ${TMPDIR}
> 

Well I think I fixed this by switching to using ${T} that should be used within
ebuilds. Please test ndiswrapper-1.17 and reopen if not fixed well enough. I
don't have the hardware at hand atm so I can't test.

------- Comment #3 From Carlo Marcelo Arenas Belon 2006-06-23 09:07:48 0000 -------
confirmed: works like a charm, thanks