What is the best way to maintain an opening repertoire in electronic form? I am torn between two options:

a) having a database with separate games (e.g. in pgn files, or any one of ChessBase, Chess Assistant or SCID database format), where each game would be a subvariation of an opening that I play. This has an advantage for adding verbal annotations, easier printing, etc. This seems also what most professional players, or opening book writers do.

b) A proper opening book in CTG, bin, or whatever other custom opening book format. Possibly one book for my white openings, and one for my Black reperoire. This is better for transpositions, but does not allow me to add verbal annotations - at least not in the formats that I looked at. Chess Position Trainer seems like a good tool for this approach, but still does not let me include variations from database games, so you really can't use it effectively to build a repertoire.

Neither option seems ideal. Any advice?
There is no one answer to this question, because what is 'best' in this case is subjective. It also depends on how you play chess (online/IRL, OTB/Correspondence) and what you want to get out of the record (Professional games using line X, or just a list of what moves you want to play).

If you just want a list of what lines you want to play, then you could even just use something like this in your text editor of choice:

1.e4 e5 2.Nf3 Nc6 3.Bb5  a6 4.Ba4
  ........... Nf6 3.Nxe5
  .. c5 2.Nf3 Nc6 3.d4


However, if you want a visual list or references to Master games using each line, then Other solutions would be more appropriate.