From b3b127aa02ee490f907185fa750cddb8a582a183 Mon Sep 17 00:00:00 2001 From: Zero_Chaos Date: Tue, 30 Oct 2012 21:52:49 +0000 Subject: [PATCH] app-portage/smart-live-rebuild: added with some patches I'm testing. to be removed soon once properly tested --- app-portage/smart-live-rebuild/Manifest | 5 ++ .../smart-live-rebuild/files/one.patch | 69 +++++++++++++++++++ .../smart-live-rebuild/files/three.patch | 15 ++++ .../smart-live-rebuild/files/two.patch | 25 +++++++ .../smart-live-rebuild-1.2.3-r2.ebuild | 38 ++++++++++ 5 files changed, 152 insertions(+) create mode 100644 app-portage/smart-live-rebuild/Manifest create mode 100644 app-portage/smart-live-rebuild/files/one.patch create mode 100644 app-portage/smart-live-rebuild/files/three.patch create mode 100644 app-portage/smart-live-rebuild/files/two.patch create mode 100644 app-portage/smart-live-rebuild/smart-live-rebuild-1.2.3-r2.ebuild diff --git a/app-portage/smart-live-rebuild/Manifest b/app-portage/smart-live-rebuild/Manifest new file mode 100644 index 000000000..6a7f1fc94 --- /dev/null +++ b/app-portage/smart-live-rebuild/Manifest @@ -0,0 +1,5 @@ +AUX one.patch 2652 SHA256 593e87800cf58070c0e424b079ece63e1feaa3e56223cf4a838e7678a0fc5661 SHA512 ea60bb622c6b9416cbd0b5576dd502c5b7ba8f34815189216c47c914b8ef18ff6e6543cad56bcf269699d168ef6585ad56829373063ed832ebd8c31aafe3acef WHIRLPOOL c149860ac4520d5858f5ca1eb4d58cd4c3a9576950f526d1d0b1b9bffbf116b767b27643a08afe5cc782f682368625917fc7ffa877eb23edf4c68485b37c3707 +AUX three.patch 479 SHA256 3f089e4d73ecaff7b092915a8f6745ef3e1e052fbc9868efd53c15b537bd0bc8 SHA512 5de2624fd6e3ecde735060b5073f290bd8714e518f4cc2d8b975f6eb7821386750a93a2dc511f02324b196eb811afd3790384e5a9be858750fa676a496077376 WHIRLPOOL 455f3e152e6468e809f2719d491894a152e8912da3125d80be098b022e6388909198f61d0db419f4753a7f36fe0b9fd6d5f11d4031b6bd15ba4fd15b4ec682db +AUX two.patch 802 SHA256 65a3cb981f4c0e21f8b84f0fb0b22f791378aad5bda400f163fd4aa2be6a9ae5 SHA512 4be8aa532f12839d45635368840cb13a3597ea7cac2a0e6ef358664cd8267f400e1529293b5ec15a0bc874b36cba1bb9924c070c6cf63497f70a2ac8f0c1f0a2 WHIRLPOOL fc172aced403f5d8338b3611b6d5a9c2d1ed8364b4cb6f2b4c9f84133d0446b10ad7ccbf7f8d6a4332006059a84e29f2553f568005d7bf57020d929ca1e55c7d +DIST smart-live-rebuild-1.2.3.tar.bz2 15753 SHA256 71080883018b4378d25ccb80d26cf973100f1df21e624c7c3fbfdbee3a31f035 SHA512 bde314a865d0e36fb6dd6e54a7d12caa8270cb5b6d163de548722095ff4e10b293824a986e219f7704f22bab90e5f333e60280c25db620eaf19fb2ae5f381e75 WHIRLPOOL 2bd0fe2d5709a324b08ca001f185eb33bac6a8daae876389ff84418748d977d941a499cfddeabf661f67e9b3a7643ea39aa5b5a271932bf2efcc3509cb23c874 +EBUILD smart-live-rebuild-1.2.3-r2.ebuild 1044 SHA256 95e76f9e97ef3ac434b98744ad21f81645849863cfe13e71ab31204729ed0bca SHA512 2940f3269c4ea4c183535688c87aca4c8c5cca276d9f4aebbb22e1ac2caab8b959b2c65265e8a150724c464ffb7bf81202327d2de779d63e4c19ccfa0b16990b WHIRLPOOL 95c5772cf376224f7bd8fcf764af773cee204fc028a57cc37a6f9a191440d61215794700e6a5ceb266d019c90bb33f02fba5d8a9298d6bf3acd742b1666d4a62 diff --git a/app-portage/smart-live-rebuild/files/one.patch b/app-portage/smart-live-rebuild/files/one.patch new file mode 100644 index 000000000..db3794fb6 --- /dev/null +++ b/app-portage/smart-live-rebuild/files/one.patch @@ -0,0 +1,69 @@ +From 4476d67291bc9a5196acf545d5cba59fb5b2a784 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Tue, 30 Oct 2012 20:37:57 +0100 +Subject: [PATCH] Add a --quiet option to silence status messages. + +As requested by Rick Farina (Zero_Chaos). +--- + smartliverebuild/cli.py | 2 ++ + smartliverebuild/config.py | 1 + + smartliverebuild/core.py | 2 ++ + smartliverebuild/output.py | 5 +++++ + 4 files changed, 10 insertions(+) + +diff --git a/smartliverebuild/cli.py b/smartliverebuild/cli.py +index 289d6e0..6aa10af 100644 +--- a/smartliverebuild/cli.py ++++ b/smartliverebuild/cli.py +@@ -67,6 +67,8 @@ def parse_options(argv): + help='Only print a list of the packages which were updated; do not call emerge to rebuild them.') + opt.add_option('-P', '--profile', action='store', dest='profile', + help='Configuration profile (config file section) to use (default: smart-live-rebuild)') ++ opt.add_option('-q', '--quiet', action='store_true', dest='quiet', ++ help='Do not output progress messages, just errors.') + opt.add_option('-Q', '--quickpkg', action='store_true', dest='quickpkg', + help='Call quickpkg to create binary backups of packages which are going to be updated.') + opt.add_option('-r', '--remote-only', action='store_true', dest='remote_only', +diff --git a/smartliverebuild/config.py b/smartliverebuild/config.py +index f800602..7e9155c 100644 +--- a/smartliverebuild/config.py ++++ b/smartliverebuild/config.py +@@ -26,6 +26,7 @@ class Config(ConfigParser): + 'pretend': 'False', + 'profile': 'smart-live-rebuild', + 'quickpkg': 'False', ++ 'quiet': 'False', + 'remote_only': 'False', + 'setuid': str(pm_conf.userpriv_enabled), + 'timeout': '0', +diff --git a/smartliverebuild/core.py b/smartliverebuild/core.py +index 29d224a..868b443 100644 +--- a/smartliverebuild/core.py ++++ b/smartliverebuild/core.py +@@ -15,6 +15,8 @@ class SLRFailure(Exception): + def SmartLiveRebuild(opts, pm, cliargs = None): + if not opts.color: + out.monochromize() ++ if opts.quiet: ++ out.silence() + + if opts.jobs <= 0: + out.err('The argument to --jobs option must be a positive integer.') +diff --git a/smartliverebuild/output.py b/smartliverebuild/output.py +index 68d4ce2..a45f909 100644 +--- a/smartliverebuild/output.py ++++ b/smartliverebuild/output.py +@@ -29,6 +29,11 @@ class SLROutput(object): + if isinstance(v, str) and v.startswith('\033'): + setattr(self, k, '') + ++ def silence(self): ++ self.s1 = lambda x: None ++ self.s2 = lambda x: None ++ self.s3 = lambda x: None ++ + def s1(self, msg): + self.out('%s*** %s%s\n' % (self.s1reset, msg, self.reset)) + self._cur_header = None +-- +1.7.12.4 \ No newline at end of file diff --git a/app-portage/smart-live-rebuild/files/three.patch b/app-portage/smart-live-rebuild/files/three.patch new file mode 100644 index 000000000..acdcd6692 --- /dev/null +++ b/app-portage/smart-live-rebuild/files/three.patch @@ -0,0 +1,15 @@ +diff --git a/smartliverebuild/core.py b/smartliverebuild/core.py +index 335e3c9..dc337d8 100644 +--- a/smartliverebuild/core.py ++++ b/smartliverebuild/core.py +@@ -180,6 +180,9 @@ option. + out.result('Found %s%d%s packages to rebuild.' % (out.white, len(packages), out.s1reset)) + finally: + if childpid: # make sure that we leave no orphans +- os.kill(childpid, signal.SIGTERM) ++ try: ++ os.kill(childpid, signal.SIGTERM) ++ except OSError: ++ pass + + return packages diff --git a/app-portage/smart-live-rebuild/files/two.patch b/app-portage/smart-live-rebuild/files/two.patch new file mode 100644 index 000000000..90ef03949 --- /dev/null +++ b/app-portage/smart-live-rebuild/files/two.patch @@ -0,0 +1,25 @@ +From eaae4d05fdfc2595d60fb37efa6242946c442edc Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= +Date: Tue, 30 Oct 2012 21:06:06 +0100 +Subject: [PATCH] Treat non-live ebuild as a status message, not an error. + +This should improve the quiet output as well. +--- + smartliverebuild/core.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/smartliverebuild/core.py b/smartliverebuild/core.py +index 868b443..320d906 100644 +--- a/smartliverebuild/core.py ++++ b/smartliverebuild/core.py +@@ -110,7 +110,7 @@ option. + except KeyboardInterrupt: + raise + except NonLiveEbuild as e: +- out.err('%s: %s' % (pkg, e)) ++ out.s2('%s: %s' % (pkg.slotted_atom, e)) + except Exception as e: + if opts.debug: + raise +-- +1.7.12.4 \ No newline at end of file diff --git a/app-portage/smart-live-rebuild/smart-live-rebuild-1.2.3-r2.ebuild b/app-portage/smart-live-rebuild/smart-live-rebuild-1.2.3-r2.ebuild new file mode 100644 index 000000000..935f4c81c --- /dev/null +++ b/app-portage/smart-live-rebuild/smart-live-rebuild-1.2.3-r2.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-portage/smart-live-rebuild/smart-live-rebuild-1.2.3-r2.ebuild,v 1.1 2012/10/15 08:09:59 mgorny Exp $ + +EAPI=4 +PYTHON_COMPAT=(python2_6 python2_7 python3_1 python3_2) + +inherit distutils-r1 eutils + +DESCRIPTION="Check live packages for updates and emerge them as necessary" +HOMEPAGE="https://bitbucket.org/mgorny/smart-live-rebuild/" +SRC_URI="mirror://bitbucket/mgorny/${PN}/downloads/${P}.tar.bz2" + +LICENSE="BSD-2" +SLOT="0" +KEYWORDS="~amd64 ~mips ~x86 ~x86-fbsd" +IUSE="" + +RDEPEND=">=app-portage/gentoopm-0.2.1[${PYTHON_USEDEP}]" + +src_prepare() { + epatch "${FILESDIR}"/one.patch + epatch "${FILESDIR}"/two.patch + epatch "${FILESDIR}"/three.patch +} + +python_test() { + "${PYTHON}" setup.py test || die +} + +python_install_all() { + distutils-r1_python_install_all + + insinto /etc/portage + newins smart-live-rebuild.conf{.example,} + insinto /usr/share/portage/config/sets + newins sets.conf.example ${PN}.conf +}