lldb NameError: name ‘run_one_line’ is not defined

I’m a heavy lldb user during Icinga 2 development. Most recently I got many of those error messages when starting lldb for debugging Icinga 2.

mbmif /usr/local/icinga2/etc/icinga2/tests (master) # lldb -- /usr/local/icinga2/lib/icinga2/sbin/icinga2 console
(lldb) target create "/usr/local/icinga2/lib/icinga2/sbin/icinga2"
Traceback (most recent call last):
  File "", line 1, in 
  File "/Applications/Xcode.app/Contents/SharedFrameworks/LLDB.framework/Resources/Python/lldb/__init__.py", line 98, in 
    import six
ImportError: No module named six
Traceback (most recent call last):
  File "", line 1, in 
NameError: name 'run_one_line' is not defined

Turns out that I have Python2 installed from a dependency in Homebrew. The lldb scripts just use the system path for determining the preferred Python binary.

A sensible workaround is discussed here:

$ /usr/local/bin/pip install six

Works again.

mbmif /usr/local/icinga2/etc/icinga2/tests (master) # lldb -- /usr/local/icinga2/lib/icinga2/sbin/icinga2 console
(lldb) target create "/usr/local/icinga2/lib/icinga2/sbin/icinga2"
Current executable set to '/usr/local/icinga2/lib/icinga2/sbin/icinga2' (x86_64).
(lldb) settings set -- target.run-args  "console"
(lldb) q

Since I wanted to check which package requires python in /usr/local/bin/python I found this command

$ brew list | while read cask; do echo -n "$cask ->"; brew deps $cask | awk '{printf(" %s ", $0)}'; echo ""; done

I can’t get rid of pygtk and macvim, so each new install/update will pull Python again. The reason why they build their own Python is somewhat unsafe C++ functions. Guess I don’t want to dig any deeper here.

Homebrew Caskroom migration

I’m using Homebrew on my Macbook. It is a great addition to installing software when you are used to package managers from the Linux world.

There’s also an extension called Homebrew Cask which allows you to manage MacOS applications, such as Adium or Gimp. This saves you the hassle of manually downloading the package/dmg files and automates the installation/updates.

Lately when doing an update again, there was a notice about a changed Caskroom location.

michi@mbmif ~ $ brew cask list
Warning: The default Caskroom location has moved to /usr/local/Caskroom.
Please migrate your Casks to the new location and delete /opt/homebrew-cask/Caskroom,
or if you would like to keep your Caskroom at /opt/homebrew-cask/Caskroom, add the
following to your HOMEBREW_CASK_OPTS:
  --caskroom=/opt/homebrew-cask/Caskroom
For more details on each of those options, see https://github.com/caskroom/homebrew-cask/issues/21913.
apache-directory-studio  filezilla                gimp                     macvim                   vlc                      xquartz
bitbar                   firefox                  java7                    mysqlworkbench           wireshark

