Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 339814 Details for
Bug 420445
etc-update / dispatch.conf should accept a config file of accept / reject tuples
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
etc-update hook
etc-update (text/plain), 1.57 KB, created by
Theo Chatzimichos (RETIRED)
on 2013-02-23 17:09:58 UTC
(
hide
)
Description:
etc-update hook
Filename:
MIME Type:
Creator:
Theo Chatzimichos (RETIRED)
Created:
2013-02-23 17:09:58 UTC
Size:
1.57 KB
patch
obsolete
>#!/bin/bash > >package_etc_update="/etc/portage/package.etc-update" ># remove previously created etc-update temp files >rm -rf /var/tmp/etc-update-* ># run etc-update with -p, so that it will do trivial merges, and -7 to create tmp files >etc-update -p --automode -7 > /dev/null >files=$(find /var/tmp/etc-update-*/files/ -type f) >for file in $files; do > orig_config=$(head -n 1 $file) > cfg_list=($(tail -n +2 $file)) > IFS=$'\n' > RULES=( $(grep ${orig_config} ${package_etc_update}) ) > for rule in ${RULES[@]}; do > IFS=$' ' > rule=(${rule}) > if [[ ${#rule[@]} > 2 ]]; then > # MD5sums are included in the rule > for cfg in ${cfg_list[@]}; do > md5sum_cfg=$(md5sum $cfg | cut -d' ' -f1) > for md5 in ${rule[@]:3}; do > if [[ $md5 == $md5sum_cfg ]]; then > if [[ ${rule[0]} == "accept" ]]; then > mv $cfg $orig_config > rm ${cfg_list[@]} > /dev/null > elif [[ ${rule[0]} == "reject" ]]; then > rm $cfg > /dev/null > fi > break > fi > done > done > else > # No MD5sums are in the rule > if [[ ${rule[0]} == "accept" ]]; then > mv ${cfg_list[${#cfg_list[@]}-1]} $orig_config > rm ${cfg_list[@]} > /dev/null > elif [[ ${rule[0]} == "reject" ]]; then > rm ${cfg_list[@]} > /dev/null > fi > fi > done > unset IFS >done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 420445
: 339814