From 9ad9f9aa72666eb8731ad6c05f0f1eb07bb394f1 Mon Sep 17 00:00:00 2001 From: aydemir Date: Tue, 7 Jun 2016 12:29:46 +0300 Subject: [PATCH] pisi add emergeup --- system/base/pisi/files/emergeup.patch | 97 +++++++++++++++++++++++++++ system/base/pisi/pspec.xml | 8 +++ 2 files changed, 105 insertions(+) create mode 100644 system/base/pisi/files/emergeup.patch diff --git a/system/base/pisi/files/emergeup.patch b/system/base/pisi/files/emergeup.patch new file mode 100644 index 00000000..8a6e8bdc --- /dev/null +++ b/system/base/pisi/files/emergeup.patch @@ -0,0 +1,97 @@ +diff -Nuar a/pisi/cli/emergeup.py b/pisi/cli/emergeup.py +--- a/pisi/cli/emergeup.py 1970-01-01 02:00:00.000000000 +0200 ++++ b/pisi/cli/emergeup.py 2016-06-06 23:33:48.000000000 +0300 +@@ -0,0 +1,82 @@ ++# -*- coding:utf-8 -*- ++# ++# Copyright (C) 2005 - 2007, TUBITAK/UEKAE ++# ++# This program is free software; you can redistribute it and/or modify it under ++# the terms of the GNU General Public License as published by the Free ++# Software Foundation; either version 2 of the License, or (at your option) ++# any later version. ++# ++# Please read the COPYING file. ++# ++ ++import optparse ++ ++import gettext ++__trans = gettext.translation('pisi', fallback=True) ++_ = __trans.ugettext ++ ++import pisi.cli.command as command ++import pisi.cli.build as build ++import pisi.context as ctx ++import pisi.api ++ ++class EmergeUp(build.Build): ++ __doc__ = _("""Build and install PiSi source packages from repository ++ ++Usage: emergeup ... ++ ++You should give the name of a source package to be ++downloaded from a repository containing sources. ++ ++You can also give the name of a component. ++""") ++ __metaclass__ = command.autocommand ++ ++ def __init__(self, args): ++ super(EmergeUp, self).__init__(args) ++ self.comar = True ++ ++ name = ("emergeup", "emup") ++ ++ def options(self): ++ ++ group = optparse.OptionGroup(self.parser, _("emergeup options")) ++ super(EmergeUp, self).add_options(group) ++ group.add_option("-c", "--component", action="store", ++ default=None, help=_("Emerge available packages under given component")) ++ group.add_option("--ignore-file-conflicts", action="store_true", ++ default=False, help=_("Ignore file conflicts")) ++ group.add_option("--ignore-package-conflicts", action="store_true", ++ default=False, help=_("Ignore package conflicts")) ++ group.add_option("--ignore-comar", action="store_true", ++ default=False, help=_("Bypass comar configuration agent")) ++ self.parser.add_option_group(group) ++ ++ def run(self): ++ self.init(database = True) ++ ++ source = pisi.db.sourcedb.SourceDB() ++ ++ imdb = pisi.db.installdb.InstallDB() ++ ++ installed_emerge_packages = imdb.list_installed_with_build_host("localhost") ++ ++ emerge_up_list = [] ++ ++ for package in installed_emerge_packages: ++ if source.has_spec(package): ++ spec = source.get_spec(package) ++ if spec.getSourceRelease() > imdb.get_version(package)[1]: ++ emerge_up_list.append(package) ++ ++ if ctx.get_option('output_dir'): ++ ctx.ui.info(_('Output directory: %s') % ctx.config.options.output_dir) ++ else: ++ ctx.ui.info(_('Outputting binary packages in the package cache.')) ++ ctx.config.options.output_dir = ctx.config.cached_packages_dir() ++ ++ repos = pisi.api.list_repos() ++ pisi.api.update_repos(repos, ctx.get_option('force')) ++ ++ pisi.api.emerge(emerge_up_list) +diff -Nuar a/pisi/cli/pisicli.py b/pisi/cli/pisicli.py +--- a/pisi/cli/pisicli.py 2011-05-26 20:17:29.000000000 +0300 ++++ b/pisi/cli/pisicli.py 2016-06-07 12:10:25.448737817 +0300 +@@ -29,6 +29,7 @@ + import pisi.cli.deletecache + import pisi.cli.delta + import pisi.cli.emerge ++import pisi.cli.emergeup + import pisi.cli.fetch + import pisi.cli.graph + import pisi.cli.index diff --git a/system/base/pisi/pspec.xml b/system/base/pisi/pspec.xml index 051a0d2f..4af72e61 100644 --- a/system/base/pisi/pspec.xml +++ b/system/base/pisi/pspec.xml @@ -33,6 +33,7 @@ improve_pisi_ix.patch fix_emul32_flags.patch pisi-2.6-pisitools.dopixmaps-add.patch + emergeup.patch @@ -85,6 +86,13 @@ + + 2016-06-07 + 2.6 + Release Bump + PisiLinux Community + admin@pisilinux.org + 2016-04-27 2.6