WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Minor bug in /usr/bin/ondemand in V2.9rc5  (Read 2069 times)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Minor bug in /usr/bin/ondemand in V2.9rc5
« on: February 28, 2010, 12:39:26 AM »
Found this bug after changing name of my tce directory.
The command file produced had the tce dir at time of creation instead of using $TCEDIR.

Code: [Select]
change
echo '[ -e /usr/local/tce.installed/'"$APPNAME"' ] || tce-load -i '"$TCEDIR"'/optional/'"$EXTN" >> "$FILE"
to
echo '[ -e /usr/local/tce.installed/'"$APPNAME"' ] || tce-load -i '"\$TCEDIR"'/optional/'"$EXTN" >> "$FILE"

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: Minor bug in /usr/bin/ondemand in V2.9rc5
« Reply #1 on: February 28, 2010, 01:37:33 AM »
Good catch. Thanks.
10+ Years Contributing to Linux Open Source Projects.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Minor bug in /usr/bin/ondemand in V2.9rc5
« Reply #2 on: February 28, 2010, 06:38:55 PM »
Here is a workaround for the busybox bug I reported that also applies to ondemnad.

ls -1 does does not work properly on a symlink to a directory.
This also applies to ls symlink | anything.

I have both tiny core and micro core on the same machine with different tce directories.
In order to save space, I made tce/optional in mc a symlink to the one in tc.
This revealed the bug.  Until busybox is fixed, here is a workaround.

Code: [Select]
Change
ls "$TCEDIR"/optional | grep -E .tcz[ml]*$ > "$TMP"
to
ls "$TCEDIR"/optional/ | grep -E .tcz[ml]*$ > "$TMP"