forked from kiss-community/kiss
kiss: Use pkg_manifest to properly update manifest files
This commit is contained in:
parent
40d57d4948
commit
132ce20099
15
kiss
15
kiss
@ -449,7 +449,7 @@ pkg_manifest() (
|
|||||||
|
|
||||||
# This function runs as a sub-shell to avoid having to 'cd' back to the
|
# This function runs as a sub-shell to avoid having to 'cd' back to the
|
||||||
# prior directory before being able to continue.
|
# prior directory before being able to continue.
|
||||||
cd "$pkg_dir/$1"
|
cd "${2:-$pkg_dir}/$1"
|
||||||
|
|
||||||
# find: Print all files and directories and append '/' to directories.
|
# find: Print all files and directories and append '/' to directories.
|
||||||
# sort: Sort the output in *reverse*. Directories appear *after* their
|
# sort: Sort the output in *reverse*. Directories appear *after* their
|
||||||
@ -457,7 +457,7 @@ pkg_manifest() (
|
|||||||
# sed: Remove the first character in each line (./dir -> /dir) and
|
# sed: Remove the first character in each line (./dir -> /dir) and
|
||||||
# remove all lines which only contain '.'.
|
# remove all lines which only contain '.'.
|
||||||
find . -type d -exec printf '%s/\n' {} + -o -print |
|
find . -type d -exec printf '%s/\n' {} + -o -print |
|
||||||
sort -r | sed '/^\.\/$/d;ss.ss' > "$pkg_dir/$1/$pkg_db/$1/manifest"
|
sort -r | sed '/^\.\/$/d;ss.ss' > "${2:-$pkg_dir}/$1/$pkg_db/$1/manifest"
|
||||||
)
|
)
|
||||||
|
|
||||||
pkg_etcsums() (
|
pkg_etcsums() (
|
||||||
@ -738,7 +738,7 @@ pkg_conflicts() {
|
|||||||
#
|
#
|
||||||
# Pretty nifty huh?
|
# Pretty nifty huh?
|
||||||
while IFS=: read -r _ con; do
|
while IFS=: read -r _ con; do
|
||||||
log "$p_name" "Found conflict ($con), adding choice"
|
printf '%s\n' "Found conflict $con"
|
||||||
|
|
||||||
# Create the "choices" directory inside of the tarball.
|
# Create the "choices" directory inside of the tarball.
|
||||||
# This directory will store the conflicting file.
|
# This directory will store the conflicting file.
|
||||||
@ -759,13 +759,12 @@ pkg_conflicts() {
|
|||||||
log "this must be fixed in $p_name. Contact the maintainer"
|
log "this must be fixed in $p_name. Contact the maintainer"
|
||||||
die "by checking 'git log' or by running 'kiss-maintainer'"
|
die "by checking 'git log' or by running 'kiss-maintainer'"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Rewrite the package's manifest to update its location
|
|
||||||
# to its new spot (and name) in the choices directory.
|
|
||||||
sed -i "$(esc "$con" "/$cho_dir/$p_name$con_name")" \
|
|
||||||
"$tar_dir/$p_name/$pkg_db/$p_name/manifest"
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# Rewrite the package's manifest to update its location
|
||||||
|
# to its new spot (and name) in the choices directory.
|
||||||
|
pkg_manifest "$p_name" "$tar_dir" 2>/dev/null
|
||||||
|
|
||||||
elif "$grep" -Fxf "$cac_dir/$pid-m" -- "$@"; then
|
elif "$grep" -Fxf "$cac_dir/$pid-m" -- "$@"; then
|
||||||
log "Package '$p_name' conflicts with another package" "" "!>"
|
log "Package '$p_name' conflicts with another package" "" "!>"
|
||||||
log "Run 'KISS_CHOICE=1 kiss i $p_name' to add conflicts" "" "!>"
|
log "Run 'KISS_CHOICE=1 kiss i $p_name' to add conflicts" "" "!>"
|
||||||
|
Loading…
Reference in New Issue
Block a user