Is there a way to specify the name of a repository from the command line? I know that you can just pop in a file to /etc/yum.repos.d/<name>.repo> with the name you want, but I would prefer to use the interface before resorting to that.
Currently I call
>> yum-config-manager --add-repo file:///path/to/local/repo
which creates a file like /etc/yum.repos.d/path_to_local_repo.repo with a section heading of path_to_local_repo and a name like "added from file:///path/to/local/repo". Is there a way to do this using some other command (currently I only know of yum-config-manager to do these kinds of things.)
What I am really wanting this for is to have the ability to delete a repository programmatically, and I don't want to guess at the repo name.
A quick look at http://yum.baseurl.org/gitweb?p=yum-utils.git;a=blob;f=yum-config-manager.py;h=380a54fd89b8d2f1afc96020be20d231733b838b;hb=HEAD certainly seems to indicate that you can't control those fields when you use yum-config-manager in this mode.
If you can find (or create) a .repo file that has the contents you want then you can use yum-config-manager in that mode and it looks like it should use the file you gave it directly.
Related
Problem Statement
Hello everyone, I have been trying to rename my project App-name, package name using a single terminal command. I tried react-native-rename but not serving the purpose. Every-time I have to manually change some of the files. I'm looking for some custom & optimised solution.
Solution I'm expecting.
Is there any way to create a file where I can define a file where I can all of the file names to replace App Name or package name, Move package location. And I could execute that file through a command as well.
I'm new to this, please help me. You can just mention the documentation or give me the direction to move forward. that would be a great help.
Somewhat related to this question - Parametrizing node name in Elixir Exrm - is there a way to dynamically set the content of the rel/vm.args file?
In the title, I suggest the use of config.exs, but I'm interested in any scheme that will allow me to add, remove and edit vm arguments at build time.
A bash script might be an idea, but a solution that would also work on Windows, and is preferably based on Elixir code would be the idea.
You can commit to your project repo a rel/vm.args file that you would like to be used instead of the Exrm generated one. Exrm will automatically use this file instead.
I have a project, hosted on launchpad, which contains a fairly user-specific configuration file.
Once the project is initially checked out, obviously this .cfg file should also be downloaded. However, further updates (via "bzr update") would ideally not alter this .cfg file, as the user would have made their own edits to it. These edits would be overridden / merged should (with potential conflicts) I push an update using the code with my own .cfg file - I don't want this to happen!
What's the best practice to avoid this? I can't really "bzr ignore", as then any future users checking out via bzr would then not have the .cfg file.
I could, of course, replace my .cfg file with the "stock" one each time I do a commit, but this seems a bit clunky.
Or equivalently clunky, supply the .cfg file separately.
What I'm looking for is a "single-shot" download, but never update subsequently.
Any advice?
This is a tricky problem, because version control systems in general are not engineered to have the fine-grained commit strategies needed for this approach. If you were operating in a controlled environment, you could use plugins or hooks to exclude certain files from commits etc., but that doesn't seem to be an option here. I'll add that bzr ignore won't help you, either, because it only prevents files from being added; it doesn't prevent commits or checkout of those files.
What you can do is generate the config file during build/setup/installation if it doesn't already exist. Something like:
#!/bin/sh
if [ ! -e configuration.cfg ]; then
cp etc/configuration.cfg.in configuration.cfg
fi
Here, you'd check in etc/configuration.cfg.in normally and run the above script at build/setup/installation (this could also be automated by a post_change_branch_tip hook in a controlled environment). You'd put the original in a different directory so that there's less of a risk of it getting edited by accident.
This question already has answers here:
What is the best practice for dealing with passwords in git repositories?
(9 answers)
Closed 8 years ago.
Along the code there could be very sensitive information such as passwords, amazon s3 keys, etc that I don't want to be sent to git at all.
I'd like those very specific fields to either be replaced with "SECRET" or something like that.
Also, is git private repo solving this?
Since git tracks text and not just files, replacing these lines with some other text would be interpreted by git as a change on the code, so it would overwrite the original sensitive info in the next commit.
What I use to do in these cases is to modularize my code so this info get isolated in a single file, and then I add a line with the file name to the .gitignore file.
The .gitignore file is a collection of patterns, one per line, of file names to be ignored by git while tracking changes in your repo.
For example, if I'm writing a web system in php, I create a file that only store info about credentials for connecting to the database (frameworks use to do so too, so you could guess it's a good practice...). So I write this file once with the test server credentials (which my collaborators are supposed to know) or with some dummy credentials, commit it and push it to my remote, and then I add the file name to my .gitignore.
In the other hand, you have the command git add -p, which interactively let you skip lines, but that would result on a file without the mentioned lines in your remote repo, an you having to manually skip the lines every time you add the file...
A Good reference for git is Progit. Highly recommended if you are starting with git... Also, Github's help center is a very good place to look.
I hope it would be helpful! good luck!!!
I have a utility that checks various file info (size, date, location, etc) against a manifest to see that it all matches. Would anyone know if there's a way to get the last write date of a file in a svn repository, using VB.NET. The equivalent of using FileInfo.LastWriteDate.
Any thoughts?
I think you can call svn from the command line with the appropiate parameters to get this information. If that is possible, you can write a class which does that for a given file.
Other than that, there might be some library out there which does this and more things, but if what you asked for is the only thing you need from svn, using a library might be overkill