portupgrade error (broken pipe) on deinstalling stage

goshanecr

Active Member

Thanks: 9
Messages: 149

#1
Good day!

My info:
uname -a
Code:
FreeBSD BSD 10-STABLE FreeBSD 10-STABLE #0 r298405: Thu Apr 21 22:49:24 MSK 2016  user@BSD:/usr/obj/usr/src/sys/BSDSERV  amd64
I have similar errors for many ports on portupgrade -a procedure. And all fails after successful building port, fails on deinstalling stage.

That's listing for one of them:
Code:
Making install in tests
/usr/bin/make  install-am
install  -s -m 555 /usr/ports/databases/xapian-core/work/xapian-core-1.2.23/examples/.libs/copydatabase /usr/ports/databases/xapian-core/work/stage/usr/local/bin/xapian-copydatabase
install  -s -m 555 /usr/ports/databases/xapian-core/work/xapian-core-1.2.23/examples/.libs/delve /usr/ports/databases/xapian-core/work/stage/usr/local/bin/xapian-delve
install  -s -m 555 /usr/ports/databases/xapian-core/work/xapian-core-1.2.23/examples/.libs/quest /usr/ports/databases/xapian-core/work/stage/usr/local/bin/xapian-quest
====> Compressing man pages (compress-man)
--->  Backing up the old version
--->  Uninstalling the old version
[Reading data from pkg(8) ... - 682 packages found - done]
--->  Deinstalling 'xapian-core-1.2.22,1'
[Reading data from pkg(8) ... - 682 packages found - done]
** Listing the failed packages (-:ignored / *:skipped / !:failed)
  ! xapian-core-1.2.22,1  (Broken pipe)
** Listing the failed packages (-:ignored / *:skipped / !:failed)
  ! databases/xapian-core (xapian-core-1.2.22,1)  (uninstall error)
What can caused the problem?
 
Last edited by a moderator:
OP
OP
goshanecr

goshanecr

Active Member

Thanks: 9
Messages: 149

#4
Thanks! I have not record for ruby version, but ruby installed 2.1 and seems that I just need to follow steps from /usr/ports/UPDATING about ruby version update.
 

T-Aoki

Member

Thanks: 6
Messages: 29

#5
My case, stable/10 is continuously OK but problem is reproduced on head. (Both amd64)
r298114 was OK, r298476 and later are NG.

  • Ruby version doesn't matter.
(Both 2.1 and 2.2 are NG for head r298476, while both are OK for stable/10.)​
  • Updating ports tree didn't help.
(Didn't updated ports tree first when I updated src tree from r298114 to r298476.)​
  • Currently, stable/10 is at r298510.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,520
Messages: 27,956

#7
As they seem to have issues with uninstalling existing packages I'm wondering what version of pkg(8) is used and if it also fails to uninstall if you pkg-delete(8) it by hand?
 

T-Aoki

Member

Thanks: 6
Messages: 29

#8
Has anyone found a resolution to this? I have several boxes doing this after updating yesterday.
If you're updating via source, and you're at
for head: r298192 or later
for stable/10: r298920 or later,​
quick fix is to revert
for head: r298192
for stable/10: r298920.​

These are "Update file to 5.26" and touches a lot of files.
So the easiest way would be downgrading at contrib/file and lib/libmagic using svnlite up -r <rev> and rebuild/reinstall at usr.bin/file and lib/libmagic.

Watch Bug PR 209211 for actual fix.

Unfortunately, I cannot reproduce goshanecr's case (stable/10 r298405), so if it is your case, I cannot help.
 

T-Aoki

Member

Thanks: 6
Messages: 29

#9
As they seem to have issues with uninstalling existing packages I'm wondering what version of pkg(8) is used and if it also fails to uninstall if you pkg-delete(8) it by hand?
With my case, ports-mgmt/pkg is at 1.7.2.
But it can be unrelated, as ports-mgmt/portmaster is reported to work and not all ports gets error.
Additionally, pkg-1.7.2 co-worked fine with portupgrade under stable/10 before r298920.

Sorry, pkg-delete(8) by hand is not yet tested, as I need to seek for one affected but not needed for me to proceed.
 

kpa

Beastie's Twin

Thanks: 1,777
Messages: 6,287

#11
You might want to take a look at ports-mgmt/synth as the replacement for both portmaster and portupgrade. Both tools are pretty much redundant now because of the new pkg package system and they both have problems in handling dependencies properly that are only solved by using a package builder such as the mentioned Synth.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,520
Messages: 27,956

#12
If you have multiple servers and different versions of FreeBSD I can recommend setting up ports-mgmt/poudriere. Both synth and poudriere can be set up as a local repository. Build once, install many :D
 

YuryG

Well-Known Member

Thanks: 11
Messages: 301

#13
The same is here. "Broken pipe" for some ports via portupgrade, but O.K. manually make deinstall then make install clean.
uname: FreeBSD 10.3-STABLE #0 r298933M
 

T-Aoki

Member

Thanks: 6
Messages: 29

#14
The same is here. "Broken pipe" for some ports via portupgrade, but O.K. manually make deinstall then make install clean.
uname: FreeBSD 10.3-STABLE #0 r298933M
As I noted on #8, you need to revert r298920.
Akinori MUSHA confirmed that the problem is in file 5.26.
See the post on freebsd-current ML(linked).
Details are described at upstream bugtracker (first URL written in the post).

The easiest workaround (example step-by-step procedure for stable/10) is:

Code:
cd /usr/src/contrib/file
svnlite update -r 298919
cd /usr/src/lib/libmagic
svnlite update -r 298919
cd /usr/src/usr.bin/file
make clean
make
make install
cd /usr/src/lib/libmagic
make clean
make
make install
After these, portupgrade would work fine again.
svnlite is in base by default.
 
Last edited by a moderator:

T-Aoki

Member

Thanks: 6
Messages: 29

#16
For head, fix is introduced at r299234 by delphij@. MFC after: 3 days.:)
I could confirm portupgrade works fine with it. (Tested on stable/10 by manually applying the diff.)

But please note that this revision fixes only "Broken pipe" problem.
Another problem Akinori MUSHA mentioned (said fixed on upstream head) isn't fixed on FreeBSD.
Someone having access to upstream head repo would be able to see it, but I couldn't see it via public upstream github.:(
 

YuryG

Well-Known Member

Thanks: 11
Messages: 301

#19
If I applied workaround with reverting two directories to previous version, should I make additional steps upgrading whole /usr/src with svn?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 6,520
Messages: 27,956

#20
If I applied workaround with reverting two directories to previous version, should I make additional steps upgrading whole /usr/src with svn?
On the next svn update run they'll be updated to their latest versions. You don't have to do anything for that.
 
Top