Ok, what would I do now? “Migration” could just mean moving the directories. But wait, the installed applications could be symlinked into ~/Applications instead of being moved (#13966).

Looking into the mentioned github issue #21913 shed some light on how to fix it. Moving the directories will make “brew cask list” shut up about the changed location, but later uninstalls will fail due to dangling symlinks. The solution is simple – force an installation again after moving the installed casks.

michi@mbmif ~ $ mv /opt/homebrew-cask/Caskroom /usr/local
michi@mbmif ~ $ brew cask list
apache-directory-studio  filezilla                gimp                     macvim                   vlc                      xquartz
bitbar                   firefox                  java7                    mysqlworkbench           wireshark

michi@mbmif ~ $ for cask in $(brew cask list); do brew cask install $cask --force; done

Done 🙂

LEGO Creator Expert: Brick Bank 10251 Review

IMG_2698A new year and a new LEGO creator modular building – this time a corner model providing a brick bank and a small laundry. I got this model 10251 two weeks ago while visiting the LEGO store in Nuremberg but now found the time and mood to go into building.

The set contains 2380 pieces, four build steps with 267 steps inside the instruction manual. Compared to older modular buildings it isn’t that hard to build and some building techniques have been changed. This one goes more into building bigger spots and putting it together.

When it starts off on the ground plate, the first cool thing you’ll recognise is the lockable vault including the removable ceiling. Building further the vault is still open but once the atrium foyer is finished you’ll find out about another cool surprise – the washing machines provide a hidden chest for actually washing the money and putting them directly into the vault. That’s something you cannot really tell from the package images.

The other part of this building step adds the pull-able cashbox for the transaction counter adding yet another lovely detail to the scene. When it comes to the ceiling there’s a hidden entry for thieves coming from the roof. You may actually change one of the mini figures into a thief outfit and start your own play story.

The first floor seems empty as there is only one room for the bosses office and a spot for the secretary. Though the build is fun and provides lots of details like the coffee vendor or building the fireplace attached to the chimney for the thief entering the bank. The typewriter totally fits my kind of humour.

The rooftop is not much in height but offers many details for making this model good. It also adds a chandelier and a small winch for pulling heavy stuff from the ground. The rounded roof windows use a common building technique already known from the pets store.

There are no stickers – everything is printed, even the window glasses. There could probably be more than 5 minifigures – the laundry seems pretty empty without employees. There are also not that much repetitive build steps except for one, but the look really compensates for that afterwards. What I really missed was building letters/numbers from other bricks (like “AL’S” and “POOL” from the detective’s office).

Sorting the bricks takes quite a while, so I guess this model was like 5-6 hours for building and sorting. Being a corner building it perfectly fits with the detective’s office from last year 🙂

 

Windows 10 update changes partition table and breaks GRUB

It’s holiday season and so I got a hold of playing some games longly missed on Windows. Booting Windows 10 certainly unveiled several pending updates (Antivirus, Geforce, Windows updates). Since Windows 10 does not explicitly tell about big updates anymore I just did let it reboot several times, waiting for manual grub selection then.

Though this time the update essentially broke GRUB. “error: unknown filesystem. Entering rescue mode…” is certainly not what I expect from a Windows 10 update. After googling a bit I found this thread including an explanation as well as a solution for the problem: The Windows 10 update adds yet another hidden partition, but essentially rewrites the partition table which then breaks GRUB finding the correct /boot partition containing grub2/. Congrats Microsoft!

So, Windows 10 “Upgrade to Windows 10 Home, version 1511, 10586” breaks grub2 because boot block grub2 still thinks it should boot grub2 from (hd0,msdos2) when it now needs to boot from (hd0,msdos3).

The solution is simple but nasty without bash-completion and English keyboard layout on a German keyboard.

First find the boot partition containing the grub2/ directory.windows10_upgrade_dec2015_breaks_grub

grub rescue> ls (hd0,msdos1)/grub2
error: unknown filesystem.
grub rescue> ls (hd0,msdos2)/grub2
error: unknown filesystem.
grub rescue> ls (hd0,msdos3)/grub2
./ ../ themes/ device.map i386-pc/ locale/ fonts/ grubenv grub.cfg

Next set the changed boot prefix and root attributes:

grub rescue> set prefix=(hd0,msdos3)/grub2
grub rescue> set root=(hd0,msdos3)
grub rescue> set
prefix=(hd0,msdos3)/grub2
root=hd0,msdos3
grub rescue> insmod normal
grub rescue> normal

Change from “rescue” to “normal” GRUB mode, and quickly select Fedora from the boot menu. In order to fix GRUB log into Fedora, open a terminal and become root. Now generate a new grub configuration.

sudo -i
grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-install /dev/sda
reboot

Reboot and the GRUB menu should be fixed. Now safely choose to continue the Windows 10 upgrade.

LEGO Dimensions

thumb_IMG_1760_1024I’ve played and enjoyed each LEGO game from Telltale (except the Wii-U exclusive City Undercover) starting with LEGO Star Wars and most recently, LEGO Jurassic World.

When I heard about LEGO Dimensions coming up this year, I watched a couple of trailers getting an idea what to expect. Considering that #breaktherules is their slogan, that game supposed to be huge. When I read about level, team and fun packs to be bought in additional waves it felt a bit like a cash printing machine for LEGO instead of a real game.

I’m fairly too much into LEGO to resist in pre-ordering this game, but only the starter pack for now. Furthermore Amazon granted a 15€ pre-order bonus when getting LEGO Jurassic World, so the 100€ starter pack wasn’t too expensive.

thumb_IMG_1761_1024Level packs range from 25€ to 30€ providing additional levels for: The Simpsons, Back to the Future, Portal, Dr. Who (Amazon exclusive available at 5.11.2015), Ghost Busters (available January 2016) and Midway Arcade (March 2016, never heard of that).

Team packs add more figures and vehicles and range at ~25€ each. Fun packs consist of one figure and one vehicle at the price of 15€.

There will be several waves where these packs are released over the next couple of months. According to Warner Bros they will support the game 3 years with updates too.

thumb_IMG_1764_1024Opening the starter pack box unveils the toy bad, the game disc and an additional box containing the bricks for the portal, three characters (Batman, Gandalf, Wyldstyle) and the bat mobile.

thumb_IMG_1766_1024Before starting the build I did start my PS4 and inserted the game disc. It then immediately started to download a 5 GB (!) update to 1.02 which fairly took over an hour even with VDSL50.

While that download lasted, I did build the three characters, the portal itself and well, then I was stuck – the bat mobile instructions are not available inside the printed build instructions. The reason for that is implicitly explained in-game: You may modify and upgrade vehicles and characters inside the game and it holds additional build instructions.

thumb_IMG_1773_1024The toy pad itself is a simple NFC reader attached to the PS4 via USB (cable is pretty long). While the figure stands are printed and reserved NFC tags for each character, the vehicles must be built and then written to the NFC tag. The game will tell you to do so – at first glance this happens when you’re building the bat mobile after completing the portal build.

The light bulbs are using different colours, sometimes blink for giving hints and the three areas can hold 7 characters or vehicles at the same time. At first it was not that clear how the toy pad would be involved in the game – ok, by putting the bat mobile on it it did appear in-game and could be used.

thumb_IMG_1776_1024When going further with the story you’ll experience 5 different purple keystones with different modes: colour puzzles, special character abilities to clear fire, melt ice, enlighten dark rooms, etc. You need to interact with the toy pad and put your characters on it – be it a defined order, or a specific area. Once you’ve completed the first story mode levels you should’ve learnt how to use them. Cool thing: The game tells you to physically attach each keystone to your portal once each level is finished.

thumb_IMG_1777_1024So far I’ve finished 4 of 5 keystones in the story levels and came across Gotham City, Wizard of Oz, Simpsons, Ninjago and Doctor Who. Still curious what else to see. The story itself has an evil boss, the usual suspects supporting him and you, the brave hero fighting your way against them. The level design and story somehow reminded me of Super Mario World, especially the yellow brick road in the Wizard of Oz 😉

If you are familiar with LEGO games you certainly want to achieve the 100% level. This is helped by buying the red bricks with collected studs which help detecting mini kits, gold bricks, 2x studs (no more 4,6,8,10 multipliers though) and a quest detector. The other ones are more or less funny additions.

The “nasty” thing about these red bricks – they are hidden in the adventure worlds. In order to access these adventure worlds you’ll need a character of each world. So you’ll end up buying additional level, team and fun packs. Clever, LEGO, very clever. Which in return means you cannot complete LEGO dimensions just by getting the starter pack.

Once you’ve completed the first levels you are allowed to use the lift to move up and access all adventure worlds – and there are quite a few. The main three figures allow you to access the DC Comics, LEGO Movie and The Lord Of the Rings adventure worlds instantly. The rest – well, first the story mode, then buy additional adventure world characters, collect red bricks, finish story mode free play and then work towards the 100%.

Conclusion: Apart from the money it will cost you, it is a definitive must buy. The gameplay is better (not so much different characters in the main story, if you don’t want to) and the toy pad integration really adds a new special feature to just sitting on the couch with the controller. Solve puzzles or just transform your character into the level and play with it. Typically you’ll find plenty of LEGO humour and sarcastic references 🙂 And yet, there’s offline LEGO to build!