Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 716640 Details for
Bug 751253
sys-apps/portage: a tool to add/remove binary packages from a repository and merge two binpkg caches
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
pkgdir-merge script
pkgdir-merge (text/x-python), 1.47 KB, created by
Zac Medico
on 2021-06-17 19:03:55 UTC
(
hide
)
Description:
pkgdir-merge script
Filename:
MIME Type:
Creator:
Zac Medico
Created:
2021-06-17 19:03:55 UTC
Size:
1.47 KB
patch
obsolete
>#!/usr/bin/env python > >import argparse >import logging >import os >import sys > >import portage > > >def pkgdir_merge(src, dest): > dest_bintree = portage.binarytree(pkgdir=dest, settings=portage.settings) > src_bintree = portage.binarytree(pkgdir=src, settings=portage.settings) > > for cpv in src_bintree.dbapi.cpv_all(): > logging.info('processing package: %s', cpv) > pkg_path = src_bintree.getname(cpv) > dest_bintree.inject(cpv, filename=pkg_path) > > >def main(): > parser = argparse.ArgumentParser( > formatter_class=argparse.RawDescriptionHelpFormatter, > description=" \n{}".format(" A tool to merge two directories of portage binary packages together")) > > parser.add_argument( > 'src', > action='store', > nargs=1, > metavar="SRC", > help="Source package directory" > ) > > parser.add_argument( > 'dest', > action='store', > nargs=1, > metavar="DEST", > help="Destination package directory" > ) > > parser.add_argument( > '-v', '--verbose', > dest='verbosity', > action='count', > help='verbose logging (each occurence increases verbosity)', > default=0, > ) > > args = parser.parse_args() > > logging.basicConfig( > level=(logging.getLogger().getEffectiveLevel() - 10 * args.verbosity), > format='[%(levelname)s] %(message)s', > ) > > pkgdir_merge(args.src[0], args.dest[0]) > > return os.EX_OK > > >if __name__ == '__main__': > sys.exit(main())
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 751253
: 716640