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

Reinstall binary packages

circus78

Active Member

Thanks: 4
Messages: 143

#1
Hi, I was reading "Modifying Package Metadata" section of this section of FreeBSD Handbook.
It is not perfectly clear to me why it is necessary to reinstall packages that are dependent on some package with modified origin.
I mean: I can understand same situation with ports, because they clearly need to be re-compiled.
According to my understanding, pkg only deals with binary (static) software.
So, as in the example, this command:
# pkg install -Rf graphics/freeglut will reinstall the same version of dependent packages.. which are the same as before, because they are static.
What am I missing?
Thank you
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#2
You are -f forcing the reinstall.
Code:
     It then creates a work-list of all the package installations to do.  Any
     already installed and up-to-date packages will be dropped from the list
     unless the -f (force) option is supplied, in which case those packages
     will be reinstalled.
Code:
     -R, --recursive
                When used with -f, reinstalls any packages that require the
                given package.
pkg-install(8)
 

ShelLuser

Son of Beastie

Thanks: 1,191
Messages: 2,558

#3
Quite frankly I'm not even sure why the suggestion to reinstall is even mentioned. Even if you'd be using ports then nothing substantial would change when a package got a different origin. (edit): ... since it wouldn't have any direct impact on the dependencies for example.

(edit2)

However...

The requirement to reinstall doesn't come from editing the origin of the package but is rather caused by the actual physical change in the ports directory. That's why it's needed to reinstall: to make sure that you get the latest versions of the packages which would reflect the change in the ports collection.

But if you simply would change a packages origin "because you think it's fun to break your system" then sure: there is no direct need to re-install any package dependencies because nothing substantial would have changed.

But I definitely agree that a bit more context could be useful on that tutorial page.
 

circus78

Active Member

Thanks: 4
Messages: 143

#4
You are -f forcing the reinstall.

Code:
     -R, --recursive
                When used with -f, reinstalls any packages that require the
                given package.
pkg-install(8)
Hi SirDice, ok, but what is the purpose?
Will I reinstall different version of same packages?
There is no need to "recompile" anything, as we are talking about binary packages.
Maybe this step is recommend because one will be sure to get latest version of required packages that belong to the modified one?

Thank you again
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,998
Messages: 26,762

#5
Maybe this step is recommend because one will be sure to get latest version of required packages that belong to the modified one?
Where does it say it's recommended?
 
Top