Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Nov 2014 05:44:06 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 194800] New: ports-mgmt/portupgrade: broken after moving ports folder to another place
Message-ID:  <bug-194800-13@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=194800

            Bug ID: 194800
           Summary: ports-mgmt/portupgrade: broken after moving ports
                    folder to another place
           Product: Ports Tree
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: Needs Triage
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: bdrewery@FreeBSD.org
          Reporter: d.akiyakov@gmail.com
          Assignee: bdrewery@FreeBSD.org
             Flags: maintainer-feedback?(bdrewery@FreeBSD.org)

Hello, I moved ports folder to another place, for example to /home/data/ports.
After that I added few lines to /usr/local/etc/pkgtools.conf

  ENV['PORTSDIR'] ||= '/home/data/ports'

Also, I try to add the following line to /etc/make.conf

  PORTSDIR=/home/data/ports

Portupgrade worked with /home/data/ports till /usr/ports was in system, but
when I delete /usr/ports, I received the following output:

ira@sunlark:/home/data % portupgrade
cd: /usr/ports: No such file or directory
/usr/local/lib/ruby/site_ruby/2.0/pkgtools/portsdb.rb:237:in `join': no
implicit conversion of nil into String (TypeError)
        from /usr/local/lib/ruby/site_ruby/2.0/pkgtools/portsdb.rb:237:in
`index_file'
        from /usr/local/lib/ruby/site_ruby/2.0/pkgtools/portsdb.rb:247:in
`db_dir='
        from /usr/local/lib/ruby/site_ruby/2.0/pkgtools/portsdb.rb:167:in
`setup'
        from /usr/local/lib/ruby/site_ruby/2.0/pkgtools/pkgtools.rb:242:in
`init_pkgtools_global'
        from /usr/local/sbin/portupgrade:530:in `block in main'
        from /usr/local/lib/ruby/2.0/optparse.rb:885:in `initialize'
        from /usr/local/sbin/portupgrade:237:in `new'
        from /usr/local/sbin/portupgrade:237:in `main'
        from /usr/local/sbin/portupgrade:2376:in `<main>'

To resolve this problem, I edit
/usr/local/lib/ruby/site_ruby/2.0/pkgtools/portsdb.rb 

line 214:     
- @ports_dir = new_ports_dir || ENV['PORTSDIR'] || '/usr/ports'
+ @ports_dir = new_ports_dir || ENV['PORTSDIR'] || '/home/data/ports'

it helps for me.

ira@sunlark:/home/data % uname -a
FreeBSD sunlark.localhost 10.1-PRERELEASE FreeBSD 10.1-PRERELEASE #4 r273447:
Wed Oct 22 09:40:49 NOVT 2014    
ira@sunlark.localhost:/usr/obj/usr/src/sys/CORE  amd64

--- Comment #1 from Bugzilla Automation <bugzilla@FreeBSD.org> ---
Auto-assigned to maintainer bdrewery@FreeBSD.org

-- 
You are receiving this mail because:
You are the assignee for the bug.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-194800-13>