Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] /usr/portage/distfiles as sep. part., got sync err.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 482

PostPosted: Sat Mar 16, 2019 11:09 am    Post subject: [solved] /usr/portage/distfiles as sep. part., got sync err. Reply with quote

I made my /usr/portage/distfiles directory as a separate partition (btrfs subvolume, actually). Now, when syncing, I get the following error:
Code:
rsync: delete_file: rmdir(distfiles) failed: Device or resource busy (16)

This causes the sync to fail.

Is there some configuration that I can adapt to make it possible to have /usr/portage/distfiles directory as a separate partition?


Last edited by equaeghe on Sat Mar 16, 2019 2:23 pm; edited 1 time in total
Back to top
View user's profile Send private message
Blind_Sniper
Tux's lil' helper
Tux's lil' helper


Joined: 20 Apr 2018
Posts: 106

PostPosted: Sat Mar 16, 2019 12:47 pm    Post subject: Reply with quote

add this to your make.conf:
Code:
DISTDIR="/mount/point/for/your/distfiles/partition"

if you want to have distfiles directory at separate partition
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43546
Location: 56N 3W

PostPosted: Sat Mar 16, 2019 12:53 pm    Post subject: Reply with quote

equaeghe,

If you mountthe partition at /usr/portage/distfiles in the usual way, it should just work.
There is a trap for the unwary.
The content of distfiles should all be owned by portage:portage. If you copied the content as root, portage will no longer be able to delete files or directories.

If you relocated /usr/portage/distfiles, follow Blind_Snipers advice.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 482

PostPosted: Sat Mar 16, 2019 2:08 pm    Post subject: Reply with quote

Blind_Sniper wrote:
add this to your make.conf:
Code:
DISTDIR="/mount/point/for/your/distfiles/partition"

if you want to have distfiles directory at separate partition

This worked. (mounted at /usr/portage/distfiles) Thanks!
Back to top
View user's profile Send private message
equaeghe
Guru
Guru


Joined: 22 Feb 2005
Posts: 482

PostPosted: Sat Mar 16, 2019 2:22 pm    Post subject: Reply with quote

NeddySeagoon wrote:
If you mountthe partition at /usr/portage/distfiles in the usual way, it should just work.
There is a trap for the unwary.
The content of distfiles should all be owned by portage:portage. If you copied the content as root, portage will no longer be able to delete files or directories.

Hmm, I did mount it there, but it didn't. I'd copied using 'cp -ax', so the owner should have been good.

This is the current ownership state (which works):
Code:
# ls -al /usr/portage/distfiles/
total 193416
drwxrwxr-x 1 root    portage       550 16 mrt 14:58 .
drwxr-xr-x 1 root    root         3486 16 mrt 14:50 ..
-rw-rw-r-- 1 portage portage    419576 16 mrt 14:58 eclass-manpages-20190314.tar.xz
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43546
Location: 56N 3W

PostPosted: Sat Mar 16, 2019 4:38 pm    Post subject: Reply with quote

equaeghe,

I don't understand what happened.
The permission are correct.
/usr/portage/distfiles/ is the default location.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 14056

PostPosted: Sat Mar 16, 2019 5:01 pm    Post subject: Reply with quote

For reasons not yet explained, rsync wanted to delete (and presumably eventually recreate) that directory. Deleting a directory while it is a mount point will definitely fail with the error shown. The immediate solution is to make rsync not try to delete the directory. For reasons also not explained, rsync ceased trying. Perhaps setting $DISTDIR caused Portage to configure rsync differently.

If the problem recurs, try to get rsync to explain why it wants to delete that directory.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming 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