{"id":223,"date":"2014-09-10T14:01:19","date_gmt":"2014-09-10T14:01:19","guid":{"rendered":"http:\/\/blogs.gentoo.org\/titanofold\/?p=223"},"modified":"2014-09-10T14:01:19","modified_gmt":"2014-09-10T14:01:19","slug":"unifying-postgresql-ebuilds","status":"publish","type":"post","link":"https:\/\/blogs.gentoo.org\/titanofold\/2014\/09\/10\/unifying-postgresql-ebuilds\/","title":{"rendered":"Unifying PostgreSQL Ebuilds"},"content":{"rendered":"<p>After an excruciating wait and years of learning PostgreSQL, it&#8217;s time to unify the PostgreSQL ebuilds.<!--more-->I&#8217;m not sure what the original motivation was to split the ebuilds, but, from the history I&#8217;ve seen on Gentoo, it has always been that way. That&#8217;s a piss-poor reason for continuing to do things a certain way. Especially when that way is wrong and makes things more tedious and difficult than they ought to be.<\/p>\n<p>I&#8217;m to blame for pressing forward with the splitting the ebuilds to -docs, -base, and -server when I first got started in Gentoo. I knew from the outset that having them split was not a good idea. I just didn&#8217;t know as much as I do now to defend one way or the other. To be fair, Patrick (bonsaikitten) would have gone with whatever I decided to do, but I thought I understood the advantages. Now I look at it and just see disadvantages.<\/p>\n<p>Let&#8217;s first look at the build times for building the split ebuilds:<\/p>\n<pre>1961.35user 319.42system 33:59.44elapsed 111%CPU (0avgtext+0avgdata 682896maxresident)k\r\n46696inputs+2000640outputs (34major+34350937minor)pagefaults 0swaps\r\n1955.12user 325.01system 33:39.86elapsed 112%CPU (0avgtext+0avgdata 682896maxresident)k\r\n7176inputs+1984960outputs (33major+34349678minor)pagefaults 0swaps\r\n1942.90user 318.89system 33:53.70elapsed 111%CPU (0avgtext+0avgdata 682928maxresident)k\r\n28496inputs+1999688outputs (124major+34343901minor)pagefaults 0swaps<\/pre>\n<p>And now the unified ebuild:<\/p>\n<pre>1823.57user 278.96system 30:29.20elapsed 114%CPU (0avgtext+0avgdata 683024maxresident)k\r\n32520inputs+1455688outputs (100major+30199771minor)pagefaults 0swaps\r\n1795.63user 282.55system 30:35.92elapsed 113%CPU (0avgtext+0avgdata 683024maxresident)k\r\n9848inputs+1456056outputs (30major+30225195minor)pagefaults 0swaps\r\n1802.47user 275.66system 30:08.30elapsed 114%CPU (0avgtext+0avgdata 683056maxresident)k\r\n13800inputs+1454880outputs (49major+30193986minor)pagefaults 0swaps<\/pre>\n<p>So, the unified ebuild is about 10% faster than the split ebuilds.<\/p>\n<p>There are also a few bugs open that will be resolved by moving to a unified ebuild. Whenever someone changes anything in their flags, Portage tends to only pick up dev-db\/postgresql-server as needing to be recompiled rather than the appropriate dev-db\/postgresql-base, which results in broken setups and failures to even build. I&#8217;ve even been accused of pulling the rug out from under people. I swear, it&#8217;s not me&#8230;it&#8217;s Portage&#8230;who I lied to. Kind of.<\/p>\n<p>There should be little interruption, though, to the end user. I&#8217;ll be keeping all the features that splitting brought us. Okay, feature. There&#8217;s really just one feature: Proper slotting. Portage will be informed of the package moves, and everything should be hunky-dory with one caveat: A new &#8216;server&#8217; USE flag is being introduced to control whether to build everything or just the clients and libraries.<\/p>\n<p>No, I don&#8217;t want to do a lib-only flag. I don&#8217;t want to work on another hack.<\/p>\n<p>You can check out the progress on my <a title=\"TitanOfOld's Dev Overlay\" href=\"https:\/\/github.com\/titanofold\/titanofold-gentoo-x86\">overlay<\/a>. I&#8217;ll be working on the updating the dependent packages as well so they&#8217;re all ready to go in one shot.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After an excruciating wait and years of learning PostgreSQL, it&#8217;s time to unify the PostgreSQL ebuilds.<\/p>\n","protected":false},"author":136,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":"","jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true},"categories":[3,5],"tags":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p1tO5a-3B","_links":{"self":[{"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/posts\/223"}],"collection":[{"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/users\/136"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/comments?post=223"}],"version-history":[{"count":4,"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":228,"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/posts\/223\/revisions\/228"}],"wp:attachment":[{"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/media?parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/categories?post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.gentoo.org\/titanofold\/wp-json\/wp\/v2\/tags?post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}