Opened 3 years ago

Closed 3 years ago

#681 closed System Defect (fixed)

pc-metapkgmanager broken by echos in get_mirror() in /usr/local/share/pcbsd/scripts/

Reported by: jdmulloy Owned by:
Priority: major Milestone:
Component: PBI System Version: 9.1-RC3
Keywords: Cc: trac-bugs@…


pc-metapkgmanager doesn't work because get_mirror() in /usr/local/share/pcbsd/scripts/ echo's extra messages like "Getting regional mirror..." and "Using mirror: $VAL" which ends up in $pkgAddMirror variable on line 75 in /usr/local/bin/pc-metapkgmanager. So instead of just the mirror URL $pkgAddMirror becomes the following.

Getting regional mirror...
Using mirror:

When it ought to just be "". I was able to work around this by commenting out all echos in get_mirror(). These echos should be removed or redirected to STDERR. It is likely that /usr/local/bin/pc-updatemanager is also affected.

This occurred on a fresh install of TrueOS 9.1-RC3 AMD64

Error message:

# /usr/local/bin/pc-metapkgmanager --pkgset warden --chroot /usr/jails/ add ownCloud
Pending Meta-Package changes: 1
ERROR: The pkg location Getting regional mirror...
Using mirror: does not exist!


72 add_metapkgs() {
73         if [ -z "$1" ] ; then exit_err "No meta-pkg specified!" ; fi
74         local pkgAddMirror="$2"
75         if [ -z "$pkgAddMirror" ] ; then pkgAddMirror=`use_default_mirror` ; fi
76         if [ ! -e "${MPDIR}/${1}/pkg-list" ] ; then exit_err "No such meta-pkg: $1" ; fi
77         _apkg=$1
79         MIRRORURL=`parse_url "$pkgAddMirror"`
81         # Figure out the type of location we are installing from
82         echo $MIRRORURL | grep -e '^http://' -e '^ftp://' >/dev/null 2>/dev/null
83         if [ "$?" = "0" ] ; then
84                 loc="NET"
85         else
86                 if [ ! -d "${MIRRORURL}" ] ; then exit_err "The pkg location $MIRRORURL does not exist!" ; fi
87                 loc="PATH"
88         fi

Change History (1)

comment:1 Changed 3 years ago by kris

  • Resolution set to fixed
  • Status changed from new to closed

This is already fixed for 9.1, and will be included in the next update.

Thanks for the heads up!

Note: See TracTickets for help on using tickets.