Bug 127019 - ports-mgmt/portupgrade does not recognize fail conditions
Summary: ports-mgmt/portupgrade does not recognize fail conditions
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: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-01 10:00 UTC by Frank Wall
Modified: 2015-05-14 19:38 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Wall 2008-09-01 10:00:16 UTC
When trying to install a port with portupgrade and the installation failes with an error, portupgrade does not recognize this error conditions and reports the failed installation as successful installation.

How-To-Repeat: You may easily repeat this problem by trying to install both 'lynx' ports at the same time. Although this is nothing you would do in real world, this is nice to show the wrong behaviour of portupgrade.

# portinstall -Nv lynx
--->  Reading default options: -v -b -D -L /var/tmp/portupgrade-%s::%s.log
--->  Session started at: Mon, 01 Sep 2008 10:08:46 +0200
--->  Found 2 ports matching 'lynx':
        www/lynx
        www/lynx-current
Install 'www/lynx'? [yes] 
[...]
Install 'www/lynx-current'? [yes]
[...]

Now portupgrade is going to install 'www/lynx' first. This will be successfull. Afterwards portupgrade tries to install 'www/lynx-current', but it fails due to conflicts with already installed 'www/lynx' package:

--->  Build of www/lynx-current ended at: Mon, 01 Sep 2008 10:12:46 +0200 (consumed 00:01:54)
--->  Installation of www/lynx-current started at: Mon, 01 Sep 2008 10:12:46 +0200
--->  Installing the new version via the port
===>  Installing for lynx-2.8.7d9_1

===>  lynx-2.8.7d9_1 conflicts with installed package(s): 
      lynx-2.8.6.5_4,1

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/www/lynx-current.
*** Error code 1

Stop in /usr/ports/www/lynx-current.

At this point I would expect portupgrade to report the installation of 'www/lynx' as successfull, but the installation of 'www/lynx-devel' as failed. But take a look at the report:

--->  ** Install tasks 3: 3 done, 0 ignored, 0 skipped and 0 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
        + misc/mime-support
        + www/lynx
        + www/lynx-current
--->  Packages processed: 3 done, 0 ignored, 0 skipped and 0 failed
--->  Session ended at: Mon, 01 Sep 2008 10:12:48 +0200 (consumed 00:04:01)

Portupgrade tells me that the installation of 'www/lynx-current' was successfull, although the installation failed.
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2008-09-01 10:03:40 UTC
Responsible Changed
From-To: freebsd-ports-bugs->sem

Over to maintainer (via the GNATS Auto Assign Tool)
Comment 2 Mark Linimon freebsd_committer freebsd_triage 2009-07-25 02:48:40 UTC
Responsible Changed
From-To: sem->ruby

sem@ has turned over maintainership of portupgrade to the ruby mailing list.
Comment 3 Philip M. Gollucci freebsd_committer freebsd_triage 2010-09-10 00:10:30 UTC
Responsible Changed
From-To: ruby->pgollucci

I will take it
Comment 4 Philip M. Gollucci freebsd_committer freebsd_triage 2010-09-24 07:21:41 UTC
Responsible Changed
From-To: pgollucci->freebsd-ports-bugs

going to have enotime for the next 2 weeks, sorry
Comment 5 Steve Price freebsd_committer freebsd_triage 2011-01-03 17:16:19 UTC
Responsible Changed
From-To: freebsd-ports-bugs->ruby

Over to maintainer(s).
Comment 6 wimodiste 2011-11-24 16:12:37 UTC
I cannot reproduce. I don't have this bug.
I think someone already fix this or something like this.

http://www.freebsd.org/cgi/query-pr.cgi?pr=127019


1) system: 8.2-STABLE, ruby: 1.9.2p290, portupgrade: devel-9999,2, command:
portinstall -Nv lynx and check yes for both lynxes.
System hasn't anyone lynx.

===>  lynx-2.8.7.1_1,1 conflicts with installed package(s):
      lynx-2.8.8d9_1

      They will not build together.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/www/lynx.
*** Error code 1

