Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
OSError: [Errno 16] Device or resource busy
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
linkmark
n00b
n00b


Joined: 15 Nov 2004
Posts: 36
Location: belgium

PostPosted: Fri Oct 27, 2006 7:45 pm    Post subject: OSError: [Errno 16] Device or resource busy Reply with quote

Hi all.

Once a few weeks i update my portage tree, a few day's ago i ran into this problem after a emerge --sync

Code:
Performing Global Updates: /usr/portage/profiles/updates/2Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
........................................


Performing Global Updates: /usr/portage/profiles/updates/3Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
...............


Performing Global Updates: /usr/portage/profiles/updates/4Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
......
ppTraceback (most recent call last):
  File "/usr/bin/emerge", line 4049, in ?
    emerge_main()
  File "/usr/bin/emerge", line 3770, in emerge_main
    portage.global_updates(settings, trees, mtimedb["updates"])
  File "/usr/lib/portage/pym/portage.py", line 6656, in global_updates
    myupd)
  File "/usr/lib/portage/pym/portage_update.py", line 198, in update_config_files
    write_atomic(updating_file, "".join(file_contents[x]))
  File "/usr/lib/portage/pym/portage_util.py", line 728, in write_atomic
    f.close()
  File "/usr/lib/portage/pym/portage_util.py", line 696, in close
    os.rename(self.name, self._real_name)
OSError: [Errno 16] Device or resource busy


Since then i always get the same output as pasted above when i do the emerge command, no mather what comes afther emerge (emerge --sync or emerge xmms ..). I read on this site (http://marc.theaimsgroup.com/?l=gentoo-user&m=115775005311326&w=2) that remouving the portage tree would help, then emerge-webrsync and then a normal sync but also with the emerge-webrsync i get this error:
Code:
Number of files: 149406
Number of files transferred: 125466
Total file size: 157682989 bytes
Total transferred file size: 157682989 bytes
Literal data: 157682989 bytes
Matched data: 0 bytes
File list size: 3538419
Total bytes written: 166741909
Total bytes read: 2509340

wrote 166741909 bytes  read 2509340 bytes  567005.86 bytes/sec
total size is 157682989  speedup is 0.93
cleaning up
transferring metadata/cache


Performing Global Updates: /usr/portage/profiles/updates/2Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
........................................


Performing Global Updates: /usr/portage/profiles/updates/3Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
...............

Performing Global Updates: /usr/portage/profiles/updates/4Q-2006
(Could take a couple of minutes if you have a lot of binary packages.)
  .='update pass'  *='binary update'  @='/var/db move'
  s='/var/db SLOT move' S='binary SLOT move' p='update /etc/portage/package.*'
......
ppTraceback (most recent call last):
  File "/usr/bin/emerge", line 4049, in ?
    emerge_main()
  File "/usr/bin/emerge", line 3770, in emerge_main
    portage.global_updates(settings, trees, mtimedb["updates"])
  File "/usr/lib/portage/pym/portage.py", line 6656, in global_updates
    myupd)
  File "/usr/lib/portage/pym/portage_update.py", line 198, in update_config_files
    write_atomic(updating_file, "".join(file_contents[x]))
  File "/usr/lib/portage/pym/portage_util.py", line 728, in write_atomic
    f.close()
  File "/usr/lib/portage/pym/portage_util.py", line 696, in close
    os.rename(self.name, self._real_name)
OSError: [Errno 16] Device or resource busy

 *** Completed websync, please now perform a normal rsync if possible.
     Update is current as of the of YYYYMMDD: 20061026


Realy don't know what to do. Google delivered nothing, searching the gentoo forums also nothing and on #gentoo (freenode) i don't get any reply.

Anyone has a suggestion?

Thanks in advanced !
linkmark
Back to top
View user's profile Send private message
Abraxas
l33t
l33t


Joined: 25 May 2003
Posts: 814

PostPosted: Fri Oct 27, 2006 8:50 pm    Post subject: Reply with quote

Download portage-2.1.1.tar.bz2 and the patch for 2.1.1-r1 from http://distfiles.gentoo.org/distfiles/ into a working directory

unpack both portage and the patch into the working directory

Code:
tar xvjf portage-2.1.1.tar.bz2

Code:
bzip2 -d portage-2.1.1-r1.patch.bz2


change directories into the portage folder under the working directory

Code:
cd portage


patch portage 2.1.1

Code:
patch -p0 < /PATH/TO/PATCH


replace bash and python files with newer versions

Code:
cp -R pym bin /usr/lib/portage/


That should do it. This problem seems to only affect version 2.1.1 so if you want to be safe I would upgrade to 2.1.1-r1. If you are still having problems try downloading the latest portage snapshot from http://distfiles.gentoo.org/snapshots/ and unpacking it:

Code:
 tar xvjf portage-latest.tar.bz2 -C /usr


Don't forget to emerge --sync when all is said and done.
Back to top
View user's profile Send private message
synss
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 282
Location: Dijon > Berlin > Tokyo > Nürnberg > München

PostPosted: Sat Oct 28, 2006 5:09 am    Post subject: Reply with quote

Well, thank you, it worked here too. Though I did it in a simpler way:
  1. removed the offending updates in /usr/portage/profiles/updates so that emerge works
  2. unmasked and emerge-d portage-2.1.1-r1
    Code:
    echo "=sys-apps/portage-2.1.1-r1" >> /etc/portage/package.keywords/portage-2.1.1-r1
    emerge portage

  3. then emerge --sync
and everything is fine now. (The updates are downloaded again, so that removing them in the first place is OK)

Though, it is annoying when running stable...
_________________
Compress portage tree
Elog viewer
Autodetect swap
Back to top
View user's profile Send private message
tomk
Bodhisattva
Bodhisattva


Joined: 23 Sep 2003
Posts: 7221
Location: Sat in front of my computer

PostPosted: Sat Oct 28, 2006 9:44 am    Post subject: Reply with quote

Moved from Portage & Programming to Duplicate Threads, please see this topic: portage fails - errno 16 Device or resource busy.
_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum