• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Portshaker -M: Disable interactive mode or suppress prompt

Lamia

Active Member

Thanks: 17
Messages: 119

#1
I am receiving too many prompts like the below.


Code:
[Warn  20:03:36] Conflict detected!
The target ports tree (/usr/local/poudriere/ports/default) already have the version of audio/rubygem-librmpd provided by myrepo.
However, the following file(s) has been touched: Makefile.
An update may be required.
(diff|install|continue) > c

Please tell me the additional argument to add to "portshaker -M" to disable interactive mode or suppress the prompts.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#2
What exactly are you trying to do?
 

Lamia

Active Member

Thanks: 17
Messages: 119

#3
What exactly are you trying to do?
I am trying to merge two source ports (myrepo and portsnap) into one target port (default) before building packages with poudriere.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#4
Never used portshaker(8) but the solution appears to be mentioned in the man page:
Code:
   Handling conflics
     When merging a target ports tree, portshaker will try to detect inconsis-
     tencies and report	conflicts.

     Such conflics can occur in	two situations:

     +o	 Two source ports tree claim to	provide	the same version of a single
	 port (they both have the same PORTEPOCH, PORTVERSION and
	 PORTREVISION) but they	do not provide the same	files.

	 In such a situation, portshaker(8) will switch	to interactive mode
	 and ask you what to do.

	 In order to efectively	fix the	problem	after the merge, you will have
	 to either:

	 +o   Remove the	conflicting version of the port	from its source	ports
	     tree.

	 +o   Bump the PORTREVISION of the port from the	desired	source ports
	     tree.

     +o	 A port	to be merged has a version number going	backward.  portshaker
	 will not merge	the port and will emit a warning.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#5
Thanks SirDIce, I saw that text. The text "......In such a situation, portshaker(8) will switch to interactive mode and ask you what to do....." is the interactive mode that I am trying to suppress.

The problem I am faced with is that I do not know where to add that "+o" argument. It won't go into the "portshaker [args]." I have check the manual for portshaker.

I hope someone out there can further guide me.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#6
The problem I am faced with is that I do not know where to add that "+o" argument.
That's not an argument, it's a textual bullet point. And as far as I understood the man page, there's no option to suppress the interactive mode. The only way to fix it is to prevent it from getting to that point in the first place. The bullet points simply show a few solutions.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#7
The only way to fix it is to prevent it from getting to that point in the first place. The bullet points simply show a few solutions.
Thanks again. I reckon those options are the "diff|install|continue". As you said, the only way to fix it is to prevent it. How can I prevent it from getting to that point? That was what I meant by suppressing the prompt or disabling the interactive mode.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#8
The conflict seems to be with audio/rubygem-librmpd as it's defined in both trees. If you've made local changes in myrepo the simplest solution is probably to bump the PORTREVISION of the port in myrepo (assuming you want to have your own version merged into the tree).
 

Lamia

Active Member

Thanks: 17
Messages: 119

#9
Apparently, I have not made any changes to my repo. The two source ports should practically be the same. My repo is a clone of the freebsd ports on github & the second is the portsnap. I can imagine that the portsnap's file(s) will mostly be the most up-to-date file(s).
Whenever I get the prompt, I always choose "c" i.e. continue. It becomes annoying when I have to keep doing so every min. I am not even well informed of what the install option will do. Would you suggest I always choose the install option?

I may have to continue responding to the prompt like that until some other members chip in their thoughts.

Thanks SirDice.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#10
The two source ports should practically be the same. My repo is a clone of the freebsd ports on github & the second is the portsnap.
Then why are you merging them? If you want to get the latest ports tree you can switch the poudriere ports tree to SVN instead of portsnap(8). This will allow you much more freedom to merge and accept upstream changes.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#11
Then why are you merging them?
I should have added that the reason for having myrepo (a git clone of FreeBSD ports) is that I could make changes to the FreeBSD codebase/ports, merge the ports with portsnap's and then build. I just haven't started hacking & committing my changes yet.

If you want to get the latest ports tree you can switch the poudriere ports tree to SVN instead of portsnap(8). This will allow you much more freedom to merge and accept upstream changes.
I will take note of your tip. I however can't recall seeing a guide where one of portshaker's source port tree is the SVN. I reckon the SVN repo and GIT repo are always concurrently updated. And in this current age, most source repos or codebases often have a git access in addition to svn/cvs/hg/etc. That must be the reason most guides stick with git.
 

Lamia

Active Member

Thanks: 17
Messages: 119

#12
I can narrow this matter down to hacking the portshaker's codebase. I need to disable making "unimportant" changes to the Makefile.

I still get the prompt despite deleting my default port and running "portshaker -M" again.

Here is what the 'diff' option shows:

Code:
[Warn  16:18:26] Conflict detected!
The target ports tree (/usr/local/poudriere/ports/default) already have the version of audio/alsa-lib provided by myrepo.
However, the following file(s) has been touched: Makefile.
An update may be required.
(diff|install|continue) > c
[Warn  16:20:38] Conflict detected!
The target ports tree (/usr/local/poudriere/ports/default) already have the version of audio/gramofile provided by myrepo.
However, the following file(s) has been touched: Makefile.
An update may be required.
(diff|install|continue) > d
--- /usr/local/poudriere/ports/default/audio/gramofile/Makefile 2018-03-03 06:34:53.000000000 +0800
+++ /var/cache/portshaker/myrepo/audio/gramofile/Makefile       2018-02-18 15:19:41.611566000 +0800
@@ -1,5 +1,5 @@
# Created by: nox@jelal.kn-bremen.de
-# $FreeBSD: head/audio/gramofile/Makefile 463452 2018-03-02 22:34:53Z brooks $
+# $FreeBSD$
The changes made to the Makefile file are not significant. Any pointer how to resolve it?
 

Lamia

Active Member

Thanks: 17
Messages: 119

#13
I have made some significant progess with this query. My changes now get merged into the target port without the prompts.

Just before I close this thread, could someone please tell me how the portshaker-config package is being used? I have just installed it but can't figure out how to use it alongside with portshaker/poudriere.

Thanks.
 
Top