Due to an influx of spam, we had to disable account registrations. If you don't have an account yet, please write an email to support@manjaro.org, with your desired username. Sorry for the inconvenience.
I think it would be sufficient to just remove local repo from pacman.conf if I got the request right.
As the user pointed out, he only want to use local repo to build iso, but he doesn't need this repo on the iso.
Community Hello ..
I do not know if I can post here this request Otherwise locate In the right section. What I state sripting as I know little or nothing, and therefore we ask You Make A script Launching the first boot (after getting installed iso Created with Manjaro-tools) to delete and replace the pacman.conf with pacman.conf original. Explain: the pacman.conf Contains my repo-Local THIS superfluous How All Programs Are Present on aur so I will not serve more the call and then I would like to eliminate ..
To solve this issue, maybe bits from geniso (discussion in forum here) could be used.
The bits that could be possibly used are:
REPOS=()get_repos () { # get repos from pacman.conf specified as argument local pacman_conf=$1 # sed is being used for filtering comments and repo brackets [] REPOS=($(grep "\[*\]" "$pacman_conf" | sed -e '/^\s*#/d' -e 's/\[//' -e 's/\]//'))}# Get repos from pacman.conf and set valid reposif [[ $ARCH = x86_64 ]]; then VALID=('options' 'core' 'extra' 'community' 'multilib') # Get list of repos if [[ -e $PROFILE/pacman-multilib.conf ]]; then get_repos "$PROFILE/pacman-multilib.conf" fielse VALID=('options' 'core' 'extra' 'community') # Get list of repos if [[ -e $PROFILE/pacman-default.conf ]]; then get_repos "$PROFILE/pacman-default.conf" fififor repo in "${REPOS[@]}"do if ! echo "${VALID[*]}" | grep -q "$repo"; then # Remove custom repo for file in $WORKDIR/$PROFILE/$ARCH/{livecd,root,${PROFILE%-*}}-image/etc/pacman.conf do if [[ -f $file ]] && [[ ! $QUERY = true ]]; then echo "Editing $file" sed -i "/^\[$repo/,/^Server/d" "$file" || exit 1 fi done echo "Custom repo $repo removed from pacman.conf" fidone
If deciding to go this way, maybe a flag could be added to buildiso (eg -k for keep), which could prevent the removal of specific repo(s).
This could be useful if one had two repos, one local and other remote, and wanted to remove the local repo but keep the global one.
I had accidentally commited my changes about cleaning pacman.conf and trimming xorg cache leading to a little confusion; I will try to explain.
Regarding Xorg and lng cache, what we had earlier was that the whole cache would get copied to the ISO, ie, if there were multiple versions of the same package, they would get copied. I thought to make it like pacman cache, which only copies the latest version, and sent a pull request that trims copied pacman cache.
With this change, now one does not need to clean Xorg and lng cache always, so I introduced an option for not cleaning it by default in the config.
I agree with you that it makes the switches kind of redundant and you could remove them if you feel its appropriate.
Hmm, I would rather remove file based switches in favour of cli switches.
I personally don't like bool switches in a config.
I only use xorg cache enabled if I rebuild a test build immediately.
Yup, that is why I added an option in config, some people want to clean every time, some do not want to :-)
If it was a switch one of the parties could feel inconvenienced as they would have to add -x every time, this way one can set it in config and only change when required.
This discussion gives me an idea: maybe the -x or -l switches could be made as toggles, ie, if in config it is specified to clean, and -x option is specified, then dont clean.
Alternatively, if it is specified in config to not clean, and -x is supplied, then clean.
Everything else is fine, but the switches in the config will likely go. The reason is, if we start with switches in a file, we will accumulate more and more switches in the config over time, I would like to avoid this.
A cli program will always make use of cli switches for special cases, such as activating the xorg cache.
Except you can guarantee that always using xorg cache works without any complications, then we can remove the -x flag altogether from config and cli, so its always used.
Whats the point of having switches if the cache handles different versions?
I think, if the cache works as you intended, we can remove those cache switches altogether.
I never liked them much, but the request was to have a cache.
If your solution works, lets remove the switches, they are kind of useless then. :)
Ok, I have added some code regarding removing a custom local repo.
It parses custom pacman.conf if present, and removes any custom repo having a local filesystem('file://') address.
No keep_repos var though, all done with parsing, custom remote repos are kept.