Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 144484 - undesirable confmem activity
Summary: undesirable confmem activity
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 147007
  Show dependency tree
 
Reported: 2006-08-19 21:07 UTC by Alec Warner
Modified: 2006-10-04 03:58 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Removes annoying section of treewalk (fix-confmem-issues.patch,668 bytes, patch)
2006-08-19 21:08 UTC, Alec Warner (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alec Warner (RETIRED) archtester gentoo-dev Security 2006-08-19 21:07:43 UTC
Given a file protected by configprotect, (/etc/sudoers in this case), merged by sudo.  Then seemant-1.0.ebuild comes along and modifies /etc/sudoers; because there is no record of /etc/sudoers in confmem everything is fine.  Then I delete the ._cfg file because I don't like his changes.  Later I decide I want them, so I remerge seemant-1.0.ebuild, only to find no ._cfg file was generated.

This is due to confmem, where the dict in /var/lib/portage/config holds an md5sum of the livefs and it differs from the md5sum in srcroot ($IMAGE, $D).  however instead of generating a ._cfg file like you'd expect, portage tries to be smart and guess that you didn't want it before, so you don't want it now, and skips it.

Turning on --noconfmem will turn this behavior off; however I don't see a reason for the behavior.
Comment 1 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-08-19 21:08:49 UTC
Created attachment 94656 [details, diff]
Removes annoying section of treewalk
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2006-08-20 05:22:44 UTC
(In reply to comment #0)
> Later I decide I want them, so I remerge seemant-1.0.ebuild, only to find no
> ._cfg file was generated.

I don't think this is the common use case. For the most time when people remerge or update a package they don't want to apply/discard the same config file changes every time.
Comment 3 Alec Warner (RETIRED) archtester gentoo-dev Security 2006-08-20 12:01:29 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > Later I decide I want them, so I remerge seemant-1.0.ebuild, only to find no
> > ._cfg file was generated.
> 
> I don't think this is the common use case. For the most time when people
> remerge or update a package they don't want to apply/discard the same config
> file changes every time.

Ok I can agree (somewhat) with that; but I'm trying to think of a seperate case when I (intentially) changed the file in srcroot such that mymd5 would be different (by editing the ebuilds seemant gave me to add more crap into /etc/sudoers) and it still didn't trigger a ._cfg000 file; I'll test again for this case.

If nothing else, a check further in treewalk prevents people from seeing the "-o-" that this code supposed to generate and instead they get a ">>>" which means something completely different.
Comment 4 Zac Medico gentoo-dev 2006-09-14 16:02:57 UTC
(In reply to comment #2)
> (In reply to comment #0)
> > Later I decide I want them, so I remerge seemant-1.0.ebuild, only to find no
> > ._cfg file was generated.
> 
> I don't think this is the common use case. For the most time when people
> remerge or update a package they don't want to apply/discard the same config
> file changes every time.

Is it really the package manager's job to provide this kind of "smart" behavior though?  It could also be implemented separately within tools such as etc-update or dispatch-conf.

Basically, the description of this bug seems to be to punt the confmem feature entirely.  If we decide to punt it, the patch should remove all traces (not just disable it).
Comment 5 Zac Medico gentoo-dev 2006-10-04 03:58:08 UTC
The confmem code has be refactored (svn r4450 and r4453) and released in 2.1.2_pre1.  If there were any bugs in the old logic, I'm pretty sure they've been fixed in the refactoring.  Note that it's possible to set EMERGE_DEFAULT_OPTS="--noconfmem" in make.conf.