Bug 181813

Summary: ports-mgmt/portupgrade misbehave with pkg-devel
Product: Ports & Packages Reporter: SANETO Takanori <sanewo>
Component: Individual Port(s)Assignee: Bryan Drewery <bdrewery>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description SANETO Takanori 2013-09-04 15:40:01 UTC
When ports-mgmt/pkg-devel is installed instead of ports-mgmt/pkg, portupgrade can't detect pkgng being used.

Fix: Following patch should fix the problem.
How-To-Repeat: install pkg-devel instead of pkg.
run any portupdate command.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-09-09 01:47:55 UTC
Responsible Changed
From-To: freebsd-ports-bugs->bdrewery

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2013-09-09 02:02:10 UTC
Good catch. I will commit it tomorrow.
-- 
Regards,
Bryan Drewery
Comment 3 dfilter service freebsd_committer freebsd_triage 2013-09-14 13:32:21 UTC
Author: bdrewery
Date: Sat Sep 14 12:32:14 2013
New Revision: 327279
URL: http://svnweb.freebsd.org/changeset/ports/327279

Log:
  - Update to 3.17.2
  
  Changes:
   - Fix detection of pkg-devel
  
  PR:		ports/181813 [1]
  Reported by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp> [1], eadler

Modified:
  head/ports-mgmt/portmaster/Makefile
  head/ports-mgmt/portmaster/distinfo

Modified: head/ports-mgmt/portmaster/Makefile
==============================================================================
--- head/ports-mgmt/portmaster/Makefile	Sat Sep 14 12:04:18 2013	(r327278)
+++ head/ports-mgmt/portmaster/Makefile	Sat Sep 14 12:32:14 2013	(r327279)
@@ -1,7 +1,7 @@
 # $FreeBSD$
 
 PORTNAME=	portmaster
-PORTVERSION=	3.17.1
+PORTVERSION=	3.17.2
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	LOCAL/bdrewery/${PORTNAME}/ \
   		http://mirror.shatow.net/freebsd/${PORTNAME}/ \
@@ -15,7 +15,7 @@ LICENSE=	BSD
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	freebsd
-GH_COMMIT=	2daa6d5
+GH_COMMIT=	7359019
 GH_TAGNAME=	${GH_COMMIT}
 
 OPTIONS_DEFINE=	BASH ZSH

Modified: head/ports-mgmt/portmaster/distinfo
==============================================================================
--- head/ports-mgmt/portmaster/distinfo	Sat Sep 14 12:04:18 2013	(r327278)
+++ head/ports-mgmt/portmaster/distinfo	Sat Sep 14 12:32:14 2013	(r327279)
@@ -1,2 +1,2 @@
-SHA256 (g-freebsd-portmaster-3.17.1-2daa6d5.tar.gz) = 21d96aa1e0533ca68aac8bdde89672830543f843f05b3cb9c8d08f0e8f146bd2
-SIZE (g-freebsd-portmaster-3.17.1-2daa6d5.tar.gz) = 44587
+SHA256 (g-freebsd-portmaster-3.17.2-7359019.tar.gz) = 481dca8236438666ebae213c6f3576d5fd7cfb9530997f25a40c3b124e652115
+SIZE (g-freebsd-portmaster-3.17.2-7359019.tar.gz) = 44616
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 4 dfilter service freebsd_committer freebsd_triage 2013-09-17 02:10:27 UTC
Author: bdrewery
Date: Tue Sep 17 01:10:19 2013
New Revision: 327448
URL: http://svnweb.freebsd.org/changeset/ports/327448

Log:
  - Update to checkin e4a515a
  
  Changes:
    - Fix pkgng detection when using pkg-devel [1]
    - Try to fix stack overflow issue with Ruby 1.9 and large installs [2]
  
  PR:		ports/181813 [1]
  Reported by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp> [1]
  Reported by:	many [2]

Modified:
  head/ports-mgmt/portupgrade-devel/Makefile
  head/ports-mgmt/portupgrade-devel/distinfo

Modified: head/ports-mgmt/portupgrade-devel/Makefile
==============================================================================
--- head/ports-mgmt/portupgrade-devel/Makefile	Mon Sep 16 23:50:58 2013	(r327447)
+++ head/ports-mgmt/portupgrade-devel/Makefile	Tue Sep 17 01:10:19 2013	(r327448)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	portupgrade
-PORTVERSION=	20130718
+PORTVERSION=	20130916
 PORTEPOCH=	3
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	GH \
@@ -20,7 +20,7 @@ CONFLICTS_INSTALL=	portupgrade-[0-9]*
 USE_GITHUB=	yes
 GH_ACCOUNT=	freebsd
 GH_PROJECT=	portupgrade
-GH_COMMIT=	633cdd7
+GH_COMMIT=	e4a515a
 GH_TAGNAME=	${GH_COMMIT}
 
 DIST_SUBDIR=	${PORTNAME}

