I created a script that automatically patch metadata.xml when remoteid should be used. Currently it works for pypi, rubyforge, rubygems, google code, cpan, pecl and pear. If interested, you may implement the missing rules for vim, cran, ctan and sourceforge. The script is available here: https://github.com/iksaif/portage-janitor/blob/master/remoteids.py and should be run like that: eix --only-names | python remoteids.py --diff I also suggest to add pecl, pear and rubygems to metadata.dtd (patch will be attached).
Created attachment 303721 [details] fill-metadata-remotesid.diff Patch produced by "eix --only-names | ./remoteids.py --diff"
Created attachment 303723 [details] metadata-dtd-add-pecl-pear-rubygems.patch Add pecl, pear and rubygems to the list of remoteids.
Created attachment 303725 [details] fill-metadata-remotesid-full.patch Patch produced by "eix --only-names | ./remoteids.py --diff" with additionals remoteids.
Why is the tool rewriting unrelated tags like this? - <flag name = 'espeak'>Adds support for the espeak tts engine</flag> + <flag name="espeak">Adds support for the espeak tts engine</flag> Also, sometimes indentation seems to be off like here: --- a/app-admin/phpsyslogng/metadata.xml +++ b/app-admin/phpsyslogng/metadata.xml @@ -8,4 +8,7 @@ <email>matthias@dsx.at</email> <name>Matthias Schöffmann</name> </maintainer> + <upstream> + <remote-id type="google-code">php-syslog-ng</remote-id> + </upstream> </pkgmetadata>
The tool parse the xml, update it, and output it. It seems that the python xml parser tends to fix xml the xml (remove spaces, replace ' with "). I think the patch will have to be hand-edited to remove these changes. Yes, the indentation is not always correct, it's very hard to make it work correctly since all metadata.xml are not indented the same way, but most of the time it works (except when non-root tag like maintainer or herd are not indented at all).
Filing one huge bug report with multiple teams having to change things rarely works. So consider turning this bug into a tracker (just add "Tracker" to the Keywords field), and file new bug reports aimed at separate packages/categories that block this one.
Hmm, 93 categories are impacted by this bug, I don't think I'll create 93 bugs. I'll try to script that to group patchs by herds and/or maintainers, see how many group there are.
I've checked in most of the patch (with my formatting fixes).
(In reply to comment #8) > I've checked in most of the patch (with my formatting fixes). Did you also add pecl, pear and rubygems to metadata.dtd or did you merge the minimal patch ? By the way, I just pushed a script update: - Added CRAN/CTAN/Sourceforge support - Fixed Pecl and PEAR - Guess remote-id using HOMEPAGE - Remove package version from remote-id - Added github/bitbucket/gitorious support (not yet in metadata.dtd !!) - Now almost always preserve old XML indentation style (no more unrelated changes) You can use "--vanilla" to use only remote id types defined in /usr/portage/metadata/dtd/metadata.dtd.
Created attachment 307503 [details] fill-remote-id-full.diff Patch generated with current portage tree and new remoteid.py script $ python remoteids.py --diff --all > fill-remote-id-full.diff
Created attachment 307507 [details] fill-remote-id-vanilla.diff Patch generated with current portage tree and new remoteid.py script $ python remoteids.py --diff --all --vanilla > fill-remote-id-vanilla.diff
Created attachment 307509 [details] fill-remote-id-full.diff.gz
Created attachment 307511 [details] fill-remote-id-vanilla.diff.gz
Created attachment 309505 [details, diff] metadata_dtd_add_new_remote_id_types.patch Add rubygems, github, gitorious, pecl, pear, bitbucket. All of them are handled by my script.
Created attachment 309869 [details, diff] Updated, sorted metadata.dtd patch (from the mailing list)
CC-ing so they'll update metadata.dtd.
done.