mirror of
https://codeberg.org/kiss-community/repo
synced 2024-12-21 23:00:06 -07:00
puke: Added dependency checking
This commit is contained in:
parent
a8e3eae226
commit
213380b542
31
puke
31
puke
@ -32,9 +32,10 @@ pkg_info() {
|
||||
|
||||
pkg_depends() {
|
||||
[ -f depends ] && while read -r dependency; do
|
||||
# TODO: Handle dependencies.
|
||||
log "Found dependency $dependency"
|
||||
pkg_list "$dependency" || missing="$missing $dependency"
|
||||
done < depends
|
||||
|
||||
[ -n "$missing" ] && die "Missing dependencies:$missing"
|
||||
}
|
||||
|
||||
pkg_sources() {
|
||||
@ -145,8 +146,24 @@ pkg_tar() {
|
||||
log "Package is at $bin_dir/$pkg.tar.gz."
|
||||
}
|
||||
|
||||
pkg_list() {
|
||||
[ "$1" ] && {
|
||||
[ -d "$sys_dir/var/db/puke/$1" ] || return 1 && return 0
|
||||
}
|
||||
|
||||
for pkg in "$sys_dir/var/db/puke/"*; do
|
||||
read -r version release < "$pkg/version"
|
||||
log "${pkg##*/} $version-$release"
|
||||
done
|
||||
}
|
||||
|
||||
args() {
|
||||
[ -n "${1#l*}" ] && pkg_info "$2"
|
||||
[ -n "${1#l*}" ] && {
|
||||
mkdir -p sources build pkg/var/db/puke sys bin ||
|
||||
die "Couldn't create directories at '$PWD'".
|
||||
|
||||
pkg_info "$2"
|
||||
}
|
||||
|
||||
case $1 in
|
||||
b*)
|
||||
@ -176,10 +193,7 @@ args() {
|
||||
;;
|
||||
|
||||
l*)
|
||||
for pkg in "$sys_dir/var/db/puke/"*; do
|
||||
read -r version release < "$pkg/version"
|
||||
log "${pkg##*/} $version-$release"
|
||||
done
|
||||
pkg_list "$2"
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -192,9 +206,6 @@ main() {
|
||||
trap clean EXIT INT
|
||||
clean
|
||||
|
||||
mkdir -p sources build pkg/var/db/puke sys bin ||
|
||||
die "Couldn't create directories at '$PWD'".
|
||||
|
||||
old_pwd=$PWD
|
||||
src_dir=$PWD/sources
|
||||
mak_dir=$PWD/build
|
||||
|
1
repo/perl/checksums
Normal file
1
repo/perl/checksums
Normal file
@ -0,0 +1 @@
|
||||
3ebf85fe65df2ee165b22596540b7d5d42f84d4b72d84834f74e2e0b8956c347 perl-5.28.1.tar.gz
|
1
repo/perl/depends
Normal file
1
repo/perl/depends
Normal file
@ -0,0 +1 @@
|
||||
zlib
|
0
repo/perl/release
Normal file
0
repo/perl/release
Normal file
1
repo/perl/sources
Normal file
1
repo/perl/sources
Normal file
@ -0,0 +1 @@
|
||||
https://www.cpan.org/src/5.0/perl-5.28.1.tar.gz
|
1
repo/perl/version
Normal file
1
repo/perl/version
Normal file
@ -0,0 +1 @@
|
||||
5.28.1 1
|
Loading…
Reference in New Issue
Block a user