Dec 21, 2008

--sync should be sync

emerge sync never should have become emerge --sync, of course 2 years ago I thought it was the right thing, it isn't though, live and learn. sync is currently an argument with the syntax of an option.



What's the difference?

An argument is what the command, or executable operates on. Some examples

cp file0 file1 copies file0 to file1.

ls list the current working directory

ls dir0 lists directory dir0



Right, so how is --sync an argument and not an option?

Options effect how commands operate on arguments. For example

cp file0 file1 will overwrite file1 if it exists.

cp --interactive file0 file1 will prompt to overwrite if file1 exists.

ls -R will list any files and directories off the current working directory recursively.

ls -R dir0 will list any files and directories off dir0 recursively.



I still don't understand why sync isn't an option, it isn't a file so wouldn't it be an option?

Well that's basically what I used to think, not a file not an argument. It's not true to understand better I suggest picking up a version control system (e.g. svn) and seeing how you can have arguments that aren't files. Example

svn checkout -r 1346 checkout revision 1346

See the -r switch is an option that operates on the checkout argument to the svn command.



Starting to get it...

--sync currently doesn't affect any target, doesn't change a thing but isn't a 'default' either (some options are just there for explicitness and are in effect unless another option is there.

Dec 19, 2008

types of use flags

Ok so I have yet another idea for portage and other portage like package managers. actually this is probably more aimed at EAPI. Different types of USE flags. The 2 I'm thinking of off the top of my head could be described as volatile and non-volatile. Basically a use flag marked volatile means a package needs to be recompiled if it gets changed one marked non-volatile most likely just pulls in another dependency or copies files such as documentation. I'm sure this feature could have lots of uses I'm not thinking of.

Dec 12, 2008

Download Book, The Ruining of a Good Feature

1-3 Months ago Safari Books finally started allowing you to download full books in pdf. It used to be that you had to download chapters of books in pdf. This was annoying even if you had tokens to do it. Tokens are Safari Books way of making sure we aren't pirating en masse, you get 5 tokens a month and can only keep 3 months worth. So now we can download full books how nice? right?

Well it would be except the only books you can download without buying more tokens are pocket references, those cost 6 tokens, so over 1 months worth. Most books are 16 tokens and I think I saw an 18 token one. I'm sorry but this is just GREEDY, I currently pay $439.99 a year for this service, isn't that enough for me to be able to download 4 books a year?

I probably wouldn't be complaining about this if they allowed you to keep all unspent tokens, I have about 2 years worth now. I actually asked for that.


We would like to inform you that according to Safari terms of service, we will not be able to reinstate the unused tokens.


No, of course not, and I knew that when I asked, but it didn't hurt to ask, or point out that I've used virtually no tokens over 2 years of subscription.

Well O'reilly since I find that this is just pure greed, I won't be renewing my subscription.

Maybe I'm wrong? you know to think that I shouldn't have to pay extra to download a few normal books? what do you think?

Dec 11, 2008

Regen2 development has officially begun

That's right I'm putting my money where my mouth is. It's small but the first 2 packages when into the regen2 tree this morning. They are MySQL 5.1.30 which was added because the gentoo maintainer refused to add it do to instability. I agree that it is unstable, but we have ~M Hard Masked packages for that reason. It has been added as ~M. The other app added is qsynergy, the ebuild was already on portage and I know it to be good so I added it to the tree, I'll probably stabilize it in a few weeks.

Since Regen2 is a fork of Funtoo you can enjoy all the benefits of Funtoo's changes in my tree, and I will try to get mine accepted into Funtoo.

In the future I will be building stable Regen2 tarballs, although only stage3's.

Nov 29, 2008

PostgreSQL \edit and Syntax Highlighting

If you've ever used \edit with PostgreSQL you've probably noticed that it's not using syntax highlighting that your favorite editor most likely supports. I've wondered why this is for a while, Postgres uses vim on my system which supports robust highlighting among other things.

I had a few things suggested to me, such as setting putting settings in my .vimrc, most of which would have forced filetype=sql on files that weren't sql, and would have been active outside of psql.

When you have a question what's the first thing you should do? RTFM. The answer was in the man page all along.


Tip: psql searches the environment variables PSQL_EDITOR,
EDITOR, and VISUAL (in that order) for an editor to use.
If all of them are unset, vi is used on Unix systems,
notepad.exe on Windows systems.


so how does this solve the problem? well the only program that uses PSQL_EDITOR is Postgres, and most editors allow you to specify options at startup. In the case of vim, if you want to have use filetype=sql for the default filetype for \edit all you have to do is


export PSQL_EDITOR='vim -c "set ft=sql"'


of course if you don't use vim or you want to set some different options you'll have to read the documentation for your editor, or operating system.

Nov 17, 2008

Finally Linux gets something first

... and it's something we didn't build. We get lots of things first but we usually build them. We never get proprietary software first. At best we get proprietary software the same day. Generally we get it months later. However, today linux takes another giant step towards being the dominant next OS, we are the first to receive 64-bit flash from adobe. Windows isn't getting it, Mac OS X isn't getting it, we are.

Nov 8, 2008

The Motherboard I want doesn't exist

My Desktop is dieing and needs to be replaced. So I'm working on researching the parts I'd need to replace it. As any good IT person knows, the motherboard is the most important decision to make when building a computer. Theirs a good chance that someone reading this will cry out I'm wrong.

The reason the Motherboard is the most important decision is it dictates the potential of the whole computer. For example the motherboard on my existing system has an AGP video card slot, I can't buy one of the latest and greatest video cards because it doesn't support it. Motheboard dictates everything from the power supply you buy to video card, ram and processor, and more.

So why is it I can't find a motherboard that I want? well... I have pretty complex requirements.

