I'm working with a Yocto build and I'm trying to trim some fat off of it. From my board-vendor-included layers include a chromium recipe. I have no interest in using Chromium in our final image, and I've been trying to cut it out of the image. So far, in my local.conf, I've tried the following:
IMAGE_INSTALL_remove += "chromium-browser"
IMAGE_INSTALL_remove += "chromium-wayland"
IMAGE_INSTALL_remove += "chromium"
PACKAGE_EXCLUDE = "chromium chromium-wayland chromium-browser"
And I have not had any success. Every time I go back to build the image, chromium-wayland has attempted to compile.
Are there any other options to remove a package from an image? Should I delete my directory of built packages and start over with these settings?
you have completely override the remove command with +=; Please try this instead
IMAGE_INSTALL_remove = " package package package "
PACKAGE_EXCLUDE shall not be neccessary
For newer versions from kirkstone or above you should use IMAGE_INSTALL:remove instead of IMAGE_INSTALL_remove
Related
The root problem is that nix uses autoconf to build libxml2-2.9.14 instead of cmake, and a consequence of this is that the cmake-configuration is missing (details like version number, platform specific dependencies like ws2_32 etc which are needed by my project cmake scripts). libxml2-2.9.14 already comes with cmake configuration and works nicely, except that nix does not use it (I guess they have their own reasons).
Therefore I would like to reuse the libxml2-2.9.14 nix package and override the builder script with my own (which is a trivial cmake dance).
Here is my attempt:
defaultPackage = forAllSystems (system:
let
pkgs = nixpkgsFor.${system};
cmakeLibxml = pkgs.libxml2.overrideAttrs( o: rec {
PROJECT_ROOT = builtins.getEnv "PWD";
builder = "${PROJECT_ROOT}/nix-libxml2-builder.sh";
});
in
Where nix-libxml2-builder.sh is my script calling cmake with all the options I need. It fails like this:
last 1 log lines:
> bash: /nix-libxml2-builder.sh: No such file or directory
For full logs, run 'nix log /nix/store/andvld0jy9zxrscxyk96psal631awp01-libxml2-2.9.14.drv'.
As you can see the issue is that PROJECT_ROOT does not get set (ignored) and I do not know how to feed my builder script.
What am I doing wrong?
Guessing from the use of defaultPackage in your snippet, you use flakes. Flakes are evaluated in pure evaluation mode, which means there is no way to influence the build from outside. Hence, getEnv always returns an empty string (unfortunately, this is not properly documented).
There is no need to refer to the builder script via $PWD. The whole flake is copied to the nix store so you can use your files directly. For example:
builder = ./nix-libxml2-builder.sh;
That said, the build will probably still fail, because cmake will not be available in the build environment. You would have to override nativeBuildInputs attribute to add cmake there.
I will run the script on the Blender command line. All I want to do is run the same script for several files. I have completed the steps to run a background file (.blend) and run a script in Blender, but since I have just loaded one file, I can not run the script on another file.
I looked up the Blender manual, but I could not find the command to import the file.
I proceeded to creating a .blend file and running the script.
blender -b background.blend -P pythonfile.py
In addition, if possible, I would appreciate it if you could tell me how to script the camera and track axes to track to contraint (Ctrl + T -> Track to constraint).
really thank you for reading my ask.
Blender can only have one blend file open at a time, any open scripts are cleared out when a new file is opened. What you want is a loop that starts blender for each blend file using the same script file.
On *nix systems you can use a simple shell script
#!/bin/sh
for BF in $(ls *.blend)
do
blender -b ${BF} -P pythonfile.py
done
A more cross platform solution is to use python -
from glob import glob
from subprocess import call
for blendFile in glob('*.blend'):
call([ 'blender',
'-b', blendFile,
'--python', 'pythonfile.py' ])
To add a Track-to constraint to Camera pointing it at Cube -
camera = bpy.data.objects['Camera']
c = camera.constraints.new('TRACK_TO')
c.target = bpy.data.objects['Cube']
c.track_axis = 'TRACK_NEGATIVE_Z'
c.up_axis = 'UP_Y'
This is taken from my answer here which also animates the camera going around the object.
bpy.context.view_layer.objects.active = CameraObject
bpy.ops.object.constraint_add(type='TRACK_TO')
CameraObject.constraints["Track To"].target = bpy.data.objects['ObjectToTrack']
I have put lxc.lxcpath=/my/path into /etc/lxc/lxc.conf and /usr/local/etc/lxc/default.conf but when I run lxc-config lxc.lxcpath it still shows a different path. How can I set the lxcpath? This is with lxc2.1.1 installed from sources.
If you are running
lxc-config lxc.lxcpath
as non-root, then you need to edit ~/.config/lxc/lxc.conf instead of /etc/lxc/lxc.conf. As in:
serge#sl:~$ echo "lxc.lxcpath = /tmp/xxx" > ~/.config/lxc/lxc.conf
serge#sl:~$ lxc-config lxc.lxcpath
/tmp/xxx
Alternatively, since you said you installed from source, it is possible that you need to edit /usr/local/etc/lxc/lxc.conf instead. You can find the path in config.log, i.e.:
LXC_GLOBAL_CONF='/usr/local/etc/lxc/lxc.conf'
I have a typescript project set up that is being built with GruntJS using the typescript plugin. I also have a Visual Studio project that I'd like to be able to invoke the build process from.
My first attempt at doing this was adding an <Exec> task to the BeforeBuild target in visual studio, with the <Exec> task configured like this:
<Exec Command="grunt --no-color typescript" />
This runs the build fine, however, when errors are output from Grunt and they populate the Error List in VS, the filename is incorrectly listed as EXEC.
Looking at the Exec Documentation I see that CustomErrorRegularExpression is a parameter to the command, but I can't quite grasp how to use it to solve my problem.
I messed around with it a bit and managed to change the reported filename to my .jsproj file, which is also incorrect. Looking at this post I tried forming my own regex:
<Exec CustomErrorRegularExpression="\.ts\([0-9]+,[0-9]+\):(.*)" Command="grunt --no-color typescript" IgnoreExitCode="true" />
Does anyone have any experience using this command with this parameter to achieve this sort of thing? I think maybe part of the problem is that grunt is printing out errors in two lines?
You are correct about the Exec task only processing single line messages. In addition it also uses Regex.IsMatch to evaluate the error/warning condition, without making use of the pattern's capture groups.
I was not able to find a way to work around this via MSBuild, but the changes to correct the problem were easy to make directly in the grunt task.
I'm using the grunt-typescript task from: https://www.npmjs.org/package/grunt-typescript.
There were 3 trivial changes necessary to make this work.
1) Replace the output utility methods near the top of tasks/typescript.js:
/* Remove the >> markers and extra spacing from the output */
function writeError(str) {
console.log(str.trim().red);
}
function writeInfo(str) {
console.log(str.trim().cyan);
}
2) Replace Compiler.prototype.addDiagnostic to write the file and error data on the same line:
Compiler.prototype.addDiagnostic = function (diagnostic) {
var diagnosticInfo = diagnostic.info();
if (diagnosticInfo.category === 1)
this.hasErrors = true;
var message = " ";
if (diagnostic.fileName()) {
message = diagnostic.fileName() +
"(" + (diagnostic.line() + 1) + "," + (diagnostic.character() + 1) + "): ";
}
this.ioHost.stderr.Write(message + diagnostic.message());
};
Once these changes are made, you no longer need the CustomErrorRegularExpression to be set on your Exec task, and your build output should display the error text including the correct source file with line and column information.
I had a script that was running locally, but it failed on Rally.
The reason it turns out is because the script contains the following line:
var regex = new RegExp("/Metrics/" + this.type + "/(\\d+)-(\\d+)");
This is so I can look for a particular string, based on this.type. Unfortunately something in the rake file changes the \\d expressions to \d, which breaks the script. This will probably break any script that relies on a double \ to escape stuff.
I was able to get around this by using [0-9] instead of \d, but it would be nice to get a more robust workaround to this nasty little gotcha.
This issue is fixed as of this commit. You can download the new rake file and rebuild your app.