# HG changeset patch # User Aleksej Bobylev # Date 1509497380 -7200 # Node ID f4c12e7004624d5e3414991ba78c64c37a265f01 # Parent 3de0a0c5d4c89cad7a6c053ac9bea18f0f68b76f modules/deps: clean files from missing legacy packages; lighttpd/index.cgi: display appropriate name/description for split packages, display fair table in "Related packages" section. diff -r 3de0a0c5d4c8 -r f4c12e700462 lighttpd/index.cgi --- a/lighttpd/index.cgi Mon Oct 30 18:41:22 2017 +0000 +++ b/lighttpd/index.cgi Wed Nov 01 02:49:40 2017 +0200 @@ -664,7 +664,9 @@ local log active bpkg log="$LOGS/$pkg.log" - echo "

$pkg$(. $wok/$pkg/receipt; [ -n "$SHORT_DESC" ] && echo ": $SHORT_DESC")

" + echo -n "

$requested_pkg" + [ -f $PKGS/packages.info ] && awk -F$'\t' -vp="$requested_pkg" '{if ($1 == p) { print ": " $4; exit; }}' $PKGS/packages.info + echo '

' echo '
' echo "receipt & stuff" @@ -1075,8 +1077,43 @@ # Check for a log file and display summary if it exists. summary "$log" + + + # Informal table with dependencies pkg="$requested_pkg" + inf="$(mktemp -d)" + + # 1/3: Build dependencies (from receipt) + for i in $WANTED $BUILD_DEPENDS; do + echo "$i" >> $inf/a + done + + # 2/3: Runtime dependencies (from pkgdb) + inf_col2="$(mktemp)" + { + [ -s "$PKGS/packages.info" ] && + awk -F$'\t' -vp="$pkg" '{ + if ($1 == p) print $8 + }' "$PKGS/packages.info" + } | tr ' ' '\n' | sort -u > $inf/b + + # 3/3: Required by (from pkgdb) + inf_col3="$(mktemp)" + { + for i in $(awk -F$'\t' -vp="$pkg" '{if ($1 == p) print $2}' $splitdb); do + [ -s "$PKGS/packages.info" ] && + awk -F$'\t' -vp=" $i " '{ + if (index(" " $8 " ", p)) print $1 + }' "$PKGS/packages.info" + + [ -s "$PKGS/bdeps.txt" ] && + awk -F$'\t' -vp=" $i " '{ + if (index(" " $2 " ", p)) print $1 + }' $PKGS/bdeps.txt + done + } | sort -u > $inf/c + cat <

Related packages

@@ -1089,61 +1126,31 @@ - - - -EOT - for i in $WANTED $BUILD_DEPENDS; do - echo "" - done - cat < - -
 $i
- -EOT - { - [ -s "$PKGS/packages.info" ] && - awk -F$'\t' -vp="$pkg" '{ - if ($1 == p) print $8 - }' "$PKGS/packages.info" - } | tr ' ' '\n' | sort -u | \ - while read i; do - [ -n "$i" ] && - echo "" - done - cat < - -
 $i
- EOT - { - for i in $(awk -F$'\t' -vp="$pkg" '{if($1==p)print $2}' $splitdb); do - - [ -s "$PKGS/packages.info" ] && - awk -F$'\t' -vp=" $i " '{ - if (index(" " $8 " ", p)) print $1 - }' "$PKGS/packages.info" - - [ -s "$PKGS/bdeps.txt" ] && - awk -F$'\t' -vp=" $i " '{ - if (index(" " $2 " ", p)) print $1 - }' $PKGS/bdeps.txt - done - } | sort -u | \ - while read i; do - echo "" - done + awk -vinf="$inf" -vbase="$base" ' + function linki(i) { + if (i) return sprintf(" %s", base, i, base, i, i); + } + BEGIN{ + do { + a = b = c = ""; + getline a < inf "/a"; + getline b < inf "/b"; + getline c < inf "/c"; + printf("", linki(a), linki(b), linki(c)); + } while ( a b c ) + }' cat < - -
 $i
%s %s %s 
EOT + # Clean + rm -r $inf + + + # Display button only for SliTaz web browser case "$HTTP_USER_AGENT" in diff -r 3de0a0c5d4c8 -r f4c12e700462 modules/deps --- a/modules/deps Mon Oct 30 18:41:22 2017 +0000 +++ b/modules/deps Wed Nov 01 02:49:40 2017 +0200 @@ -18,6 +18,22 @@ fl_mirrorz='/var/lib/tazpkg/files.list.lzma' # mirror files list fl_local='/home/slitaz/cache/files.list' # local files list + +# check "local files list" doesn't contain files from missing/removed packages + +action 'Updating %s...' "$(basename $fl_local)" + +splitdb="$CACHE/split.db" +sed 's|:.*||' $fl_local \ +| sort -u \ +| while read pkg; do + mainpkg=$(awk -F$'\t' -vpkg=" $pkg " '{ + if (index(" " $2 " ", pkg)) {print 1; exit} + }' $splitdb) + [ -n "$mainpkg" ] || sed -i "/^$pkg: /d" $fl_local +done +status + # recreate "combined list of all files" in the cases: # * if absent # * mirror files list has been updated @@ -154,6 +170,8 @@ s("polkit-pam-dev", "polkit-dev"); s("nspr", "palemoon"); # I doubt app may depend on Palemoon s("nss", "palemoon"); # + s("xfconf", "libxfconf"); s("xfconf-dev", "libxfconf-dev"); + s("exo", "libexo"); s("exo-dev", "libexo-dev"); # if called with "--incl": show all deps including glibc-base, # gcc-lib-base, glibc-dev and gcc; otherwise hide them