Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[etc-update] Comment ça marche???? (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
Adrien
Advocate
Advocate


Joined: 13 Jul 2004
Posts: 2295
Location: Bretagne

PostPosted: Fri Oct 08, 2004 9:52 am    Post subject: [etc-update] Comment ça marche???? (résolu) Reply with quote

Salut à tous! :)

J'ai fait hier :
Code:
emerge --update world
emerge --update system


Donc c'était assez long et il m'a tout mis à jour mais j'ai pleins de fichiers à mettre à jour...(environ 50) :?

J'ai entendu qu'il fallait faire gaffe aux fichiers qu'il met à jour alors voilà, je me demandais comment on peut faire pour être sûr de ne pas faire une connerie en écrasant des fichiers qui seraient importants...

Parce que par exemple il veut mettre à jour mon fstab...enfin bref... :roll:

Bon si vous pouviez m'expliquer un peu :)

@+


Last edited by Adrien on Wed Nov 17, 2004 12:27 pm; edited 1 time in total
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: Fri Oct 08, 2004 9:56 am    Post subject: Re: [etc-update] Comment ça marche???? (non résolu) Reply with quote

Adrien wrote:

Donc c'était assez long et il m'a tout mis à jour mais j'ai pleins de fichiers à mettre à jour...(environ 50) :?

J'ai entendu qu'il fallait faire gaffe aux fichiers qu'il met à jour alors voilà, je me demandais comment on peut faire pour être sûr de ne pas faire une connerie en écrasant des fichiers qui seraient importants...

Mon conseil c'est de pas être bourré quand tu fais ton etc-update, et de faire attention aux fichiers qui sont en jeu. Pour la plupart, tu acceptes les updates mais pour certains tu fai super gaffe.
donc tu commences à regarder s'il y a pas des fichiers importants dans la liste et si oui tu les traites au cas par cas puis le reste un -5 et hop ça roule.
sinon il doit y avoir moyen de protéger ses fichiers de conf avec la variable CONFIG_PROTECT et CONFIG_PROTECT_MASK
que tu dois pouvoir définir dans le /etc/profile et/ou make.conf

[edit] encore un qui cherche pas avant de poster:
man etc-update wrote:
ETC-UPDATE(1) Portage ETC-UPDATE(1)



NAME
etc-update - handle configuration file updates

SYNOPSIS
etc-update

DESCRIPTION
etc-update is supposed to be run after merging a new package to see if there are updates to the configuration files. If a
new configuration file will override an old one, etc-update will prompt the user for a decision.

etc-update will check all directories in the CONFIG_PROTECT variable. All config files found in CONFIG_PROTECT_MASK will
automatically be updated for you by etc-update
. See make.conf(5) for more information.

OPTIONS
None.

_________________
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
inode77
Veteran
Veteran


Joined: 20 Jan 2004
Posts: 1303
Location: Heart of Europe

PostPosted: Fri Oct 08, 2004 10:04 am    Post subject: Reply with quote

Mon français n'est pas si bien mais je vais essayer.
Si tu fais un "emerge sync && emerge -u world" ce n' est plus necesaire de faire un "emerge -u system" parceque system c'est q'une subpartie de world.
Pour ne pas ecraser des fichier importantes, fait une copy de tous les fichier dans /etc avant de mettre a jour ces configurations avec etc-update.
Code:
cp -rp /etc /root

Apres tu tapes etc-update et apres tu peux taper la touche "ENTER" pour voir les differences entre update et ce qui est la.
https://forums.gentoo.org/viewtopic.php?t=207375 (Ca fait etc-update plus facile IMHO)
Une regle simple c'est les fichier qu'e ta jamais touche il y a pas probleme de dire update. Les autre tu devrais etre capable de dire comment faire le update.
Back to top
View user's profile Send private message
Adrien
Advocate
Advocate


Joined: 13 Jul 2004
Posts: 2295
Location: Bretagne

PostPosted: Fri Oct 08, 2004 10:07 am    Post subject: Reply with quote

Bien vu sireyessire
:oops:

Donc si je comprend bien , il faut spécifier dans la variable CONFIG_PROTECT les fichiers qu'on ne veut pas modifier en gros...

@ inode77: Merci à toi, c'est intéressant et plutôt logique :) btw ton français est plutôtbien en fait...
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: Fri Oct 08, 2004 10:10 am    Post subject: Reply with quote