First, it has to work on Linux. That actually isn't that difficult but it does require a little research making sure all components are supported under Linux, and they have to be supported well, I don't want half-assed support that's going to take me a week to get working. I also have several seemingly incompatible hardware requirements.

I want a dual socket motherboard that supports recent quad core processors, ideally processors that have on chip virtualization features.

My next requirement is that I wanted an onboard graphics chipset that is supported by linux with open source drivers. The best choice for this is the intel line of chipsets. The latest being the Intel GMA 4500 HD. Now I have a problem, I can't find a SINGLE board that is Dual Socket and has onboard intel video (actually I think I did find one but the processor support was capped at like p4 or something). So why is it I can't get a system like this? Intel makes all these parts and yet they don't have an offering.

The last thing I want is onboard raid 0/1/10 that will work with my linux system without too much finagling. Advice has been given to me that I should ignore that and just use linux's raid (or buy a true hw raid card).

I also have some requirements for pci* slots but they are less strict, 1+ 16x pcie (for a future video card), 1+ 4x pcie or 1+ pci-x (for hw raid card in the future), 1+ pci (depends on onboard sound... I have a good audigy card that will work for me if the onboard isn't better than it).

So it seems I'll have to sacrifice some requirements. Chances are I'll do some heavy video card research so I can dump the intel video requirement.

Oct 30, 2008

accept input from stdin

if possible emerge-ng should be able to accept input from .

e.g. cat packagelist | emergeng

thus far neither portage nore pkgcore have this capability.

Oct 29, 2008

minimum permissions and privilegdges

I like security... which means I should be able to run portage as portage (user) and have the umask be 077, or perhaps 027. Unfortunately the last time I checked portage could handle these restrictive permissions (I forget if it was these exactly) except for one set... java. In a perfect ebuild world all ebuilds would be able to be installed under a very restrictive umask.

Should regen2 ever come to fruition this should be fixed.

Oct 28, 2008

pkgcore the victor

pkgcore is my pick for the next portage and codebase for emerge-ng. I admit I haven't let paludis have a chance (yet).

Why haven't I let paludis have it's chance?

The reasons are quite simple. Everytime I have tried paludis prior to this it has required extra configuration (meaning it doesn't work out of the box). I believe this was fixed recently. However,


paludis@1208029212: [WARNING] Use of Portage configuration files will lead to sub-optimal performance and loss of functionality. Full support for Portage configuration formats is not guaranteed; issues should be reported via trac. You are strongly encouraged to migrate to a Paludis configuration.
paludis@1208029212: [WARNING] Use of Portage configuration files will lead to sub-optimal performance and loss of functionality. Full support for Portage configuration formats is not guaranteed; issues should be reported via trac. You are strongly encouraged to migrate to a Paludis configuration.
* Done cleaning write cache for ebuild format repositories
paludis@1208029212: [WARNING] Use of Portage configuration files will lead to sub-optimal performance and loss of functionality. Full support for Portage configuration formats is not guaranteed; issues should be reported via trac. You are strongly encouraged to migrate to a Paludis configuration.



This is the end of a paludis --sync. Annoying. Paludis also has it's alpha releases marked as ~arch, this is a no, no. I also found the people in #paludis on irc to be rude and unhelpful. I was annoyed at the time (so being rude myself) as gentoo kde-svn overlay was going to require paludis which means I was going to be forced to use it. Regardless I've never been met with lot's of friendliness or help in #paludis. They are an RTFM crowd. I have been told to use paludis several times without even asking about it (as if it is the solution to all problems). So is pkgcore better? I can't say without a doubt that it is.

Why is pkgcore the victor?

For starter's it's only the victor for me. paludis is a more mature product at this point and has a stronger following of fanatic's/zealot's.

1.) pkgcore it more similar to portage.

pkgcore was originally intended to be portage 3. This leads to a large amount of similarities and backwards compatibility.

2.) pkgcore devs are really friendly. Sometimes patience is a virtue getting an answer on #pkgcore but most of the times I get one. This allowed me to quickly learn what I could and could not (yet) do with pkgcore, including finding a bug within a week.

3.) pkgcore just works. I installed pkgcore and with a quick look at the site was quickly able to start doing work with it.

4.) pkgcore installs faster. I think it took like an hour to build paludis on this machine (maybe more) pkgcore took 2 minutes tops.

5.) pkgcore uses C. For the parts of portage that were really slow they re-wrote them in C using cpython. using both python and c leads to faster development and speed where needed.

How do I use pkgcore
real quick

pmaint sync

this is the biggest adaption from portage, imho and I'm not sure why it's not --sync or pmerge --sync (in some ways it's more similar to portage 2.0 syntax). This will not only sync your main gentoo tree but any repositories you've intalled with layman. as of yet you still have to install them via layman, but this may change in the future.

pmerge packagename

I told you this was easy. Most of the options I use work. The biggest that doesn't is --verbose, this seems to be default now (with --ask) so an option is no longer needed. updating world

pmerge -auDs world

an -s is now needed to work with things like system and world. It's for package set. My one complaint here is the --newuse doesn't currently work with sets. This is a bug and will be fixed in the future.

Is anything wrong with pkgcore in your eyes?

well aside from the plethora of missing features (they'll get done, it's just a time thing). Documentation... I usually learn stuff by reading web documentation (or books) until I'm comfortable enough reading man pages. The web documentation for pkgcore needs a lot of work. I may actually volunteer to help with this. I haven't decided yet, and it depends partially on if they want to answer all my questions as I write the docs.

It'd be nice if at some point pmerge could become emerge etc... (meaning reprise it's roll as portage 3).

for more information on pkgcore go to pkgcore.org