Stop in /usr/ports/www/lynx.
** Command failed [exit code 1]: /usr/bin/script -qa
/tmp/portinstall20111116-82998-1dwl5ql env make
** Fix the problem and try again.
--->  Build of www/lynx ended at: Wed, 16 Nov 2011 03:19:11 +0200 (consumed
00:00:21)
--->  Fresh installation of www/lynx ended at: Wed, 16 Nov 2011 03:19:11
+0200 (consumed 00:00:21)
--->  ** Install tasks 3: 2 done, 0 ignored, 0 skipped and 1 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
    + misc/mime-support
    + www/lynx-current
    ! www/lynx    (unknown build error)
--->  Packages processed: 2 done, 0 ignored, 0 skipped and 1 failed
--->  Session ended at: Wed, 16 Nov 2011 03:19:11 +0200 (consumed 00:02:31)
zsh: exit 1     sudo portinstall -Nv lynx


2) system: 7.2-RELEASE, ruby: 1.8.7 248, portupgrade: 2.4.6_3,2, command:
portinstall -Nv lynx and check yes for lynx-current lynxes. (www/lynx
already installed)
system have one installed lynx(www/lynx).

lynx2.8.8dev.8.tar.bz2                        100% of 2399 kB  488 kBps

===>  lynx-2.8.8d8_1 conflicts with installed package(s):
      lynx-2.8.7.1,1

      They will not build together.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/www/lynx-current.
** Command failed [exit code 1]: /usr/bin/script -qa
/tmp/portinstall20111116-32347-11hb5s0-0 env make
** Fix the problem and try again.
--->  Build of www/lynx-current ended at: Wed, 16 Nov 2011 03:33:46 +0200
(consumed 00:00:16)
--->  Fresh installation of www/lynx-current ended at: Wed, 16 Nov 2011
03:33:46 +0200 (consumed 00:00:16)
--->  ** Install tasks 3: 2 done, 0 ignored, 0 skipped and 1 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
    + dns/libidn
    + misc/mime-support
    ! www/lynx-current    (unknown build error)
--->  Packages processed: 2 done, 0 ignored, 0 skipped and 1 failed
--->  Session ended at: Wed, 16 Nov 2011 03:33:46 +0200 (consumed 00:01:32)


3) system: 7.2-RELEASE, ruby: 1.8.7 248, portupgrade: 2.4.6_3,2, command:
portinstall -Nv lynx and check yes for both lynxes.
system have one installed lynx(www/lynx).
===>  Cleaning for lynx-2.8.8d8_1

===>  lynx-2.8.8d8_1 conflicts with installed package(s):
      lynx-2.8.7.1_1,1

      They install files into the same place.
      You may want to stop build with Ctrl + C.
===>  Vulnerability check disabled, database not found
===>  License check disabled, port has not defined LICENSE

===>  lynx-2.8.8d8_1 conflicts with installed package(s):
      lynx-2.8.7.1_1,1

      They will not build together.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/www/lynx-current.
** Command failed [exit code 1]: /usr/bin/script -qa
/tmp/portinstall20111116-80258-1s56g9g-0 env make
** Fix the problem and try again.
--->  Build of www/lynx-current ended at: Wed, 16 Nov 2011 03:51:54 +0200
(consumed 00:00:11)
--->  Fresh installation of www/lynx-current ended at: Wed, 16 Nov 2011
03:51:54 +0200 (consumed 00:00:11)
--->  ** Install tasks 4: 3 done, 0 ignored, 0 skipped and 1 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
    + misc/mime-support
    + www/lynx
    + dns/libidn
    ! www/lynx-current    (unknown build error)
--->  Packages processed: 3 done, 0 ignored, 0 skipped and 1 failed
--->  Session ended at: Wed, 16 Nov 2011 03:51:54 +0200 (consumed 00:03:12)



So, I hope bug doesn't exist now.
Comment 7 Philip M. Gollucci freebsd_committer freebsd_triage 2012-02-22 05:22:49 UTC
State Changed
From-To: open->suspended

Over to maintainer. 


Comment 8 Philip M. Gollucci freebsd_committer freebsd_triage 2012-02-22 05:22:49 UTC
Responsible Changed
From-To: ruby->freebsd-ports-bugs

Over to maintainer.
Comment 9 Chris Rees freebsd_committer freebsd_triage 2012-04-12 11:02:45 UTC
State Changed
From-To: suspended->open

