Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 567746 - repoman should try metadata.dtd from PORTDIR and allow disable of updating it as well
Summary: repoman should try metadata.dtd from PORTDIR and allow disable of updating it...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Repoman (show other bugs)
Hardware: All Linux
: Highest normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 549914
  Show dependency tree
 
Reported: 2015-12-08 00:54 UTC by Robin Johnson
Modified: 2016-03-14 02:41 UTC (History)
1 user (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 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-12-08 00:54:59 UTC
This is one of the infra runs of repoman, where it runs as non-root, and has no permission to write to DISTDIR.

DISTDIR contains an old(er) copy of metadata.dtd than PORTDIR does.
Repoman keeps trying to download to DISTDIR a more "recent" copy of metadata.dtd, instead of just using the PORTDIR copy.

Please make repoman check if the PORTDIR copy of metadata.dtd is sufficiently new, and/or add options to explicitly state that it is (this is the master mirror, it's not going to get any newer!).
Comment 1 Arfrever Frehtes Taifersar Arahesis 2015-12-08 11:11:24 UTC
PORTDIR / main-repo are deprecated.
So probably repository, in which repoman is run, should be checked.
What location exactly? ${current_repository_location}/metadata.dtd ?
Comment 2 Zac Medico gentoo-dev 2015-12-08 16:55:27 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #1)
> PORTDIR / main-repo are deprecated.
> So probably repository, in which repoman is run, should be checked.
> What location exactly? ${current_repository_location}/metadata.dtd ?

If metadata.dtd doesn't exist in the current repository, we could have it check the master repositories. Location is ${repo}/metadata/dtd/metadata.dtd
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-12-15 17:57:03 UTC
(In reply to Arfrever Frehtes Taifersar Arahesis from comment #1)
> PORTDIR / main-repo are deprecated.
> So probably repository, in which repoman is run, should be checked.
> What location exactly? ${current_repository_location}/metadata.dtd ?

${repo}/metadata/dtd/metadata.dtd is the location at which Infra distributes the DTD, and has always done so.

$repo in this case is 
/var/tmp/gmirror-rsync/gentoo-x86-stage
where egencache & repoman are running.

Also important to this discussion is the related option to inform repoman that there is no point in trying to fetch it, because THIS is the canonical copy. (say 30 days down the line, when no changes have been made, and the mtime accurately reflects the last change).
Comment 4 Zac Medico gentoo-dev 2015-12-16 06:51:25 UTC
There's a patch in the following branch:

https://github.com/zmedico/portage/tree/bug_567746

I've posted it for review here:

https://archives.gentoo.org/gentoo-portage-dev/message/5775c0f28b49faf18fed3e3194a79176
Comment 6 Zac Medico gentoo-dev 2016-03-14 02:41:24 UTC
Fixed in 2.2.27.