Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 546536 - RFE: Metadata-only repository checkout
Summary: RFE: Metadata-only repository checkout
Status: CONFIRMED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Ebuild Support (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on: 546520
Blocks:
  Show dependency tree
 
Reported: 2015-04-14 07:41 UTC by Michał Górny
Modified: 2023-12-28 03:01 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 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2015-04-14 07:41:44 UTC
So an old idea with some new fancy design.

repos.conf like:

  [gentoo]
  location = /var/db/repos/gentoo
  sync-type = rsync
  sync-uri = rsync://rsync.gentoo.org/gentoo-portage
  auto-sync = true
  # new stuff
  type = ebuild-metadata-only # vs 'ebuild'
  ebuild-src-type = cvs
  ebuild-src-uri = ...
  ebuild-src-cvs-repo = ...

Now, the idea is that in 'ebuild-metadata-only' repository type, Portage doesn't fetch/checkout the whole repository but only the metadata and profiles. I think it could also get ebuilds and licenses since they will be frequently used. Package directories are fetched on-demand.

All the ebuild-src-* keys provide sync-like resources for fetching packages. What's important, they need to use a protocol that is capable of retrieving arbitrary past versions.

Portage works like this:

1. 'emerge --sync' updates metadata, profiles, eclasses and licenses.

2. Further Portage operations work on md5-cache only, without looking for packages.

3. When Portage is starting the emerge run (i.e. before pkg_pretend()), it uses the ebuild-src to download all packages in the versions matching timestamp of the metadata cache.


The detailed characteristics would depend on used syncing methods:

- rsync+cvs & git+cvs would both save bandwidth and disk space. 'emerge --sync' would only fetch metadata via rsync (or dedicated git repo), then install runs would fetch the necessary packages via cvs.

- git+git would only save some disk space. 'emerge --sync' would still fetch the whole repository but only metadata would be checked out. The necessary packages would be checked out during emerge runs.