The GNU of Life, the Universe and Everything

March 19, 2011

Patch portage to be more quiet

Filed under: gentoo, linux — Tags: , , — Pedro Carvalho @ 8:20 pm

Gentoo Live Linux 10.0
Gentoo linux is alive and well and just released a new Gentoo Linux Live.  It features Linux Kernel 2.6.37 (with Gentoo patches). It comes will all desktop environments. Especially if you are looking for KDE 4.6 SC here’s the best way to start.
It also includes OpenOffice.org (3.2.1), GIMP (2.6.11), Inkscape (0.48.1), Blender (2.49b), and many more. They are all packed in either the x86/x86_64 or the x86_64. If you like it, you’ll need to install Gentoo with the Instalation CD.

So a few days after the celebrated news of 11th release here’s a patch for portage to make it quiet and nice.

Those extra verbose warnings really annoys me,  because emerging something keeps showing me all the licensed packages that are masked, broken packages or masked.  So i fixed the !!! existing preserved libs:
” ,  “!!! The following installed packages are masked:” and !!! There are updates currently masked by LICENSE changes.” messages.

You can revert to the verbose warnings with the new flag “–extra-verbose”.

All it does is remove the list of packages shown after doing a emerge, and improves the speed because it doesn’t calculate any of it (particular when figuring out the preserved libs) and only shows a single line warning about them.

The patch is for portage-2.2.0_alpha26 (which is totally a must so you can play around with @sets)

Where to get the patch

patch-2.2.0_alpha26

How to apply the patch:

on the /usr/lib/portage/pym/ directory

patch -p1 -i patch-2.2.0_alpha26

The handbook is always a good idea to keep around ;)

(the image was taken from the Gentoo Live 10.0)

February 2, 2010

making gentoo portage more quiet without showing preverved libs and installed masked packages

Filed under: gentoo — Tags: , , , , , — Pedro Carvalho @ 9:00 pm

Well, it was one of those days drifting from trying to do one thing, and ending fixing the core system.

emerge been having alot of output lately, and its extra verbosity was driving me mad.

First, showing the preserved-libs takes alot of time.
Second, now i have always have to scroll up to check if the emerge succeed , for emerge warnings bout the packages and whatnot.

The other annoying thing is it warning me that are installed packages that are currently masked for one reason or the other by the maintainers.

… and then proceed to list them all, completely unrelated to the package being emerged.

so that was my itch. i’ve scratched not sure if i tore up anything vital :D

it was built against portage-2.2_r61
(note: the following code might be broken due to wordpress weirdness)

--- portage-2.2_rc61_new/pym/_emerge/main.py 2010-02-02 07:18:02.000000000 +0000
+++ portage-2.2_rc61_mod/pym/_emerge/main.py 2010-02-02 05:15:09.000000000 +0000
@@ -73,6 +73,7 @@ options=[
"--unordered-display",
"--update",
"--verbose",
+"--show-preserved",
]


shortmapping={
@@ -214,13 +215,12 @@ def display_preserved_libs(vardbapi, myo
vardbapi.plib_registry.pruneNonExisting()


if vardbapi.plib_registry.hasEntries():
- if "--quiet" in myopts:
+ if "--show-preserved" in myopts:
print()
- print(colorize("WARN", "!!!") + " existing preserved libs found")
- return
+ print(colorize("WARN", "!!!") + " existing preserved libs:")
else:
print()
- print(colorize("WARN", "!!!") + " existing preserved libs:")
+ print(colorize("WARN", "!!!") + " existing preserved libs found")
return


plibdata = vardbapi.plib_registry.getPreservedLibs()
--- portage-2.2_rc61_new/pym/_emerge/depgraph.py 2010-02-02 07:18:02.000000000 +0000
+++ portage-2.2_rc61_mod/pym/_emerge/depgraph.py 2010-02-02 05:15:14.000000000 +0000
@@ -4908,12 +4908,12 @@ class depgraph(object):
pkg.cpv, pkg.metadata, mreasons))
if masked_packages:
writemsg("\n" + colorize("BAD", "!!!") + \
- " The following installed packages are masked:\n",
+ " There are some installed packages currently masked!\n",
noiselevel=-1)


- show_masked_packages(masked_packages)
- show_mask_docs()
- writemsg("\n", noiselevel=-1)
+# show_masked_packages(masked_packages)
+# show_mask_docs()
+# writemsg("\n", noiselevel=-1)


def saveNomergeFavorites(self):


i hope it helps.

note that there’s a new flag “–show-preserved” that.. well.. makes it show the preserved libs.
After that, lafilefixer will try to fix any semi-broken .la files, deleted or hanging around.

Theme: Shocking Blue Green. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.