This should not be suspended.
Comment 10 Bryan Drewery 2012-04-23 20:04:50 UTC
Hi,

I also am unable to recreate this issue.

It works as expected and does not install www/lynx-current, after
successfully installing www/lynx.

It must have been fixed since this was reported. I've also logged it
upstream at: https://github.com/pkgtools/pkgtools/issues/13


# portinstall www/lynx www/lynx-current
...
--->  Fresh installation of www/lynx ended at: Mon, 23 Apr 2012 20:52:11
+0200 (consumed 00:01:16)
--->  ** Install tasks 3: 2 done, 0 ignored, 0 skipped and 0 failed
--->  Fresh installation of www/lynx-current started at: Mon, 23 Apr
2012 20:52:12 +0200
--->  Installing 'lynx-2.8.8d12_1' from a port (www/lynx-current)
--->  Build of www/lynx-current started at: Mon, 23 Apr 2012 20:52:12 +0200
--->  Building '/usr/ports/www/lynx-current'
===>  Cleaning for lynx-2.8.8d12_1

===>  lynx-2.8.8d12_1 conflicts with installed package(s):
      lynx-2.8.7.2,1

      They install files into the same place.
      You may want to stop build with Ctrl + C.
===>  License check disabled, port has not defined LICENSE
=> lynx2.8.8dev.12.tar.bz2 doesn't seem to exist in /usr/ports/distfiles/.
=> Attempting to fetch http://lynx.isc.org/current/lynx2.8.8dev.12.tar.bz2
lynx2.8.8dev.12.tar.bz2                       100% of 2480 kB  558 kBps

===>  lynx-2.8.8d12_1 conflicts with installed package(s):
      lynx-2.8.7.2,1

      They will not build together.
      Please remove them first with pkg_delete(1).
*** Error code 1

Stop in /usr/ports/www/lynx-current.
** Command failed [exit code 1]: /usr/bin/script -qa
/tmp/portinstall20120423-78745-1lqtqe1-0 env make
** Fix the problem and try again.
--->  Build of www/lynx-current ended at: Mon, 23 Apr 2012 20:52:28
+0200 (consumed 00:00:15)
--->  Fresh installation of www/lynx-current ended at: Mon, 23 Apr 2012
20:52:28 +0200 (consumed 00:00:16)
--->  ** Install tasks 3: 2 done, 0 ignored, 0 skipped and 1 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
        + misc/mime-support
        + www/lynx
        ! www/lynx-current      (unknown build error)
--->  Packages processed: 2 done, 0 ignored, 0 skipped and 1 failed
--->  Session ended at: Mon, 23 Apr 2012 20:52:28 +0200 (consumed 00:01:48)


Bryan Drewery
Comment 11 Jason Helfman freebsd_committer freebsd_triage 2012-04-27 05:43:12 UTC
State Changed
From-To: open->closed

not reproducible, fixed in subsequent release
Comment 12 Bryan Drewery freebsd_committer freebsd_triage 2015-05-14 19:38:32 UTC
I retried to reproduce this with better setup this time. I made both ports have the same PKGNAME as they did before, reverted the CONFLICTS to the older version and make the CONFLICTS a fatal error.

===>  lynx-2.8.9d6 conflicts with installed package(s):
      lynx-2.8.8.2,1

      They install files into the same place.
      You may want to stop build with Ctrl + C.
*** Error code 1

Stop.
make[1]: stopped in /root/svn/ports/www/lynx-current
*** Error code 1

Stop.
make: stopped in /root/svn/ports/www/lynx-current
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall20150514-16522-ai8o5u env make
** Fix the problem and try again.
--->  Build of www/lynx-current ended at: Thu, 14 May 2015 14:37:26 -0500 (consumed 00:00:03)
--->  Fresh installation of www/lynx-current ended at: Thu, 14 May 2015 14:37:26 -0500 (consumed 00:00:03)
--->  ** Install tasks 2: 1 done, 0 ignored, 0 skipped and 1 failed
--->  Listing the results (+:done / -:ignored / *:skipped / !:failed)
        + www/lynx
        ! www/lynx-current      (unknown build error)

The result seems fine though. I cannot reproduce.