Modified: head/ports-mgmt/portupgrade-devel/distinfo
==============================================================================
--- head/ports-mgmt/portupgrade-devel/distinfo	Mon Sep 16 23:50:58 2013	(r327447)
+++ head/ports-mgmt/portupgrade-devel/distinfo	Tue Sep 17 01:10:19 2013	(r327448)
@@ -1,2 +1,2 @@
-SHA256 (portupgrade/freebsd-portupgrade-20130718-0-g633cdd7.tar.gz) = 8cf21617d36dc74b8eb7c907ee7bc9401a779d7a88c9fee6f5b37a17f3f45e40
-SIZE (portupgrade/freebsd-portupgrade-20130718-0-g633cdd7.tar.gz) = 106819
+SHA256 (portupgrade/freebsd-portupgrade-20130916-0-ge4a515a.tar.gz) = dbfc0e35693afd243707483e22bd5d60a92a47009175dff9208858d28485bd95
+SIZE (portupgrade/freebsd-portupgrade-20130916-0-ge4a515a.tar.gz) = 106884
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 5 dfilter service freebsd_committer freebsd_triage 2013-09-19 01:19:45 UTC
Author: bdrewery
Date: Thu Sep 19 00:19:37 2013
New Revision: 327590
URL: http://svnweb.freebsd.org/changeset/ports/327590

Log:
  - Update to 2.4.11.1
  
  Changes:
    - Fix pkgng detection when using pkg-devel [1]
    - Try to fix stack overflow issue with Ruby 1.9 and large installs [2]
  
  PR:		ports/181813 [1]
  Reported by:	Takanori Saneto <sanewo@ba2.so-net.ne.jp> [1]
  Reported by:	many [2]
  Tested by:	Robert Burmeister [2]

Modified:
  head/ports-mgmt/portupgrade/Makefile
  head/ports-mgmt/portupgrade/distinfo

Modified: head/ports-mgmt/portupgrade/Makefile
==============================================================================
--- head/ports-mgmt/portupgrade/Makefile	Wed Sep 18 23:30:31 2013	(r327589)
+++ head/ports-mgmt/portupgrade/Makefile	Thu Sep 19 00:19:37 2013	(r327590)
@@ -2,7 +2,7 @@
 # $FreeBSD$
 
 PORTNAME=	portupgrade
-PORTVERSION=	2.4.11
+PORTVERSION=	2.4.11.1
 PORTEPOCH=	2
 CATEGORIES=	ports-mgmt
 MASTER_SITES=	SF/portupgrade/pkgtools/dist/ \

Modified: head/ports-mgmt/portupgrade/distinfo
==============================================================================
--- head/ports-mgmt/portupgrade/distinfo	Wed Sep 18 23:30:31 2013	(r327589)
+++ head/ports-mgmt/portupgrade/distinfo	Thu Sep 19 00:19:37 2013	(r327590)
@@ -1,2 +1,2 @@
-SHA256 (portupgrade/pkgtools-2.4.11.tar.bz2) = c05d8d485c15c5efc0220ab0a8bd40d4a08f057238726797a7f49a288a1e065c
-SIZE (portupgrade/pkgtools-2.4.11.tar.bz2) = 85766
+SHA256 (portupgrade/pkgtools-2.4.11.1.tar.bz2) = 9e683cba14fe5717f0518e00463a200c4318da177158fc284c7b482c6452b790
+SIZE (portupgrade/pkgtools-2.4.11.1.tar.bz2) = 85818
_______________________________________________
svn-ports-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-ports-all
To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
Comment 6 Bryan Drewery freebsd_committer freebsd_triage 2013-09-19 01:20:02 UTC
State Changed
From-To: open->closed

Thanks, portmaster and portupgrade are all fixed now.
Comment 7 SANETO Takanori 2013-12-23 02:48:47 UTC
Hi guys,

I found that it needs some more for portupgrade(-devel) to work with 
pkg-devel.

Current pkgdb.rb has @pkgng_origin as instance variable, which seems not 
properly initialized when accessed within the class method (e.g. 
self.command).

Following patch makes it a class variable and it seems work as expected.
I'm not vary sure it won't break anything, though.

===
--- lib/pkgtools/pkgdb.rb.orig      2013-12-13 03:20:27.000000000 +0900
+++ lib/pkgtools/pkgdb.rb 2013-12-23 11:32:49.000000000 +0900
@@ -99,7 +99,7 @@
      # Use what the port advises to use via PKG_BIN as that will properly
      # handle upgrades
      if sym == :pkg
-      pkg_origin = @pkgng_origin || "ports-mgmt/pkg"
+      pkg_origin = @@pkgng_origin || "ports-mgmt/pkg"
        pkg_dir = "#{$portsdb.ports_dir}/#{pkg_origin}"

        if File.directory?(pkg_dir)
@@ -128,8 +128,8 @@
         PACKAGESITE=file:///nonexistent \
         pkg info -x 'pkg(-devel)?$' >/dev/null 2>&1 && echo yes`.chomp 
!= ""
        @with_pkgng = false unless @with_pkgng
-      @pkgng_origin = $portsdb.make_var('PKGNG_ORIGIN')
-      #STDERR.puts "USING PKGNG[#{@pkgng_origin}]" if @with_pkgng
+      @@pkgng_origin = $portsdb.make_var('PKGNG_ORIGIN')
+      #STDERR.puts "USING PKGNG[#{@@pkgng_origin}]" if @with_pkgng
      end
      @with_pkgng
    end

===
Happy Hacking!
Comment 8 Bryan Drewery freebsd_committer freebsd_triage 2013-12-24 14:11:04 UTC
Thanks! Will test and commit soon.

By the way, it's best to open a new PR next time.

-- 
Regards,
Bryan Drewery