[Bug 194800] New: ports-mgmt/portupgrade: broken after moving ports folder to another place

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Nov 4 05:44:06 UTC 2014


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 at FreeBSD.org
          Reporter: d.akiyakov at gmail.com
          Assignee: bdrewery at FreeBSD.org
             Flags: maintainer-feedback?(bdrewery at 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 at 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 at 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 at sunlark.localhost:/usr/obj/usr/src/sys/CORE  amd64

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

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


More information about the freebsd-ports-bugs mailing list