Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 433694

Summary: emaint cleanconfmem is too aggressive
Product: Portage Development Reporter: Martin Väth <martin>
Component: ToolsAssignee: Portage team <dev-portage>
Status: RESOLVED FIXED    
Severity: normal Keywords: InVCS
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 431026    

Description Martin Väth 2012-09-02 18:12:47 UTC
emaint cleanconfmem removes checksums of manually edited config files
with the remark that the checksums do not match.

Although this is true in some sense - the checksums do not match with
the config file from the emerge - the checksum of the existing file
is somewhere stored by portage to be checked if --noconfmem is not used.
Emaint should recognize that the checksum of the existing file and
of the corresponding database are the same, and so the checksum
is not cleaned.

I can see this, because portage would normally not try to install
the (unmodified) config-file again, but after "emaint cleanconfmem"
it does (i.e. it behaves as if --noconfmem would be specified at
every portage call).

This more aggressive behavior might also be useful for some
occassions, but I would like to see a possibility that emaint
really only removes obsolete data without modifying future behavior
of emerge.
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2012-09-02 19:26:29 UTC
There are only 2 reasons for an entry to be considered for removal.

1) the config does not exist, so it is an obsolete entry.

2) the checksums don't match.  This reason can not be tracked as to why without forcing all editing through a proxy app so it can be tracked correctly.

Although it deletes entries that do not match.  The next merge will add them back again.

What I gathered from your comment is you would like it to default to only removing obsolete entries.

With the new emaint re-write it is possible to have more than just --check, --fix options.  Options can also be made to accept assignments. Both check and fix options have not and currently do not accept assignments.
In this case there could be --obsolete-only, or --checksums options which could change the default behavior.

Zac, what do you think
Comment 2 Zac Medico gentoo-dev 2012-09-02 19:39:16 UTC
I think the appropriate behavior would be to only discard entries for files that don't exist, and that we don't need an option to control this.
Comment 4 Zac Medico gentoo-dev 2012-09-03 00:04:03 UTC
This is fixed in 2.1.11.13 and 2.2.0_alpha124.