Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 145838 - support for comments in world file
Summary: support for comments in world file
Status: RESOLVED WONTFIX
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-01 05:24 UTC by Enrico 'nekrad' Weigelt
Modified: 2022-12-05 09:05 UTC (History)
2 users (show)

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 Enrico 'nekrad' Weigelt 2006-09-01 05:24:45 UTC
world file should support comments (#).
The code that loads it simply could push each line through s/\#.*$//;
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-09-01 06:08:44 UTC
What for? It's not meant to be edited directly, don't mess with it!
Comment 2 Marius Mauch (RETIRED) gentoo-dev 2007-01-11 08:33:49 UTC
No point and would create a mess as we don't just append to the worldfile.
Comment 3 Michael Hofmann 2022-12-03 21:58:28 UTC
I do understand it's difficult. But I would like to reopen this bug.

Maybe it's possible to support in-line comments, something like:

dev-libs/ossp-uuid      # required, because ...

It would definitely help. Because right now, I have a separate file in which I document packages I have added to the world file. 

Some entries are obvious (like /media-gfx/gimp). But entries like dev-libs/ossp-uuid aren't. For me, it's necessary to document why they are in the world file.

At least comment #1 ("It's not meant to be edited directly") is not true anymore. "Man emerge" explicitly states: "You can safely edit this file, adding packages that you want to be considered in world set updates and removing those that you do not want to be considered."
Comment 4 Mike Gilbert gentoo-dev 2022-12-04 01:53:19 UTC
(In reply to Michael Hofmann from comment #3)
> At least comment #1 ("It's not meant to be edited directly") is not true
> anymore. "Man emerge" explicitly states: "You can safely edit this file,
> adding packages that you want to be considered in world set updates and
> removing those that you do not want to be considered."

The man page has said that since before 2005-08-28 (when the portage repo was migrated from CVS to Subversion).

Comment 1 was posted after that date.

I certainly don't think we want to encourage people to manually edit the world file.
Comment 5 Paul Gover 2022-12-05 09:05:22 UTC
How about a change to emerge to allow "--blame='I like this package'", which could be implemented as an inline comment formatted as
" # I like this package" after the package name in the world file, along with support in unmerge and depclean to display the blame for any packages being removed?

That would give an UI to insert and use comments in the world file without any manual editing.