# Ports and package confusion....



## pestslent1 (Mar 14, 2019)

I am running 12.0-RELEASE-p3. To start I know they should not be mixed (Ports & Packages). That being said, mine are. I have been looking for an answer to these questions, I have search around and seem to get more confused.
How can I simply find what is installed on my box from pkg install and what was installed from ports.
When I pkg update/pkg upgrade and everything is up to date, I then portsnap fetch /portsnap update. When I pkg version -vL= , the list is extensive and I may be mistaken but some of the entries I thought I installed using pkg install (they are mostly plasma5, kde, kf5, py27 and related dependencies). 
In the past when I updated my system the same way as above and ran pkg version -vL=, the list was only a few entries and I was able to get everything up to date.
When I check "/usr/ports/UPDATING", to update that many ports, I get overwhelmed and am not sure how to use it. 
Can someone simply explain how find what is installed on my box from pkg install and what was installed from ports. I may not even be understanding it correctly.

On another note when I freebsd-update fetch, in the bottom left of the terminal it says (END). when I press enter I just get a long list of ~, I then :q to get the end and state of my install, back to the prompt. Am I missing information by :q or is there another way to get rid of the (END)?

Thanks,
Pete K


----------



## Sevendogsbsd (Mar 14, 2019)

So, not sure you can tell what was installed via pkg or ports because ports installs are packages as well. Someone much smarter at this may have an answer though!

As for the last issue, this is the change of pager in 12.0 - what is your current pager set to for the root user? More or less? Set it to the opposite of what it is now and that issue will go away.


----------



## SirDice (Mar 14, 2019)

pestslent1 said:


> When I pkg update/pkg upgrade and everything is up to date, I then portsnap fetch /portsnap update. When I pkg version -vL= , the list is extensive and I may be mistaken but some of the entries I thought I installed using pkg install (they are mostly plasma5, kde, kf5, py27 and related dependencies).


Your packages likely came from the quarterly set, which is the default on -RELEASE versions. A portsnap(8) fetches a ports tree with the latest sets. The latest set is updated almost constantly. A quarterly set is updated once every three months and only receives security and stability updates. As you are now close to the end of Q1 (Q2 will be made at the beginning of April) the difference between quarterly and latest can be significant.


----------



## pestslent1 (Mar 14, 2019)

Sevendogsbsd said:


> So, not sure you can tell what was installed via pkg or ports because ports installs are packages as well. Someone much smarter at this may have an answer though!
> 
> As for the last issue, this is the change of pager in 12.0 - what is your current pager set to for the root user? More or less? Set it to the opposite of what it is now and that issue will go away.


Is "pager" a file?


----------



## Sevendogsbsd (Mar 14, 2019)

No, sorry, pager is an entry in root's .cshrc . 12.0 changed it to `less`. To go back to the original behavior, change it to `more`. As root, edit .cshrc to change this.


----------



## hukadan (Mar 14, 2019)

pestslent1 said:


> How can I simply find what is installed on my box from pkg install and what was installed from ports.



I made a quick test. The packages installed with ports(7) do not have a repository annotation. So, I could make the difference with the following commands:


> % pkg query -e '%a = 0' '%o %At' | grep repository | cut -d " " -f1 > pkg_from_repo.txt
> % pkg query -e '%a = 0' %o > all_pkg.txt
> % diff pkg_from_repo.txt all_pkg.txt


I am almost sure the grep/cut part can be achieved with pkg-query(8) alone, but I was not smart/patient enough to find out how.

-- Edit --
The exemple is only for non-automatic packages. For automatic packages, just replace `pkg query -e '%a = 0'` by `pkg query -e '%a = [B]1[/B]'`.


----------



## SirDice (Mar 14, 2019)

pestslent1 said:


> Is "pager" a file?


PAGER is an environment variable, you can use it to set it to your favorite pager. Common choices are less(1) and more(1).


----------

