Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[système de fichiers] les .keep ça sert à quoi ? (résolu)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
scout
Veteran
Veteran


Joined: 08 Mar 2003
Posts: 1991
Location: France, Paris en Semaine / Metz le W-E

PostPosted: Sun Oct 03, 2004 10:17 am    Post subject: [système de fichiers] les .keep ça sert à quoi ? (résolu Reply with quote

Voilà j'installait gentoo quand j'ai toruvé des fichiers .keep vides un peu partout dans /mnt
Question bête: ça sert à quoi les .keep ?
_________________
http://petition.eurolinux.org/ - Petition against ePatents
L'essence de la finesse


Last edited by scout on Tue Oct 05, 2004 2:41 am; edited 1 time in total
Back to top
View user's profile Send private message
cylgalad
Veteran
Veteran


Joined: 18 Apr 2003
Posts: 1327
Location: France

PostPosted: Sun Oct 03, 2004 10:24 am    Post subject: Reply with quote

Sans doute à éviter que les noobs n'effacent un répertoire vide mais nécessaire. Peut-être y-a-t'il un logiciel qui fait usage de ces fichiers pour déterminer se qu'il doit faire d'un répertoire, va savoir :D
Back to top
View user's profile Send private message
marvin rouge
Veteran
Veteran


Joined: 01 Aug 2004
Posts: 1422
Location: Villa Lumierrante, Zonelibre

PostPosted: Sun Oct 03, 2004 10:28 am    Post subject: Reply with quote

il me semble que le logiciel en question s'appelle "emerge" :)

mais je n'arrive plus a trouver la reference ou j'ai vu ca. Si je me souviens bien, ca evite que "emerge" supprime des répertoires lors des cleaning. A confirmer.
Back to top
View user's profile Send private message
sireyessire
Advocate
Advocate


Joined: 20 Mar 2003
Posts: 2991
Location: back in Paris, France

PostPosted: Sun Oct 03, 2004 10:57 am    Post subject: Reply with quote

marvin rouge wrote:
il me semble que le logiciel en question s'appelle "emerge" :)

mais je n'arrive plus a trouver la reference ou j'ai vu ca. Si je me souviens bien, ca evite que "emerge" supprime des répertoires lors des cleaning. A confirmer.

non, il crée ces .keep lors de l'émerge de baselayout. Mais je sais pas à quoi ils servent
_________________
I never think of the future. It comes soon enough.
Albert Einstein

Try simpler first
Shockley
Back to top
View user's profile Send private message
marvin rouge
Veteran
Veteran


Joined: 01 Aug 2004
Posts: 1422
Location: Villa Lumierrante, Zonelibre

PostPosted: Sun Oct 03, 2004 11:01 am    Post subject: Reply with quote

rhaaa ... je trouve plus la reference. Le search sur les forum ne donne rien...
Back to top
View user's profile Send private message
sireyessire
Advocate
Advocate


Joined: 20 Mar 2003
Posts: 2991
Location: back in Paris, France

PostPosted: Sun Oct 03, 2004 11:13 am    Post subject: Reply with quote

marvin rouge wrote:
rhaaa ... je trouve plus la reference. Le search sur les forum ne donne rien...

moi j'ai une bonne référence :
baselayout-1.10.4.ebuild wrote:
# This is a temporary workaround until bug 9849 is completely solved
# in portage. We need to create the directories so they're available
# during src_install, but when src_install is finished, call unkdir
# to remove any empty directories instead of leaving them around.
kdir() {
typeset -a args
typeset d

# Create the directories for the remainder of src_install, and
# remember how to create the directories later.
for d in "$@"; do
if [[ $d == /* ]]; then
install -d "${args[@]}" "${D}/${d}"
cat >> "${D}/usr/share/baselayout/mkdirs.sh" <<EOF
install -d ${args[@]} "\${ROOT}/${d}" 2>/dev/null \\
|| ewarn " can't create ${d}"
touch "\${ROOT}/${d}/.keep" 2>/dev/null \\
|| ewarn " can't create ${d}/.keep"
EOF
else
args=("${args[@]}" "${d}")
fi
done
}

# Continued from kdir above... This function removes any empty
# directories as a temporary workaround for bug 9849. The directories
# (and .keep files) are re-created in pkg_postinst, which means they
# aren't listed in CONTENTS, unfortunately.
unkdir() {
einfo "Running unkdir to workaround bug 9849"
find ${D} -depth -type d -exec rmdir {} \; 2>/dev/null
if [[ $? == 127 ]]; then
ewarn "Problem running unkdir: find command not found"
fi
}

_________________
I never think of the future. It comes soon enough.
Albert Einstein

Try simpler first
Shockley
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French 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