trouble with g-ctan finding wrong G_OVERLAY_DIR, not finding dir at all

Bug #434385 reported by Nick Howell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
g-CTAN
Fix Released
Critical
Unassigned

Bug Description

The regex checking in modules/ebuild doesn't check PORTDIR_OVERLAY correctly:

* if my portdir_overlay contains my g-ctan overlay, it doesn't pass the check (or I couldn't get it to)
* if my g-ctan overlay directory is /usr/portage/local/g-ctan and I create and add to portdir_overlay the directory /usr/portage/local/g-ctanx (and leave out the correct overlay directory), it passes the check

Attached is my best guess at a patch. It uses sed as well as grep to split the portdir_overlay variable into separate lines by whitespace, and then it checks to make sure one of the lines is *exactly* G_OVERLAY_DIR, fixing these two cases (for me, at least).

steps to reproduce:
  (G_OVERLAY_DIR = /usr/portage/local/g-ctan, which exists)
  make.conf:
    PORTDIR_OVERLAY="/usr/local/portage/custom /usr/portage/local/g-ctan "
    source /usr/local/portage/layman/make.conf
    PORTDIR_OVERLAY="/usr/local/portage $PORTDIR_OVERLAY"

  g-ctan -e apa
  [error G_OVERLAY_DIR not in PORTDIR_OVERLAY]

  mkdir /usr/portage/local/g-ctanx
  make.conf:
    PORTDIR_OVERLAY="/usr/local/portage/custom /usr/portage/local/g-ctanx "
    source /usr/local/portage/layman/make.conf
    PORTDIR_OVERLAY="/usr/local/portage $PORTDIR_OVERLAY"

  g-ctan -e apa
  [error no ebuilds to satisfy g-ctan/apa]

Related branches

Revision history for this message
Nick Howell (5-launchpad-nlhowell-spamgourmet-com) wrote :
description: updated
Changed in g-ctan:
importance: Undecided → Critical
status: New → Confirmed
Revision history for this message
Christian Faulhammer (fauli) wrote :

This bug only hits you if you have the g-CTAN overlay at the end of your PORTDIR_OVERLAY. For me this was not the case (in the middle actually). Thanks for your patch, but there is a simpler fix I just committed to the 2008 branch. The trailing dot (which mathes any character) has to go, there were no problems for me because I have a space after the entry while for you the string ends...originally the dot was there to match trailing slashes.

Anyway, an updated ebuild will be released soon.

Changed in g-ctan:
status: Confirmed → Fix Committed
Changed in g-ctan:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.