Linux Kernel: Kernel Version String Appended with Either ''+" or "-Dirty"

Linux kernel : Kernel version string appended with either ''+ or -dirty

If Linux kernel images are being built with "-dirty" on the end of the version string, this simply means that modifications in the source directory have not been committed. Use git status to check for uncommitted files.

When you see the dirty string, it appends the kernel version string with the last abbreviated commit id + dirty to the kernel version.

You can use the above Git command to report modified, removed, or added files. You should commit those changes to the tree regardless of whether they will be saved, exported, or used. Once you commit the changes, you need to rebuild the kernel.

To force a pickup and commit of all such pending changes, enter the following:

 $ git add .
$ git commit -s -a -m "getting rid of -dirty"

Alternatively, use the make -j2 LOCALVERSION="-customstring" to get the custom string

What does + mean in a Linux kernel version number?

This is described in the shell script responsible for generating the local version string when building, which is scripts/setlocalversion:

# scm version string if not at a tagged commit
if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then
# full scm version string
res="$res$(scm_version)"
else
# append a plus sign if the repository is not in a clean
# annotated or signed tagged state (as git describe only
# looks at signed or annotated tags - git tag -a/-s) and
# LOCALVERSION= is not specified
if test "${LOCALVERSION+set}" != "set"; then
scm=$(scm_version --short)
res="$res${scm:++}"
fi
fi

So this most likely means that at the time of building the Git repository was deemed "dirty" by the script, that is: not checked out on a signed or annotated tag (see the git-tag documentation for the meaning of that).

Winforms App Not Displaying Graphical Elements in Design Mode

So to get this shown within the designer you have to know how the designer works.

For every MyForm.cs there will automatically be a file called MyForm.Designer.cs be created. Within this Designer file there will be only one function called InitializeComponents(). This function will be called within the constructor of your MyForm.cs file.

The design viewer itself is responsible for the Designer file, so any change to this file while the design view is open would normally be discarded. Also if you put some code into the designer file that is not needed be the designer will be truncated.

So the next question is, when will this truncation happen? When you freshly open the design viewer of a form, it will read in everything from the Designer.cs file without making any changes. If you make any changes onto the form by the designer the complete file will be rewritten with all the settings already read in including your latest changes.

This behaviour can be monitored if you open the designer file also as source code view, make some little changes in design mode and afterwards take a close look at the left of the source file. There will be the changes marked with a yellow or a green marker.

Now after all this stuff of informations, you can try the following procedure to get your code into the designer:

  • Open the design view and put some simple control onto your form (e.g. TextBox)
  • Save and close the design view and open the Designer.cs file as source file
  • Copy all your variables name of your controls at the end of the file, right below the textBox1 line
  • Copy all your control property settings within the InitializeComponent() function right below the property settings of the TextBox
  • Copy all your control constructors to the top of the file, right below the constructor of the TextBox
  • Save the file and open your form in design view
  • Select the dummy TextBox on the design view and delete it

    • This change within the DesignView leads to a complete rewrite of the designer.cs file, ordering all your manually added stuff the right way.

So this is the way to go. Last but not least another little trick:

Every programmer uses the using-statement to not write the whole path to every class (like System.Windows.Forms.TextBox), but the designer writes always the whole path. To make it a little easier for your copy and paste session you can also add a using statement at the top of the file. After saving and changing something in Design View all this stuff will be re-written automatically. So you don't need to add all this paths manually while your adding your stuff to the Designer.cs file.

Android AVD not showing anything. only ANDROID in the middle of the screen

After you create an AVD it really does take a long time to initialize. On my less than year old Core2Duo 2.8 GHz running Win7x64 and 4Gb of RAM, initializing a 2.2 version took at least 5 to 10 minutes (if not longer). Once it starts initializing you can watch the logcat in the DDMS panel of eclipse and watch it unpack and install all of the apps in the emulator.

java: returning a collection

I'd just prefer the List<Item> getItems() method. There's no real advantage to void getItems(Collection<? super Item> target) over the caller just doing myCollection.addAll(foo.getItems()) performance or otherwise. Collections.unmodifiableXYZ only creates a wrapper, not a complete copy of the collection so if the wrapper is used immediately and discarded it will never make it out of the first generation and will be collected quickly with little overhead.

If the collection of items is not always realized you might consider having getItems return Iterable<Item> when you don't know how many items there are. If you know the number of items and can write an iterator for them, then it's easy to write a custom subclass of AbstractCollection and return that.



Related Topics



Leave a reply



Submit