j'avais oublié un truc: le merge entre le fichier original et l'update:
pour les fichiers un peu sensibles comme le make.conf, le conf.d/net tu aimes bien avoir les derniers commentaires mais pas avoir à tout retaper alors tu as l'option 3 qui est faite pour toi: il te propose de chaque côté de l'écran les différences et tu choisis:
à gauche c'est le fichier original , à droite le nouveau. et tu choisis entre l (left) et r (right) pour recréer un mix des 2: par exemple si c'est que des commentaires sympa, vaut mieux prendre les plus récents (r) mais si c'est tes paramètres alors gardons les ancien (l).
ils y a d'autres options dans cette phase mais je crois qu'en faisant tab ou help on les a.
_________________
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
Adrien
Advocate
Advocate


Joined: 13 Jul 2004
Posts: 2295
Location: Bretagne

PostPosted: Fri Oct 08, 2004 10:21 am    Post subject: Reply with quote

Merci sireyessire :wink: D'ailleurs, je précise, le pb c'est que j'aurais pas pu faire un man etc-update car je suis au taf et pas chez moi là... :roll:

Voili, voilà

@+++
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: Fri Oct 08, 2004 10:31 am    Post subject: Reply with quote

Adrien wrote:
Bien vu sireyessire
:oops:

Donc si je comprend bien , il faut spécifier dans la variable CONFIG_PROTECT les fichiers qu'on ne veut pas modifier en gros...

en plus clair:
man make.conf wrote:
CONFIG_PROTECT = [space delimited list of dirs]
All directories that are defined here will have "config file protection" enabled for them. For more information,
please see `emerge --help config`.

CONFIG_PROTECT_MASK = [space delimited list of dirs]
All directories that are defined here will have "config file protection" disabled for them. For more information,
please see `emerge --help config`.
Code:
$emerge --help config
Config file management support (preliminary)

Portage has a special feature called "config file protection".  The purpose of
this feature is to prevent new package installs from clobbering existing
configuration files.  By default, config file protection is turned on for /etc
and the KDE configuration dirs; more may be added in the future.

When Portage installs a file into a protected directory tree like /etc, any
existing files will not be overwritten.  If a file of the same name already
exists, Portage will change the name of the to-be- installed file from 'foo' to
'._cfg0000_foo'.  If '._cfg0000_foo' already exists, this name becomes
'._cfg0001_foo', etc.  In this way, existing files are not overwritten,
allowing the administrator to manually merge the new config files and avoid any
unexpected changes.

In addition to protecting overwritten files, Portage will not delete any files
from a protected directory when a package is unmerged.  While this may be a
little bit untidy, it does prevent potentially valuable config files from being
deleted, which is of paramount importance.

Protected directories are set using the CONFIG_PROTECT variable, normally
defined in /etc/make.globals.  Directory exceptions to the CONFIG_PROTECTed
directories can be specified using the CONFIG_PROTECT_MASK variable.  To find
files that need to be updated in /etc, type:

# find /etc -iname '._cfg????_*'

You can disable this feature by setting CONFIG_PROTECT="-*" in /etc/make.conf.
Then, Portage will mercilessly auto-update your config files.  Alternatively,
you can leave Config File Protection on but tell Portage that it can overwrite
files in certain specific /etc subdirectories.  For example, if you wanted
Portage to automatically update your rc scripts and your wget configuration,
but didn't want any other changes made without your explicit approval, you'd
add this to /etc/make.conf:

CONFIG_PROTECT_MASK="/etc/wget /etc/rc.d"

etc-update is also available to aid in the merging of these files. It provides
a vimdiff interactive merging setup and can auto-merge trivial changes.

donc si tu veux qu'on te pose la question de savoir si on doit ou pas updater un fichier, il faut que sn repertoire soit dans CONFIG_PROTECT
si tu veux qu'il soit mis tout seul à jour ors de l'emerge, son répertoire doit être dans CONFIG_PROTECT_MASK, mzis si tu veux qu'il ne soit jmais mis à jour, cela n'est pas dit :( mais le simple fait de le sortir de CONFIG_PROTECT sans le mettre dans le UMASK ne veut pas dire de toute façon on y touche pas.

donc tu as pas d'autre choix que d'apprendre le etc-update. mais je crois qu'il y a des gui pour etc-update non?
_________________
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