# HG changeset patch # User Aleksej Bobylev # Date 1421855606 -7200 # Node ID 1d6e23a2782f893d5ff26bb0b98e5c97ea1b7764 # Parent 5c8db125f207369b682a11a8b2e2ba194e4c8a7b Add and use icons from Faenza icon theme (new light look and feel); fix last recharge date (pay respect to timezone time offset); add few comments; stylize search toolbar; fix "up" command; admin: select mirror as standard way to select item from list; open external links in the new tab (or new window); and a ton of other small changes. diff -r 5c8db125f207 -r 1d6e23a2782f Makefile --- a/Makefile Mon Jan 19 18:51:32 2015 +0100 +++ b/Makefile Wed Jan 21 17:53:26 2015 +0200 @@ -73,6 +73,8 @@ cp -a tazpanel/pkgs $(DESTDIR)/var/www/tazpanel/menu.d install -m 0755 -d $(DESTDIR)/var/www/tazpanel/styles/default cp -a tazpanel/pkgs.css $(DESTDIR)/var/www/tazpanel/styles/default + install -m 0755 -d $(DESTDIR)/var/www/tazpanel/styles/default/images + cp -a tazpanel/icons/* $(DESTDIR)/var/www/tazpanel/styles/default/images # The i18n files install -m 0755 -d $(DESTDIR)$(PREFIX)/share/locale @@ -113,6 +115,7 @@ rm -f $(DESTDIR)/var/www/tazpanel/pkgs.cgi rm -f $(DESTDIR)/var/www/tazpanel/menu.d/pkgs + rm -rf $(DESTDIR)/var/www/tazpanel/styles/default/images/tp-*.png rm -rf $(DESTDIR)$(PREFIX)/share/locale/*/LC_MESSAGES/tazpkg.mo diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-add.png Binary file tazpanel/icons/tp-add.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-admin.png Binary file tazpanel/icons/tp-admin.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-block.png Binary file tazpanel/icons/tp-block.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-check.png Binary file tazpanel/icons/tp-check.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-default.png Binary file tazpanel/icons/tp-default.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-dl-dvd.png Binary file tazpanel/icons/tp-dl-dvd.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-link.png Binary file tazpanel/icons/tp-link.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-list.png Binary file tazpanel/icons/tp-list.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-new.png Binary file tazpanel/icons/tp-new.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-pkg-ins.png Binary file tazpanel/icons/tp-pkg-ins.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-pkg-rem.png Binary file tazpanel/icons/tp-pkg-rem.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-pkgi.png Binary file tazpanel/icons/tp-pkgi.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-pkgib.png Binary file tazpanel/icons/tp-pkgib.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-recharge.png Binary file tazpanel/icons/tp-recharge.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-remove.png Binary file tazpanel/icons/tp-remove.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-repack.png Binary file tazpanel/icons/tp-repack.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-save.png Binary file tazpanel/icons/tp-save.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-tag.png Binary file tazpanel/icons/tp-tag.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-unblock.png Binary file tazpanel/icons/tp-unblock.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-up.png Binary file tazpanel/icons/tp-up.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/icons/tp-web.png Binary file tazpanel/icons/tp-web.png has changed diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/pkgs --- a/tazpanel/pkgs Mon Jan 19 18:51:32 2015 +0100 +++ b/tazpanel/pkgs Wed Jan 21 17:53:26 2015 +0200 @@ -5,13 +5,13 @@
  • $(gettext 'Packages')
  • EOT diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/pkgs.cgi --- a/tazpanel/pkgs.cgi Mon Jan 19 18:51:32 2015 +0100 +++ b/tazpanel/pkgs.cgi Wed Jan 21 17:53:26 2015 +0200 @@ -91,68 +91,39 @@ } -# Parse mirrors list to be able to have an icon and remove link - -list_mirrors() { - while read line - do - cat << EOT -
  • - - - - - - - $line -
  • -EOT - done < $1 -} - - -# Parse repositories list to be able to have an icon and remove link - -list_repos() { - ls $PKGS_DB/undigest 2> /dev/null | while read repo ; do - cat < - $repo -EOT - done -} - - # Show button show_button() { - case $1 in - recharge) img='recharge'; label="$(_ 'Recharge list')" ;; - up) img='update'; label="$(_ 'Check upgrades')" ;; - list) img='tazpkg'; label="$(_ 'My packages')" ;; - tag=) img=''; label="$(_ 'Tags')" ;; - linkable) img='tazpkg'; label="$(_ 'Linkable packages')" ;; - admin) img='edit'; label="$(_ 'Administration')" ;; - *Install*nf*) img='tazpkg-installed'; label="$(_ 'Install (Non Free)')" ;; - *Install*) img='tazpkg-installed'; label="$(_ 'Install')" ;; - *Remove*) img='stop'; label="$(_ 'Remove')" ;; - *Link*) img='tazpkg'; label="$(_ 'Link')" ;; - *Block*) img='tazpkg'; label="$(_ 'Block')" ;; - *Unblock*) img='tazpkg'; label="$(_ 'Unblock')" ;; - *Repack*) img='tazpkg'; label="$(_ 'Repack')" ;; - *saveconf*) img='tazpkg'; label="$(_ 'Save configuration')" ;; - *listconf*) img='edit'; label="$(_ 'List configuration files')" ;; - *quickcheck*) img='recharge'; label="$(_ 'Quick check')" ;; - *fullcheck*) img='recharge'; label="$(_ 'Full check')" ;; - *clean*) img='stop'; label="$(_ 'Clean')" ;; - *setlink*) img='harddisk'; label="$(_ 'Set link')" ;; - *removelink*) img='stop'; label="$(_ 'Remove link')" ;; - esac - cat << EOT - EOT - + done } @@ -168,15 +139,13 @@ [ -z "$repo" ] && repo="$(GET repo)" [ -z "$repo" ] && repo="Any" cat << EOT - +
    + +
    EOT } @@ -306,23 +275,25 @@ # Print links to the pages pager() { - awk -F'"' -vpage="$page" -vnum_lines="$(wc -l < $1)" -vtext="$(_ 'Pages:') " -vurl="?list&page=" ' + PAGE_SIZE=${PAGE_SIZE:-100} + [ "$PAGE_SIZE" != "0" ] && \ + awk -F'"' -vpage="$page" -vsize="$PAGE_SIZE" -vnum_lines="$(wc -l < $1)" -vtext="$(_ 'Pages:') " -vurl="?list&page=" ' BEGIN{ - num_pages = int(num_lines / 100) + (num_lines % 100 != 0) + num_pages = int(num_lines / size) + (num_lines % size != 0) if (num_pages != 1) printf "

    %s", text } { if (num_pages == 1) exit - r = NR % 100 + r = NR % size if (r == 1) { - p = int(NR / 100) + 1 + p = int(NR / size) + 1 printf "%s ", $6, int(NR / 100) + printf "%s\">%s ", $6, int(NR / size) } END{ if (num_pages == 1) exit - if (r != 0) printf "%s\">%s", $6, int(NR / 100) + 1 + if (r != 0) printf "%s\">%s", $6, int(NR / size) + 1 print "

    " }' $1 } @@ -331,6 +302,8 @@ # Show packages list by category or tag show_list() { + PAGE_SIZE=${PAGE_SIZE:-100} + page=$(GET page); page=${page:-1} cached=$(mktemp) [ -n "$tag" ] && cat='' { @@ -362,12 +335,14 @@ if (! INS) { VER = $2; DSC = $4; WEB = $5 } } }' > $cached - page=$(GET page); [ -z "$page" ] && page=1 pager="$(pager $cached)" - list="$(tail -n+$((($page-1)*100+1)) $cached | head -n100)" - list1=${list:1:1} - if [ "$pager" != "

    $(_ 'Pages:')

    " ] && [ -n "$list1" ]; then + case $PAGE_SIZE in + 0) list="$(cat $cached)";; + *) list="$(tail -n+$((($page-1)*$PAGE_SIZE+1)) $cached | head -n$PAGE_SIZE)";; + esac + + if [ "$pager" != "

    $(_ 'Pages:')

    " ] && [ -n "${list:1:1}" ]; then cat << EOT $(header_repo_name $i) $pager @@ -387,7 +362,7 @@ if [ -n "$1" ]; then echo -n "$2" echo $1 | tr ' ' $'\n' | awk -vt="$3" '{ - printf "%s ", t, gensub(/\+/, "%2B", "g", $1), $1 + printf "%s   ", t, gensub(/\+/, "%2B", "g", $1), $1 }' echo "" fi @@ -416,7 +391,7 @@
    $(_ 'Selection:') $(show_button do=Link)
    -
    $(show_button recharge) $(show_button up)
    +
    $(show_button recharge up)
    EOT table_head @@ -457,8 +432,8 @@ $(_ 'Category') - $(_ 'Repository') - $(_ 'Installed') + $(_ 'Available packages') + $(_ 'Installed packages') @@ -512,7 +487,7 @@ $([ "$my" != 'my' ] && show_button do=Install) $(show_button do=Remove) -
    $(show_button recharge; show_button up)
    +
    $(show_button recharge up)
    EOT for i in $(repo_list ""); do @@ -538,9 +513,9 @@
    -
    $(_ 'Selection:'; show_button do=Install; show_button do=Remove) +
    $(_ 'Selection:'; show_button do=Install do=Remove) $(_ 'Toogle all')
    -
    $(show_button recharge; show_button up)
    +
    $(show_button recharge up)
    EOT if [ -n "$(GET files)" ]; then @@ -620,22 +595,20 @@
    -
    $(_ 'Selection:'; show_button do=Install; show_button do=Remove) - $(_ 'Toogle all')
    +
    $(_ 'Selection:'; show_button do=Install do=Remove) +
    $(show_button recharge)
    EOT + # Ask tazpkg to make "packages.up" file tazpkg up --check >/dev/null table_head - for pkg in $(cat packages.up); do - grep -hs "^$pkg |" $PKGS_DB/packages.desc $PKGS_DB/undigest/*/packages.desc | \ - parse_packages_desc + + for pkg in $(cat $PKGS_DB/packages.up); do + grep -hs "^$pkg " $PKGS_DB/packages.info $PKGS_DB/undigest/*/packages.info | parse_packages_info done - cat << EOT - - - -EOT + + echo "" ;; @@ -644,13 +617,17 @@ # Do an action on one or some packages # search_form; sidebar - LOADING_MSG="$(_ 'Please wait')"; loading_msg + loading_msg - opt="" + # Find the command cmd=$(echo $(GET do) | tr [:upper:] [:lower:]) + + # Find the packages list pkgs=$(echo $QUERY_STRING | awk 'BEGIN{RS="&";FS="="}{if($1=="pkg")print $2}') pkgs=$(httpd -d "$pkgs") - bpkgs="$pkgs" + + # Describe the command + bpkgs="$pkgs"; opt='' case $cmd in install) MSG="$(_ 'Installing: %s' "$bpkgs")"; opt=--forced; cmd=get-install ;; remove) MSG="$(_ 'Removing: %s' "$bpkgs")" ;; @@ -659,14 +636,15 @@ unblock) MSG="$(_ 'Unblocking: %s' "$bpkgs")" ;; repack) MSG="$(_ 'Repacking: %s' "$bpkgs")" ;; esac + cat << EOT

    TazPkg: $(GET do)

    - -
    $MSG
    +

    $MSG

    EOT + # Do the command for all asked packages for pkg in $pkgs; do echo '
    '
    -				echo $(_n 'y') | tazpkg $cmd $pkg $opt 2>/dev/null | filter_taztools_msgs
    +			echo $(_n 'y') | tazpkg $cmd $pkg $opt 2>/dev/null | filter_taztools_msgs
     			echo '
    ' done ;; @@ -679,11 +657,19 @@ search_form; sidebar LOADING_MSG=$(_ 'Getting package info...'); loading_msg - temp="${pkg#get-}" + cat << EOT +

    $(_ 'Package %s' $pkg)

    + +
    + +
    +EOT + + # Get receipt variables, show Install/Remove buttons if [ -d $INSTALLED/$pkg ]; then . $INSTALLED/$pkg/receipt files=$(wc -l < $INSTALLED/$pkg/files.list) - action="Remove" + show_button do=Remove else cd $PKGS_DB eval "$(awk -F$'\t' -vp=$pkg ' @@ -694,22 +680,14 @@ }' packages.info undigest/*/packages.info)" PACKED_SIZE=${SIZES% *} UNPACKED_SIZE=${SIZES#* } - - action="Install" - fi - cat << EOT -

    $(_ 'Package %s' $PACKAGE)

    - - - -
    -EOT - if [ "$temp" != "$pkg" -a "$action" == "Install" ]; then - show_button "do=Install&nf" - else - show_button "do=$action" + if [ "${pkg#get-}" != "$pkg" ]; then + show_button "do=Install&nf" + else + show_button do=Install + fi fi + # Show Block/Unblock, and Repack buttons if [ -d $INSTALLED/$pkg ]; then if grep -qs "^$pkg$" $PKGS_DB/blocked-packages.list; then show_button do=Unblock @@ -718,10 +696,14 @@ fi show_button do=Repack fi + + # Translate short description i18n_desc $pkg + + # Show info table cat << EOT
    - +
    @@ -729,7 +711,7 @@ $([ -n "$MAINTAINER" ] && echo "") $([ -n "$LICENSE" ] && echo "") - + $(show_info_links "$TAGS" "$(_ 'Tags')" 'tag') $(show_info_links "$DEPENDS" "$(_ 'Depends')" 'info') @@ -737,9 +719,16 @@
    $(_ 'Name')$PACKAGE
    $(_ 'Version')$VERSION
    $(_ 'Description')$SHORT_DESC
    $(_ 'Maintainer')$MAINTAINER
    $(_ 'License')$LICENSE
    $(_ 'Website')$WEB_SITE
    $(_ 'Website')$WEB_SITE
    $(_ 'Sizes')$PACKED_SIZE/$UNPACKED_SIZE
    EOT + + # Show description DESC="$(tazpkg desc $pkg)" [ -n "$DESC" ] && echo "
    $DESC
    " + # Show configuration files list + CONFIGS="$(tazpkg list-config $pkg | sed 's|\(.*\)|\1 \1|')" + [ -n "$CONFIGS" ] && echo "

    $(_ 'Configuration files')

    $(printf '%s\n' $CONFIGS)
    " + + # Show installed files list if [ -d $INSTALLED/$pkg ]; then cat << EOT

    $(_ 'Installed files: %s' $(wc -l < $INSTALLED/$pkg/files.list))

    @@ -763,157 +752,187 @@ # TazPkg configuration page # cmd=$(GET admin) + pager="$(GET pager)"; pager=${pager:-$PAGE_SIZE}; pager=${pager:-100} + mirror="$(GET mirror)"; mirror="${mirror%/}/" + repository="$PKGS_DB/undigest/$(GET repository)" + link="$(GET link)"; link=${link%/} search_form; sidebar + loading_msg case "$cmd" in clean) rm -rf $CACHE_DIR/* ;; add-mirror) - # Decode url - mirror=$(GET mirror) - case "$mirror" in - http://*|ftp://*) - echo "$mirror" >> $(GET file) ;; - esac ;; - rm-mirror=http://*|rm-mirror=ftp://*) - mirror=${cmd#rm-mirror=} - sed -i -e "s@$mirror@@" -e '/^$/d' $(GET file) ;; - select-mirror*) - release=$(cat /etc/slitaz-release) - mirror="$(GET mirror)packages/$release/" - tazpkg setup-mirror $mirror | log - ;; + echo "$mirror" >> $(GET file) ;; + rm-mirror) + sed -i "/^"$(echo $mirror | sed 's|/|\\/|g')"$/d" $(GET file) ;; + select-mirror) + tazpkg setup-mirror "${mirror}packages/$(cat /etc/slitaz-release)/" | log ;; add-repo) - # Decode url - mirror=$(GET mirror) - repository=$PKGS_DB/undigest/$(GET repository) - case "$mirror" in - http://*|ftp://*) - mkdir -p $repository - echo "$mirror" > $repository/mirror - echo "$mirror" > $repository/mirrors ;; - esac ;; - rm-repo=*) - repository=${cmd#rm-repo=} - rm -rf $PKGS_DB/undigest/$repository ;; + mkdir -p $repository + echo "$mirror" > $repository/mirror + echo "$mirror" > $repository/mirrors ;; + rm-repo) + rm -rf $repository ;; setlink) - [ -d "$(GET link)/$INSTALLED" ] && ln -fs $(GET link) $PKGS_DB/fslink ;; + [ -d "$link/$INSTALLED" ] && ln -fs $link $PKGS_DB/fslink ;; removelink) rm -f $PKGS_DB/fslink ;; + pager) + TP_CONF=/etc/slitaz/tazpanel.conf + if [ -z "$PAGE_SIZE" ]; then + echo -e "\n# Size of packages list page\nPAGE_SIZE=\"$pager\"" >> $TP_CONF + else + sed -i "s|PAGE_SIZE=.*|PAGE_SIZE=\"$pager\"|" $TP_CONF + fi ;; esac cat << EOT

    $(_ 'Administration')

    +

    $(_ 'TazPkg administration and settings')

    + -
    -

    $(_ 'TazPkg administration and settings')

    -
    - $(show_button action=saveconf) - $(show_button action=listconf) - $(show_button action=quickcheck) - $(show_button action=fullcheck) + $(show_button action=saveconf action=listconf action=quickcheck action=fullcheck)
    EOT case "$(GET action)" in - saveconf) - LOADING_MSG=$(_ 'Creating the package...'); loading_msg + saveconf) + LOADING_MSG=$(_ 'Creating the package...'); loading_msg + echo "
    "
    +				cd /tmp
    +				tazpkg repack-config | filter_taztools_msgs
    +				echo -n "$(_ 'Path:') "; ls /tmp/config-*.tazpkg
    +				echo "
    " ;; + listconf) + echo "

    $(_ 'Configuration files')

    " + echo "
      " + tazpkg list-config | while read file; do + if [ -e $file ]; then + echo "
    • $file
    • " + else + echo "
    • $file
    • " + fi + done + echo "
    " ;; + quickcheck) + LOADING_MSG=$(_ 'Checking packages consistency...'); loading_msg + echo "
    "
    +				tazpkg check
    +				echo "
    " ;; + fullcheck) + LOADING_MSG=$(_ 'Full packages check...'); loading_msg + echo "
    "
    +				tazpkg check --full
    +				echo "
    " ;; + dvdimage) + dev=$(POST dvdimage) + mkdir -p /mnt/packages 2> /dev/null + echo "
    "
    +				mount -t iso9660 -o loop,ro $dev /mnt/packages &&
    +				/mnt/packages/install.sh &&
    +				_ '%s is installed on /mnt/packages' $dev
    +				echo "
    " ;; + dvdusbkey) + mkdir -p /mnt/packages 2> /dev/null + for tag in "LABEL=\"packages-$version\" TYPE=\"iso9660\"" \ + "LABEL=\"sources-$version\" TYPE=\"iso9660\"" ; do + dev=$(blkid | grep "$tag" | cut -d: -f1) + [ -n "$dev" ] || continue echo "
    "
    -					cd $HOME
    -					tazpkg repack-config | filter_taztools_msgs
    -					echo -n "$(_ 'Path:') "; ls $HOME/config-*.tazpkg
    -					echo "
    " ;; - listconf) - echo "

    $(_ 'Configuration files')

    " - echo "
      " - tazpkg list-config | while read file; do - if [ -e $file ]; then - echo "
    • $file
    • " - else - echo "
    • $file
    • " - fi - done - echo "
    " - ;; - quickcheck) - LOADING_MSG=$(_ 'Checking packages consistency...'); loading_msg - echo "
    "
    -					tazpkg check
    -					echo "
    " ;; - fullcheck) - LOADING_MSG=$(_ 'Full packages check...'); loading_msg - echo "
    "
    -					tazpkg check --full
    -					echo "
    " ;; - esac + mount -t iso9660 -o ro $dev /mnt/packages && + /mnt/packages/install.sh && + _ '%s is installed on /mnt/packages' $dev + echo "" + break + done ;; + esac - cache_files=$(find $CACHE_DIR -name *.tazpkg | wc -l) + cache_files=$(find $CACHE_DIR -name '*.tazpkg' | wc -l) cache_size=$(du -sh $CACHE_DIR | cut -f1 | sed 's|\.0||') [ "$cache_files" == 0 ] && cache_size="0K" + mirror=$(cat $PKGS_DB/mirror) + default_mirror=${mirror%/packages/*} cat << EOT +

    $(_ 'Packages cache')

    -
    -
    -

    $(_ 'Packages in the cache: %s (%s)' $cache_files $cache_size) - $(show_button admin=clean) - -

    -
    -
    +
    +

    $(_ 'Packages in the cache: %s (%s)' $cache_files $cache_size) + $(show_button admin=clean) +

    +
    +
    -

    $(_ 'Default mirror')

    -
    $(cat $PKGS_DB/mirror)
    - +

    $(_ 'Current mirror list')

    EOT + + # List mirrors + version=$(cat /etc/slitaz-release) for i in $PKGS_DB/mirrors $PKGS_DB/undigest/*/mirrors; do [ -s $i ] || continue - echo '
    ' if [ $i != $PKGS_DB/mirrors ]; then - Repo_Name="$(repo_name $(dirname $i))" - echo "

    $(_ 'Repository: %s' $Repo_Name)

    " + echo "

    $(_ 'Repository: %s' "$(repo_name $(dirname $i))")

    " fi - echo "
      " - list_mirrors $i - echo "
    " cat << EOT -
    +
    + + +EOT + while read line; do + cat << EOT + + + + + +EOT + done < $i + cat << EOT +
    + + +
    +
    +

    - - - + + $(show_button admin=add-mirror)

    EOT done + echo "
    " echo "

    $(_ 'Private repositories')

    " - [ -n "$(ls $PKGS_DB/undigest 2> /dev/null)" ] && cat << EOT -
    -
      - $(list_repos) -
    -
    + if [ -n "$(ls $PKGS_DB/undigest 2> /dev/null)" ]; then + echo '' + ls $PKGS_DB/undigest 2> /dev/null | while read repo ; do + cat < EOT + done + echo '
    $repo
    ' + fi + cat << EOT
    -

    - - $(_ 'Name') - $(_ 'mirror') - - -

    +

    $(_ 'Name') + $(_ 'URL:') + $(show_button admin=add-repo)

    +
    + +

    $(_ 'Link to another SliTaz installation')

    $(_ "This link points to the root of another SliTaz installation. \ @@ -921,15 +940,14 @@

    - - $(show_button admin=setlink) - $(show_button admin=removelink) + + $(show_button admin=setlink admin=removelink)

    -EOT - version=$(cat /etc/slitaz-release) - cat << EOT +
    + +

    $(_ 'SliTaz packages DVD')

    $(_ "A bootable DVD image of all available packages for the %s version is \ @@ -937,45 +955,30 @@ without an internet connection. This image can be installed on a DVD or a USB \ key." $version)

    -
    -
    -

    - - $(_ 'Download DVD image') - - $(_ 'Install from DVD/USB key') -

    -
    - $(_ 'Install from ISO image:') - -
    -
    + + +
    +
    + $(_ 'Install from ISO image:') +
    + +
    + + +
    +

    $(_ 'Packages list')

    + +

    $(_ 'Long list of packages is paginated. Here you can set the page size (default: 100, turning off the pager: 0).')

    +
    + + + +
    +
    EOT - if [ "$(GET action)" == "dvdimage" ]; then - dev=$(POST dvdimage) - mkdir -p /mnt/packages 2> /dev/null - echo "
    "
    -			mount -t iso9660 -o loop,ro $dev /mnt/packages &&
    -			/mnt/packages/install.sh &&
    -			_ '%s is installed on /mnt/packages' $dev
    -			echo "
    " - fi - if [ "$(GET action)" == "dvdusbkey" ]; then - mkdir -p /mnt/packages 2> /dev/null - for tag in "LABEL=\"packages-$version\" TYPE=\"iso9660\"" \ - "LABEL=\"sources-$version\" TYPE=\"iso9660\"" ; do - dev=$(blkid | grep "$tag" | cut -d: -f1) - [ -n "$dev" ] || continue - echo "
    "
    -				mount -t iso9660 -o ro $dev /mnt/packages &&
    -				/mnt/packages/install.sh &&
    -				_ '%s is installed on /mnt/packages' $dev
    -				echo "
    " - break - done - fi ;; @@ -987,79 +990,71 @@ pkg=$(GET license) case $pkg in - /*) - [ -e $pkg ] && { + /*) [ -e $pkg ] && { echo "

    ${pkg#/usr/share/licenses/}

    " case $pkg in - *.htm*) - cat $pkg ;; - *) - echo "
    "
    +					*.htm*) cat $pkg ;;
    +					*)	echo "
    "
     						cat $pkg | htmlize | sed 's|\([hf]t*t*ps*://[a-zA-Z0-9./_-]*[a-zA-Z0-9/_-]\)|\1|'
     						echo "
    " ;; esac } ;; - *) - echo "

    $(_ 'Licenses for package %s' $pkg)

    " - ONLINE=''; OFFLINE='' - + *) echo "

    $(_ 'Licenses for package %s' $pkg)

    " + OFFLINE='' if [ -e "$PKGS_DB/installed/$pkg" ]; then - for license in $(. $PKGS_DB/installed/$pkg/receipt; echo "$LICENSE"); do - OSL=''; GNU=''; USR=''; LIC='' - case $license in - Apache) OSL='Apache-2.0'; URL='http://www.apache.org/licenses/' ;; - Artistic) OSL='Artistic-2.0' ;; - BSD) OSL='BSD-2-Clause' ;; - BSD3) OSL='BSD-3-Clause' ;; - - CC-BY-SA*|CC-SA*) CCO='by-sa/4.0/' ;; - CC-BY-ND*) CCO='by-nd/4.0/' ;; - CC-BY-NC-SA*) CCO='by-nc-sa/4.0/' ;; - CC-BY-NC-ND*) CCO='by-nc-nd/4.0/' ;; - CC-BY-NC*) CCO='by-nc/4.0/' ;; - CC-BY*) CCO='by/4.0/' ;; - - cc-pd) URL='http://creativecommons.org/publicdomain/' ;; - CCPL) ;; - CDDL*) OSL='CDDL-1.0' ;; - CECILL*) OSL='CECILL-2.1' ;; - Eclipse|EPL*) OSL='EPL-1.0' ;; - FDL) GNU='fdl' ;; - GPL) GNU='gpl'; OSL='gpl-license'; LIC='gpl.txt' ;; - GPL2) GNU='old-licenses/gpl-2.0'; OSL='GPL-2.0' ;; - GPL3) GNU='gpl'; OSL='GPL-3.0'; LIC='gpl.txt' ;; - ISC) OSL='ISC' ;; - LGPL) GNU='lgpl'; OSL='lgpl-license' ;; - LGPL2) GNU='old-licenses/lgpl-2.0' ;; - LGPL2.1) GNU='old-licenses/lgpl-2.1'; OSL='LGPL-2.1'; LIC='lgpl.txt' ;; - LGPL3) GNU='lgpl'; OSL='LGPL-3.0' ;; - LPPL*) OSL='LPPL-1.3c' ;; - MIT) OSL='MIT'; LIC='mit.txt' ;; - MPL) OSL='MPL-2.0'; LIC='mozilla.txt' ;; - MPL2) OSL='MPL-2.0' ;; - FL) OSL='Fair' ;; # ? - PSL) ;; - PublicDomain) ;; - QPL*) OSL='QPL-1.0' ;; - SIL_OFL*) OSL='OFL-1.1' ;; - zlib/libpng) OSL='Zlib' ;; - esac - - [ -n "$OSL" ] && ONLINE="$ONLINE
  • $(_ '%s license on %s website' "$OSL" "OSL")
  • \n" - [ -n "$GNU" ] && ONLINE="$ONLINE
  • $(_ '%s license on %s website' "${GNU#*/}" "GNU")
  • \n" - [ -n "$CCO" ] && ONLINE="$ONLINE
  • $(_ '%s license on %s website' "${CCO%%/*}" "Creative Commons")
  • \n" - [ -n "$URL" ] && ONLINE="$ONLINE
  • $URL
  • \n" - [ -n "$LIC" ] && OFFLINE="$OFFLINE
  • licenses/$LIC
  • \n" - done - for lic in $(grep /usr/share/licenses/ $PKGS_DB/installed/$pkg/files.list); do OFFLINE="$OFFLINE
  • licenses/${lic#/usr/share/licenses/}
  • \n" done - fi - [ -n "$ONLINE" ] && echo -e "

    $(_ 'Read online:')

    \n
      \n$ONLINE
    \n" - [ -n "$OFFLINE" ] && echo -e "

    $(_ 'Read local:')

    \n
      \n$OFFLINE
    \n" - ;; + echo "\ +Apache|Apache-2.0||||http://www.apache.org/licenses/#Artistic|Artistic-2.0||||#\ +BSD|BSD-2-Clause||||#BSD3|BSD-3-Clause||||#CC-BY-SA||by-sa/4.0/|||#\ +CC-SA||by-sa/4.0/|||#CC-BY-ND||by-nd/4.0/|||#CC-BY-NC-SA||by-nc-sa/4.0/|||#\ +CC-BY-NC-ND||by-nc-nd/4.0/|||#CC-BY-NC||by-nc/4.0/|||#CC-BY||by/4.0/|||#\ +cc-pd|||||http://creativecommons.org/publicdomain/#CDDL|CDDL-1.0||||#\ +CECILL|CECILL-2.1||||#Eclipse|EPL-1.0||||#EPL|EPL-1.0||||#FDL|||fdl||#\ +GPL|gpl-license||gpl|gpl.txt|#GPL2|GPL-2.0||old-licenses/gpl-2.0||#\ +GPL3|GPL-3.0||gpl|gpl.txt|#ISC|ISC||||#LGPL|lgpl-license||lgpl||#\ +LGPL2|||old-licenses/lgpl-2.0||#\ +LGPL2.1|LGPL-2.1||old-licenses/lgpl-2.1|lgpl.txt|#LGPL3|LGPL-3.0||lgpl||#\ +LPPL|LPPL-1.3c||||#MIT|MIT|||mit.txt|#MPL|MPL-2.0|||mozilla.txt|#\ +MPL2|MPL-2.0||||#PublicDomain|||||http://creativecommons.org/publicdomain/#\ +QPL|QPL-1.0||||#SIL_OFL|OFL-1.1||||#OFL|OFL-1.1||||#zlib/libpng|Zlib||||" | \ +awk -vlicenses="$(. $PKGS_DB/installed/$pkg/receipt; echo "$LICENSE")" \ + -vtext="$(_ '%s license on %s website' %s %s)" \ + -vro="$(_ 'Read online:')" -vrl="$(_ 'Read local:')" \ + -vofflic="$OFFLINE" ' +BEGIN{ FS="|"; RS="#"; split(licenses, lic, " "); if (offlic) OFFLINE[0]=offlic } +function link1(u, l, ll, w) { + return sprintf("\t
  • " text "
  • ", u, l, "" ll "", w) } +function link2(u, l, ll) { + return sprintf("\t
  • %s
  • ", u, l, ll) } +function link_osl(n) { + return link1("http://opensource.org/licenses/", n, n, "OSL") } +function link_cc(n) { + split(n, ll, "/") + return link1("http://creativecommons.org/licenses/", n, ll[1], "Creative Commons") } +function link_gnu(n) { + split(n, ll, "/") + return link1("https://www.gnu.org/licenses/", n ".html", ll[2] ? ll[2] : ll[1], "GNU") } +function link_loc(n) { + return link2("?license=/usr/share/licenses/", n, "licenses/" n "") } +function link_url(n) { + return link2(n, "", n) } +{ + if ($1 == lic[1] || $1 == lic[2] || $1 == lic[3] || $1 == lic[4]) { + if ($2) ONLINE[$2]=link_osl($2) + if ($3) ONLINE[$3]=link_cc($3) + if ($4) ONLINE[$4]=link_gnu($4) + if ($5) OFFLINE[$5]=link_loc($5) + if ($6) OFFLINE[$6]=link_url($6) + } +} +END{ + if (length(ONLINE) > 0) { print "

    " ro "

    \n
      "; for (o in ONLINE) print ONLINE[o]; print "
    " } + if (length(OFFLINE) > 0) { print "

    " rl "

    \n
      "; for (o in OFFLINE) print OFFLINE[o]; print "
    " } +}' + fi ;; esac ;; @@ -1076,11 +1071,14 @@ Any) title="$(_ 'List of tags in all repositories')" ;; *) title="$(_ 'List of tags in repository "%s"' "$brepo")" ;; esac - echo "

    $title

    " + echo "

    $title

    " to_read="" for i in $(repo_list ""); do - if [ ! -e $i/packages.info ] && [ $repo == 'Public' ]; then - list=installed; else list=packages; fi + if [ ! -e $i/packages.info ]; then + list=installed + else + list=packages + fi to_read="$to_read $i/$list.info" done TAGS="$(awk -F$'\t' '{if($6){print $6}}' $to_read | tr ' ' $'\n' | sort | uniq -c)" @@ -1105,9 +1103,10 @@

    - $(_ 'Selection:') - - + $(_ 'Selection:'; show_button do=Install do=Remove) +
    +
    + $(show_button tags)
    EOT @@ -1150,8 +1149,6 @@ # search_form; sidebar - [ -n "$(GET block)" ] && tazpkg block $(GET block) - [ -n "$(GET unblock)" ] && tazpkg unblock $(GET unblock) cat << EOT

    $(_ 'Summary')

    @@ -1160,19 +1157,23 @@ EOT fslink=$(readlink $PKGS_DB/fslink) [ -n "$fslink" -a -d "$fslink/$INSTALLED" ] && show_button linkable - show_button recharge - show_button up - show_button admin + show_button recharge up admin cat << EOT
    +
    +

    $(_ 'Summary')

    - - + - + - + - + -
    $(_ 'Last recharge:')$(list=$PKGS_DB/packages.info + $(list=$PKGS_DB/ID if [ -e $list ]; then - $((days=$(date +%s)/86400-$(date -r $list +%s)/86400)) + ohhmm="$(date +%z)" # '+0200' for EET (+2 hours) + offset=$(( 60 * (60 * ${ohhmm:0:3} + ${ohhmm:3:2}) )) # in the seconds + daynow=$(( ($(date +%s) + $offset) / 86400 )) + dayupd=$(( ($(date -r $list +%s) + $offset) / 86400 )) + days=$(( $daynow - $dayupd )) time=$(date -r $list +%R) ago="$(_p '%d day ago.' '%d days ago.' $days $days)" case $days in @@ -1190,31 +1191,38 @@ fi)
    $(_ 'Installed packages:')$(cat $PKGS_DB/installed.info | wc -l) - $(_ '(show)')
    + $(cat $PKGS_DB/installed.info | wc -l) +
    $(_ 'Mirrored packages:')$(cat $PKGS_DB/packages.list | wc -l)
    + $(cat $PKGS_DB/packages.list | wc -l) +
    $(_ 'Upgradeable packages:')$(cat $PKGS_DB/packages.up | wc -l) - $(_ '(show)')
    + $(cat $PKGS_DB/packages.up | wc -l) +
    $(_ 'Installed files:') $(cat $INSTALLED/*/files.list | wc -l)
    $(_ 'Blocked packages:')$(cat $PKGS_DB/blocked-packages.list | wc -l) - $(_ '(show)')
    + $(cat $PKGS_DB/blocked-packages.list | wc -l) +
    +
    +

    $(_ 'Latest log entries')

    -$(tail -n 5 $LOG | fgrep "-" | awk '{print $1, $2, $3, $4, $5, $6, $7}')
    +$(tail -n 5 $LOG | fgrep "-" | awk '{print $1, $2, $3, $4, $5, "" $6 "", $7}')
     $(_ 'more...')
     
    +
    EOT ;; esac diff -r 5c8db125f207 -r 1d6e23a2782f tazpanel/pkgs.css --- a/tazpanel/pkgs.css Mon Jan 19 18:51:32 2015 +0100 +++ b/tazpanel/pkgs.css Wed Jan 21 17:53:26 2015 +0200 @@ -1,51 +1,61 @@ +body { -webkit-appearance: window; } -/* Sidebar menus */ +/** + * Sidebar menus + */ -#content-sidebar { margin: 20px 144px 20px 20px; } +#content-sidebar { + margin-right: 138px; /* sidebar width */ + padding: 10px; +} -#sidebar { - position: fixed; - top: 60px; - right: 0; - padding: 5px 5px 0 0; - width: 132px; - height: 100%; +#sidebar { /* full width = width(132) + h-padding(5) + border(1) = 138px */ + position: fixed; top: 60px; bottom: 0; right: 0; + width: 132px; padding: 5px 5px 0 0; border-left: 1pt solid #AAA; background-color: #EEE; + overflow-y: auto; overflow-x: hidden; /* for tiny screens */ } #sidebar h4 { - margin: 0; + margin: 0; padding: 0; font-size: 16px; color: #222; text-align: center; } +/* hack to remove unwanted scrollbar from multiline selector */ .select_wrap { display: inline-block; vertical-align: top; overflow: hidden; } - .select_wrap select { padding: 5px; margin:-5px -20px -5px -5px; - width: 162px; + width: 162px; /* sidebar:(138px) + this h-margin:(20px+5px) */ font-size: small; } +/* zebra on selector */ select option:nth-child(even) { background-color: rgba(0,0,0,0.05); } +option:checked { color: red; font-weight: bold; background-color: orange; } + +/* sidebar links */ #sidebar a { display: inline-block; padding: 0 0 0 0.5em; margin: 0; - color: #666; + color: #000; font-size: small; width: 100%; } +/** + * List of packages + */ /* links classes: * pkg - package (not installed); @@ -56,78 +66,86 @@ * you can style links using icons and/or color */ -a.pkg { - background: url(images/tazpkg.png) no-repeat left; } -a.pkgi, a.pkgib { - background: url(images/tazpkg-installed.png) no-repeat left; } -/* -a.pkgi { - color: green; } -*/ -a.pkgib { - color: red; } +a.pkg { background: url(images/tp-new.png) no-repeat left; } +a.pkgi { background: url(images/tp-pkgi.png) no-repeat left; } +a.pkgib { background: url(images/tp-pkgib.png) no-repeat left; color: red; } a.w, .pkglist td:nth-child(4) a { - background: url(images/browser.png) no-repeat left; } + background: url(images/tp-web.png) no-repeat left; } a.pkg, a.pkgi, a.pkgib, a.w, .pkglist td:nth-child(4) a { margin: 0; padding: 0 0 0 17px; min-height: 16px; min-width: 16px; - display: inline-block; } + display: inline-block; +} +/* not break the line */ +.pkglist td:nth-child(1), +.filelist td:nth-child(1) { white-space: nowrap; } -.pkglist td:nth-child(1), .filelist td:nth-child(1) { - white-space: nowrap; - } +.pkglist td:nth-child(1) a, +.filelist td:nth-child(1) a { max-width: 12em; } +.pkglist td:nth-child(2) { max-width: 7em; } +.filelist td:nth-child(2) { max-width: 30em; } -.pkglist td:nth-child(1) a, .filelist td:nth-child(1) a { - max-width: 12em; - } - -.pkglist td:nth-child(2) { - max-width: 7em; - } - -.pkglist td:nth-child(1) a, .pkglist td:nth-child(2), -.filelist td:nth-child(1) a, .filelist td:nth-child(2) { +/* ellipsize content of 1st and 2nd columns */ +.pkglist td:nth-child(1) a, +.pkglist td:nth-child(2), +.filelist td:nth-child(1) a, +.filelist td:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; -o-text-overflow: ellipsis; - } +} -.filelist td:nth-child(2) { - max-width: 30em; - } .pkglist tr { border-bottom: 1pt solid #DDD; } -.pkglist, .pkglist thead, .summary { border: 1.5pt solid #BBB!important; } +.pkglist, .pkglist thead { border: 1.5pt solid #BBB!important; } -.summary td:nth-child(1) { - width:10%; white-space: nowrap; /* to have minimal width of first column */ - } -#actions { overflow: auto; } + +/** + * Summary table + */ + +/* to have minimal width of first column */ +.summary td:nth-child(1) { width:10%; white-space: nowrap; } + +/* light blue links on summary table */ +.summary a { color: #248; } + + + +/** + * Pager + */ a.pages { + display: inline-block; padding: 0.5ex; margin: 0.5ex 0; border: 1px solid #AAA; width: 3ex; - display: inline-block; text-align: center; - } +} a.pages:hover { border: 1px solid #F94; background: #F94; color: black; - } +} a.pages.current, a.pages.current:hover { font-weight: bold; border: 1px solid #07F; background: #07F; color: #eee; - } +} + + +/* + * Tags + */ +#tags { text-align: center; } a.tag1 { font-size: 0.9em; color: #678; } a.tag2 { font-size: 1.0em; color: #444; } a.tag3 { font-size: 1.1em; color: #16A; } @@ -136,22 +154,86 @@ a.tag6 { font-size: 1.8em; color: #862; } a.tag7 { font-size: 2.1em; color: #FA0; } a.tag8 { font-size: 2.4em; color: #F00; } -a.tag1, a.tag2, a.tag3, a.tag4, a.tag5, a.tag6, a.tag7, a.tag8 { +#tags a { display: inline-block; white-space: nowrap; vertical-align: middle; padding: 0.2em 0.5em; } -a.tag1:hover, a.tag2:hover, a.tag3:hover, a.tag4:hover, a.tag5:hover, a.tag6:hover, a.tag7:hover, a.tag8:hover { - outline: 1.5pt solid #FC8; } +#tags a:hover { + outline: 1.5pt solid #FC8; +} + + +/* + * Action buttons panel + */ #actions { - background-color: #EEE; - margin: 0; padding: 0 0.5ex!important; - border: 1pt solid #DDD; - border-radius: 0.5ex; + background-color: rgba(229,229,229,0.5); + margin: 0; padding: 0.2rem 0.3rem!important; + border: 1pt solid #CCC; + border-radius: 0.3rem; + overflow: auto; /* provide break after floated objects */ } .button img { padding: 0 4px 0 0; } + +/* "articles" are used in the admin page */ +article, fieldset { + display: block; + border: 1pt solid rgba(128, 128, 128, 0.5); + border-radius: 0.3rem; + padding: 0.3rem 0.3rem 0 0.3rem; + margin: 0.5rem 0; + background-color: rgba(128, 128, 128, 0.2); +} +article h3 { + padding: 0.3rem; margin: -0.3rem; + border-bottom: 1pt solid rgba(128, 128, 128, 0.5); + border-radius: 0.3rem 0.3rem 0 0; + background-color: rgba(128, 128, 128, 0.3); +} +legend { + font-weight: bold; +} +/* Disable too much borders */ +article pre, article table { border: none } + + +/* + * Search block + */ +.search { + position: fixed; right: 10px; top: 8px; + height: 25px; + border-radius: 4px; + background-color: #FFF; + padding: 0; margin: 0; +} +.search input { + height: 100%; + margin: 0; padding: 4px; + /*outline: none;*/ +} +.search input:nth-child(1) { + width: 200px; + border: none; + -webkit-appearance: none; /* remove borders for input type="search" */ +} +.search input:nth-child(2), .search input:nth-child(3) { -webkit-appearance: push-button; } + +.search input:nth-child(1) { + border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + -webkit-border-radius: 4px 0 0 4px; +} +.search input:nth-child(2) { border-radius: 0; -moz-border-radius: 0; -webkit-border-radius: 0; } +.search input:nth-child(3) { + border-top-left-radius: 0; border-bottom-left-radius: 0; + -moz-border-top-left-radius: 0; -moz-border-bottom-left-radius: 0; + -webkit-border-top-left-radius: 0; -webkit-border-bottom-left-radius: 0; +} + diff -r 5c8db125f207 -r 1d6e23a2782f tazpkg --- a/tazpkg Mon Jan 19 18:51:32 2015 +0100 +++ b/tazpkg Wed Jan 21 17:53:26 2015 +0200 @@ -2108,53 +2108,61 @@ if [ ! -f "receipt" ]; then _ 'Receipt is missing. Please read the documentation.' exit 0 - else - title 'Packing package "%s"' $PACKAGE - # Create files.list with redirecting find outpout. - action "Creating the list of files..." - cd fs - find . -type f -print > ../files.list - find . -type l -print >> ../files.list - cd .. && sed -i s/'^.'/''/ files.list - status - action 'Creating %s of files...' $CHECKSUM - while read file; do - [ -L "fs$file" ] && continue - [ -f "fs$file" ] || continue - case "$file" in - /lib/modules/*/modules.*|*.pyc) continue;; - esac - $CHECKSUM "fs$file" | sed 's/ fs/ /' - done < files.list > $CHECKSUM - status - UNPACKED_SIZE=$(du -chs fs receipt files.list $CHECKSUM \ - description.txt 2> /dev/null | awk \ - '{ sz=$1 } END { print sz }') - # Build cpio archives. - action "Compressing the FS..." - find fs | cpio -o -H newc --quiet | lzma e fs.cpio.lzma -si - rm -rf fs - status - PACKED_SIZE=$(du -chs fs.cpio.lzma receipt files.list \ - $CHECKSUM description.txt 2> /dev/null | awk \ - '{ sz=$1 } END { print sz }') - action "Updating receipt sizes..." - sed -i s/^PACKED_SIZE.*$// receipt - sed -i s/^UNPACKED_SIZE.*$// receipt - sed -i "s/^PACKAGE=/PACKED_SIZE=\"$PACKED_SIZE\"\nUNPACKED_SIZE=\"$UNPACKED_SIZE\"\nPACKAGE=/" receipt - status - action "Creating full cpio archive..." - find . -print | cpio -o -H newc --quiet > ../$PACKAGE.tazpkg - status - action "Restoring original package tree..." - unlzma -c fs.cpio.lzma | cpio -idm --quiet - status - rm fs.cpio.lzma && cd .. - footer "$(_ 'Package "%s" compressed successfully.' $PACKAGE)" - pkg_size=$(du -sh $PACKAGE.tazpkg) - _ 'Size: %s' $pkg_size - newline - fi ;; + fi + + title 'Packing package "%s"' $PACKAGE + # Create files.list with redirecting find outpout. + + action "Creating the list of files..." + cd fs + find . -type f -print > ../files.list + find . -type l -print >> ../files.list + cd .. && sed -i s/'^.'/''/ files.list + status + + action 'Creating %s of files...' $CHECKSUM + while read file; do + [ -L "fs$file" ] && continue + [ -f "fs$file" ] || continue + case "$file" in + /lib/modules/*/modules.*|*.pyc) continue;; + esac + $CHECKSUM "fs$file" | sed 's/ fs/ /' + done < files.list > $CHECKSUM + status + + UNPACKED_SIZE=$(du -chs fs receipt files.list $CHECKSUM \ + description.txt 2> /dev/null | awk \ + '{ sz=$1 } END { print sz }') + # Build cpio archives. + + action "Compressing the FS..." + find fs | cpio -o -H newc --quiet | lzma e fs.cpio.lzma -si + rm -rf fs + status + + PACKED_SIZE=$(du -chs fs.cpio.lzma receipt files.list \ + $CHECKSUM description.txt 2> /dev/null | awk \ + '{ sz=$1 } END { print sz }') + + action "Updating receipt sizes..." + sed -i s/^PACKED_SIZE.*$// receipt + sed -i s/^UNPACKED_SIZE.*$// receipt + sed -i "s/^PACKAGE=/PACKED_SIZE=\"$PACKED_SIZE\"\nUNPACKED_SIZE=\"$UNPACKED_SIZE\"\nPACKAGE=/" receipt + status + + action "Creating full cpio archive..." + find . -print | cpio -o -H newc --quiet > ../$PACKAGE.tazpkg + status + + action "Restoring original package tree..." + unlzma -c fs.cpio.lzma | cpio -idm --quiet + status + + rm fs.cpio.lzma && cd .. + footer "$(_ 'Package "%s" compressed successfully.' $PACKAGE)" + _ 'Size: %s' "$(ls -lh $PACKAGE.tazpkg | awk '{print $5}')" + ;; recharge) @@ -2197,7 +2205,7 @@ base_path="$(basename $path)" repository_name="$(_n 'Undigest %s' $base_path)" fi - _ 'Repository "%s" is up to date.' $repository_name + _ 'Repository "%s" is up to date.' "$repository_name" rm ID.bak continue fi @@ -2299,7 +2307,7 @@ emsg "$(_ 'Package') $(_ 'Version') $(_ 'Status')<->" cd $INSTALLED - newline > $UP_LIST + echo -n > $UP_LIST blocked_count=0 installed_sum=$PKGS_DB/installed.$SUM