diff options
author | dougb <dougb@FreeBSD.org> | 2010-05-18 10:11:05 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2010-05-18 10:11:05 +0800 |
commit | 549e6b269fcc6c67ee9196f8831818cd2fe542d0 (patch) | |
tree | ee9385a7a0b7d89767ab1a40b73e15bf5af9519e /ports-mgmt/portmaster | |
parent | 355cc593570723c5fcc8e5e5ededb77770ed4935 (diff) | |
download | freebsd-ports-gnome-549e6b269fcc6c67ee9196f8831818cd2fe542d0.tar.gz freebsd-ports-gnome-549e6b269fcc6c67ee9196f8831818cd2fe542d0.tar.zst freebsd-ports-gnome-549e6b269fcc6c67ee9196f8831818cd2fe542d0.zip |
Minor Fixes And Optimizations
=============================
1. In iport_from_origin() if we don't find a match (which is normal for
ports that are not yet installed) then return immediately.
2. A little more white space after the user input for --check-port-dbdir
3. In check_for_updates() if a port has moved we should also check for
an +IGNOREME file before forcing the update.
4. For distfile fetching:
a. Limit the scope of some of the variables
b. If a distfile has a / in the file name creation of the flag file
for background fetching will fail, so swap that for a _ instead.
Diffstat (limited to 'ports-mgmt/portmaster')
-rw-r--r-- | ports-mgmt/portmaster/files/portmaster.sh.in | 25 |
1 files changed, 19 insertions, 6 deletions
diff --git a/ports-mgmt/portmaster/files/portmaster.sh.in b/ports-mgmt/portmaster/files/portmaster.sh.in index c6a0c59576b5..e1e4a38b97dd 100644 --- a/ports-mgmt/portmaster/files/portmaster.sh.in +++ b/ports-mgmt/portmaster/files/portmaster.sh.in @@ -601,7 +601,7 @@ unset var newopts iport_from_origin () { local dir - dir=`grep -l "@comment ORIGIN:${1}$" $pdb/*/+CONTENTS` + dir=`grep -l "@comment ORIGIN:${1}$" $pdb/*/+CONTENTS` || return 1 # It should not happen that more than one port meets this # requirement, but it can if the pkg data is corrupted. @@ -1060,6 +1060,7 @@ if [ -n "$CHECK_PORT_DBDIR" ]; then case "$answer" in [yY]) pm_rm_s -rf $dir ;; esac + echo '' ;; esac done @@ -1284,8 +1285,17 @@ check_for_updates () { elif [ -z "$do_update" -a -z "$skip" ]; then find_moved_port $origin $iport $nf - # If the port has moved, we have to update it, otherwise ignore - [ -n "$moved_npd" ] && do_update=do_update6 + # If the port has moved and no +IGNOREME, we have to update it + if [ -n "$moved_npd" ]; then + if [ ! -e "$pdb/$iport/+IGNOREME" ]; then + do_update=do_update_moved + else + echo " ===>>> Continuing due to $pdb/$iport/+IGNOREME" + echo '' + CUR_DEPS="${CUR_DEPS}${iport}:${origin}:" + return 0 + fi + fi fi if [ -z "$do_update" -a -n "$port_ver" ]; then @@ -2810,6 +2820,8 @@ check_state || { # Do these things first time through, with or without 'make config' if [ -z "$PM_BUILDING" -a -z "$SHOW_WORK" -a -z "$NO_ACTION" ]; then dofetch () { + local fetchlog allfiles + echo "===>>> Launching 'make checksum' for $portdir in background" fetchlog=`pm_mktemp fetchlog-${portdir#*/}` (pm_make -DBATCH checksum >> $fetchlog 2>&1 && { @@ -2835,8 +2847,8 @@ dofetch () { # Make sure that different ports using the same distfiles # do not clobber each other's fetchs for file in $distfiles; do - if ! ls ${TMPDIR}/f-${PM_PARENT_PID}-${file}-* >/dev/null 2>&1 - then + case "$file" in */*) file=`echo $file | sed s#/#_#g` ;; esac + if ! ls ${TMPDIR}/f-${PM_PARENT_PID}-${file}-* >/dev/null 2>&1; then pm_mktemp ${file}-${portdir#*/} >/dev/null else DONT_FETCH=dont_fetch @@ -2846,7 +2858,7 @@ dofetch () { [ -z "$DONT_FETCH" -a -n "$distfiles" ] && dofetch fi - unset master_sites + unset master_sites distfiles file DONT_FETCH if [ -z "$FETCH_ONLY" -a ! "$PM_PACKAGES" = only ]; then TESTINT=`grep -l ^IS_INTERACTIVE Makefile` @@ -2861,6 +2873,7 @@ dofetch () { echo -n "===>>> Press the [Enter] or [Return] key to continue " read DISCARD echo '' + unset TESTINT DISCARD fi fi fi # [ -z "$PM_INDEX_ONLY" ] |