Bug 184672 - port-mgmt/portupgrade -p fails to install dependencies with staging
Summary: port-mgmt/portupgrade -p fails to install dependencies with staging
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords: patch-ready
Depends on:
Blocks:
 
Reported: 2013-12-11 00:10 UTC by Hilko Meyer
Modified: 2015-05-27 15:20 UTC (History)
0 users

See Also:


Attachments
Buildlog (screen -L sudo portupgrade -fp libxcb) (11.23 KB, text/plain)
2014-08-11 18:49 UTC, Hilko Meyer
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hilko Meyer 2013-12-11 00:10:00 UTC
As described in ports/184665 I tried to upgrade libxcb-1.9.1 to libxcb-1.9.1_1 but it failed because x11/xcb-proto is needed as build dependency but wasn't installed in the upgrade process. You can see in the attached buildlog (attached in ports/184665) that it was built, installed into staging area and the package was built. But after building the package xcb-proto wasn't installed and it returned to the build of libxcb.

The next build dependency for libxcb (textproc/libxslt/) was installed as expected.

I did some tests after zeisings answer to that PR and it looks like the culprit is the '-p' option for portupgrade.

cd x11/libxcb && make worked
portupgrade libxcb worked
portupgrade -p libxcb failed

And 
portupgrade -M NO_STAGE=yes -p libxcb worked too

Maybe you can just remove the '-p' option, because packages are build automagically after staging was introduced.

How-To-Repeat: Deinstall x11/xcb-proto
portupgrade -p libxcb
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2013-12-11 00:10:08 UTC
Responsible Changed
From-To: freebsd-ports-bugs->freebsd-x11

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Niclas Zeising freebsd_committer freebsd_triage 2013-12-11 00:19:20 UTC
Responsible Changed
From-To: freebsd-x11->bdrewery

This is a portupgrade or possibly a pkg_install issue.  Have a chat with bapt 
about it.  It's not an x11 issue.
Comment 3 Hilko Meyer 2014-08-11 18:48:22 UTC
I'm surprised about the message from today, because it is very easy to reproduce for me. Even with pkgng now:

Install x11/libxcb
Deinstall x11/xcb-proto
portupgrade -pf libxcb

Excerpt from build log:

--->  Reinstalling 'libxcb-1.10_2' (x11/libxcb)
--->  Building '/usr/ports/x11/libxcb'
[...]
===>   libxcb-1.10_2 depends on package: xcb-proto>=1.9 - not found
[...]
===>  Building for xcb-proto-1.10_1
[...]
===>  Staging for xcb-proto-1.10_1
[...]
====> Compressing man pages (compress-man)
===>  Building package for xcb-proto-1.10_1
===>   Returning to build of libxcb-1.10_2

After "Building package" it should install the xcb-proto before returning to the build of libxcb, but that doesn't happen if I use the "-p" option of portupgrade.
Comment 4 Hilko Meyer 2014-08-11 18:49:53 UTC
Created attachment 145682 [details]
Buildlog (screen -L sudo portupgrade -fp libxcb)
Comment 5 John Marino freebsd_committer freebsd_triage 2014-08-11 18:57:37 UTC
I closed it for two reasons:

one)  Niclas said this is not an x11 issue.  He suggested you "chat" with bapt or the maintainer of portupgrade.  He was finished with this PR.

(In reply to Niclas Zeising from comment #2)
> Responsible Changed
> From-To: freebsd-x11->bdrewery
> 
> This is a portupgrade or possibly a pkg_install issue.  Have a chat with
> bapt 
> about it.  It's not an x11 issue.

two) it mentions staging which shows up in a search about staging.  What this has to do with staging, I don't know, but I am trying to make it not show up in a search.


bonus) obvious libxcb installs, otherwise you'd see a lot of complaints about this.  Yours is the only complaint, it's a local issue.
Comment 6 Bryan Drewery freebsd_committer freebsd_triage 2014-08-11 19:06:25 UTC
Sounds similar to Bug #189398. I'll look into it and fix portupgrade.
Comment 7 Bryan Drewery freebsd_committer freebsd_triage 2014-08-11 19:14:26 UTC
Please try this patch against your /usr/ports/Mk/bsd.port.mk to test my theory:

Index: Mk/bsd.port.mk
===================================================================
--- Mk/bsd.port.mk      (revision 364392)
+++ Mk/bsd.port.mk      (working copy)
@@ -3139,11 +3140,7 @@
 .endif

 .if !target(all)
-.  if defined(NO_STAGE)
 all: build
-.  else
-all: stage
-.  endif
 .endif

 .if !defined(DEPENDS_TARGET)
Comment 8 Hilko Meyer 2014-08-11 19:41:27 UTC
I don't see a difference with you patch. 'portupgrade -M NO_STAGE=yes -fp libxcb' still works, 'portupgrade -fp libxcb' still fails.
Comment 9 John Marino freebsd_committer freebsd_triage 2014-08-31 10:01:55 UTC
I'm removing "with staging" from the title so it doesn't show up in a search for unstaged individual ports.
Comment 10 Bryan Drewery freebsd_committer freebsd_triage 2014-10-06 21:02:27 UTC
Fix subject, this is very much a staging issue.

This problem came with the initial staging commit in ports r327910. Sorry I missed this for so long. The problem is that 'make package' no longer installs the package as it used to. It will be fixed in portupgrade shortly.

Also logged here https://github.com/freebsd/portupgrade/issues/58
Comment 11 commit-hook freebsd_committer freebsd_triage 2015-05-14 18:28:08 UTC
A commit references this bug:

Author: bdrewery
Date: Thu May 14 18:27:31 UTC 2015
New revision: 386351
URL: https://svnweb.freebsd.org/changeset/ports/386351

Log:
  Update to 2.4.13-2-g2c079e1

  Changes:
    * portupgrde -p: Fix new dependencies not getting installed. (#58)

  PR:		184672

Changes:
  head/ports-mgmt/portupgrade-devel/Makefile
  head/ports-mgmt/portupgrade-devel/distinfo
Comment 12 commit-hook freebsd_committer freebsd_triage 2015-05-27 15:18:35 UTC
A commit references this bug:

Author: bdrewery
Date: Wed May 27 15:17:57 UTC 2015
New revision: 387621
URL: https://svnweb.freebsd.org/changeset/ports/387621

Log:
  Update to 2.4.14

  Changes:
    * Fix ordering of build based on FETCH/PATCH/EXTRACT dependencies. [1]
    * Support security vulnerabilities as a build failure reason. [2]
    * portupgrde -p: Fix new dependencies not getting installed. (#58) [3]
    * Don't install missing dependencies which are already satisfied (#62).
      Note that this purposely causes these missing dependencies to not show
      in the job (-n) and final results output which is a compromise to at least
      avoid the wrong packages being installed. The logging issue is in #30.

  PR:		177365 [1]
  Submitted by:	truckman@ [1]
  PR:		192232 [2]
  Submitted by:	Yuri <yuri@rawbw.com> [2]
  PR:		184672 [3]

Changes:
  head/ports-mgmt/portupgrade/Makefile
  head/ports-mgmt/portupgrade/distinfo
Comment 13 Bryan Drewery freebsd_committer freebsd_triage 2015-05-27 15:20:58 UTC
Fixed. Sorry for the delays.