# How to reshow post installation notes?



## dubby (Dec 24, 2017)

When a package is installed, you are presented with a list of tasks (usually file edits) to do to complete installation of that package. Is there a way to reshow these tasks? I installed Xorg but have missed what the tasks were.

Also, as I don't have Xorg working yet, the default terminal does not let me page up to see the beginning of the messages. Is there a way to work around that?


----------



## scottro (Dec 24, 2017)

pkg info -D <pkg_name>, e.g.
`pkg info -D fcitx-mozc`
If you have ports, then it's also usually in the port's directory as pkg-message.


----------



## tobik@ (Dec 24, 2017)

dubby said:


> Also, as I don't have Xorg working yet, the default terminal does not let me page up to see the beginning of the messages. Is there a way to work around that?


Press Scroll Lock and you can scroll up/down with the arrow keys or Page Up/Down. Press it again to get out of it.


----------



## Snurg (Dec 24, 2017)

scottro and tobik@, that are good ideas but probably not exactly what users like me and the OP actually need.
This problem annoyed me often.
And so I made a Christmas gift for all of us out of it.
Save this script as "showpostinstallnotes" or the like and make it executable, or execute it with perl <filename>.

```
#!/usr/bin/env perl
my $sps = '#######################################################################';
my $spl = '############################################################################################';
my ($pkgswithnotes, $pkgswithnotesandnomaint, $pkgswithnomaint);
my ($pkgswithnotescnt, $pkgswithnotesandnomaintcnt, $pkgswithnomaintcnt) = (0, 0, 0);
my $pkglist = `pkg info`;
$pkglist =~ s/^(\S+?) .*$/$1/mg;
my @pkga = split /\n/, $pkglist;
my $pinstinfo = '';
foreach my $p (@pkga) {
  my ($pkg) = $p =~ /^([^:]*)/;
  my ($pkgm) = $pkg =~ /^(.*?)[^-]*$/;
  chop $pkgm;
  my $s = `pkg info -D $p`;
  next if (index( $s, "\n") == (length($s)-1));
  if (index( $s, "port currently does not have a maintainer") != -1) {
    if ($s =~ /\#maintain-port\n$/) {
      if ($s =~ /^$pkg:\nAlways:\n===>   NOTICE:\n\nThe $pkgm port currently does not have a maintainer/ ) {
        $pkgswithnotesandnomaint .= (length( $pkgswithnotesandnomaint)) ? " $pkgm" : $pkgm;
        $pkgswithnomaint .= (length( $pkgswithnomaint)) ? " $pkgm" : $pkgm;
        $pkgswithnomaint .= (length( $pkgswithnomaint)) ? " $pkgm" : $pkgm;
        ++$pkgswithnomaintcnt;
        next;
      } else {
        ++$pkgswithnotesandnomaintcnt;
        ++$pkgswithnomaintcnt;
  } } }
  $pinstinfo .= "\n$spl\n$sps\n$sps            $pkgm\n$sps\n$spl\n$s\n"
}
($pinstinfo .= "\n$spl\n$sps\n$sps            Packages Without Maintainer: $pkgswithnomaintcnt\n$sps\n$spl\n"
                   . "List: $pkgswithnomaint\n") if $pkgswithnomaintcnt;
($pinstinfo .= "\n$spl\n$sps\n$sps            Packages With Notes, But Without Maintainer: $pkgswithnotesandnomaintcnt\n$sps\n$spl\n"
                   . "List: $pkgswithnotesandnomaint\n") if $pkgswithnotesandnomaintcnt;
print $pinstinfo;
```
Enjoy!
Happy Christmas!


----------



## Deleted member 48958 (Dec 24, 2017)

Just cd into port dir:
`% cd /usr/ports/your/port`
And view package maessage:
`% cat pkg-message`


----------



## SirDice (Dec 24, 2017)

A `pkg info -a -D` shows the pkg-message for every installed package.



ILUXA said:


> Just cd into port dir:
> `% cd /usr/ports/your/port`
> And view package maessage:
> `% cat pkg-message`


Some ports/packages have a dynamically generated pkg-message, if for example, it contains adjustable paths. Then this file won't exist. Instead it'll be in files/pkg-message.in and contain a bunch of macros.


----------



## dubby (Dec 24, 2017)

I'm on mobile so custom responses may be a little tough. I've tried all suggestions from above but there seems to be a lack messages for xorg. 

Also, the script from smurg fails to run with a syntax error complaining of a missing semicolon although it looks fine.

I tried uninstalling and reinstalling xorg but it doesn't repeat the post installation notes.


----------



## Deleted member 48958 (Dec 24, 2017)

SirDice said:


> Some ports/packages have a dynamically generated pkg-message, if for example, it contains adjustable paths. Then this file won't exist. Instead it'll be in files/pkg-message.in and contain a bunch of macros.


Then in such cases:
`% cd /usr/ports/your/port`
`% cat files/pkg-message.in`


----------



## chrbr (Dec 24, 2017)

The easiest work arround might be to start script(1) before performing the installation. After quitting script dig in the script's output file for the desired notes.


----------



## talsamon (Dec 24, 2017)

`portless packagename`:  Without parameter shows pkg-descr., with -M the Makefile , with -p pkg-plist, with -i distinfo.


----------



## dubby (Dec 24, 2017)

ILUXA said:


> Then in such cases:
> % cd /usr/ports/your/port
> % cat files/pkg-message.in


There are 1316 files named pkg-message.in, however none of them seem to be related to Xorg. Could you be more specific?


----------



## dubby (Dec 24, 2017)

talsamon said:


> portless packagename


Should `portless` be a command? I'm getting `command not found`. I have been away from FreeBSD for 10 years and so much has changed.


----------



## talsamon (Dec 24, 2017)

Yes, and this is the port:  ports-mgmt/portless .

Edit:  I forgot the "main thing" with -m pkg-message.


----------

