2
0
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:
Dylan Araps 2019-05-10 14:40:19 +03:00
parent a8e3eae226
commit 213380b542
6 changed files with 25 additions and 10 deletions

31
puke
View File

@ -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
View File

@ -0,0 +1 @@
3ebf85fe65df2ee165b22596540b7d5d42f84d4b72d84834f74e2e0b8956c347 perl-5.28.1.tar.gz

1
repo/perl/depends Normal file
View File

@ -0,0 +1 @@
zlib

0
repo/perl/release Normal file
View File

1
repo/perl/sources Normal file
View File

@ -0,0 +1 @@
https://www.cpan.org/src/5.0/perl-5.28.1.tar.gz

1
repo/perl/version Normal file
View File

@ -0,0 +1 @@
5.28.1 1