Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 346075 - Ignore backup files in /etc/portage subdirectories
Summary: Ignore backup files in /etc/portage subdirectories
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-19 14:21 UTC by Wonko
Modified: 2010-11-19 19:23 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wonko 2010-11-19 14:21:20 UTC
When I remove an entry in files like /etc/portage/package.mask/foo, I occasionally forget about the foo~ or foo.bck backup file the editor creates. It still has the line I removed, and so my changes don't apply. Happened a couple of times to me, I assume I'm not the only one.

Reproducible: Always

Steps to Reproduce:
1. create /etc/portage/package.mask/foo with entry like >=x11-libs/cairo-1.8.10
2. emerge -pu x11-libs/cairo wants to downgrade
3. remove this line with an editor like Nedit or nano that makes automatic backups

Actual Results:  
emerge -pu x11-libs/cairo still wants to downgrade

Expected Results:  
It would be nice if portage would know about the common backup extensions like .bak, .bck, ~, % and what else there are, and ignore them.

I'm using Portage 2.2.0_alpha4.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-11-19 17:56:14 UTC
Portage already should ignore files ending with ~ suffix. Doesn't that really work for you?
Comment 2 Wonko 2010-11-19 19:17:30 UTC
Sorry, my bad. A '~' at the end is indeed being ignored already. I must admit I only tried '.bck' for this report, but I'm pretty sure I had a problem with '~' also not far in the past. Maybe when I accidentally downgraded portage?

Still, extending the suffix list to {~,%,.bak,.bck,.backup} (are there more?) would be nice. I think.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2010-11-19 19:23:50 UTC
(In reply to comment #2)
> Still, extending the suffix list to {~,%,.bak,.bck,.backup} (are there more?)
> would be nice. I think.

Yeah, and then extending all helper tools to behave exactly the same. And then extending the list even more. And fixing all the tools. And then adding intelligent backup recognition. And then fixing it.

Is it that hard to keep a clean configuration dir?