I miss an option to remove comments above the removed entries. An autounmask addition to package.* looks like this: # required by dev-java/icedtea-web-1.5.1-r1[icedtea7] # required by dev-java/icedtea-6.1.13.5-r1[webstart] # required by @selected # required by @world (argument) =dev-java/icedtea-sound-1.0.1 ~amd64 Now, if i use portpeek to clean this entry, the comments stay in the package file and I still need to clean the comments manually from time to time. I suggest to add an option, that removes all continuous comment lines above the removed entry. I.e., to avoid removing unrelated comments an empty line (and of course any non-comment line) should end the comment, that is related to the entry. Currently, I still use my own cleaning solution for this reason: https://wiki.gentoo.org/wiki/User:Tillschaefer/cleanup_package -> there is also a more detailed example given.
Interesting. Let me think on this.
I can't think of a good way to do this that would not be hokey. Unless the comments had a tag, something like # dev-java/icedtea-sound: required by dev-java/icedtea-web-1.5.1-r1[icedtea7] # dev-java/icedtea-sound: required by dev-java/icedtea-6.1.13.5-r1[webstart] # dev-java/icedtea-sound: required by @selected # dev-java/icedtea-sound: required by @world (argument) =dev-java/icedtea-sound-1.0.1 ~amd64 Otherwise the code would be guessing If you have a patch I would be interested in talking further
All comment lines directly above the package that start with # required by should be directly linked to the package. Otherwise, these lines are faulty itself and may belong to a removed package in between. I --as an end user-- have not other option relate the "required by" lines to the package. The current solution may even cause false interpretations. Example: # required by dev-java/icedtea-web-1.5.1-r1[icedtea7] # required by dev-java/icedtea-6.1.13.5-r1[webstart] # required by @selected # required by @world (argument) =dev-java/icedtea-sound-1.0.1 ~amd64 =dev-java/asm-5.1 After removing icedtea-sound one may think, that asm was actually required by icedtea-web. Therefore, I argue that NOT removing these types of comments actually causes inconsistent required-by semantics. I cannot see a practical example, where this would actually go wrong. (A second "#required by @world" would be an indicator of a removed package, but in this case I cannot relate the lines above that second world to any package anymore. Thus, they are also useless garbage an should be removed.) (feel free to close it again if you think otherwise :))