Re: svgalib build fail with portmaster

From: Tomoaki AOKI <junchoon_at_dec.sakura.ne.jp>
Date: Wed, 20 Jul 2022 12:55:04 UTC
On Wed, 20 Jul 2022 22:05:19 +1000
Andy Farkas <andyf@andyit.com.au> wrote:

> 
> If I use portmaster to re-build all of my ports it fails at svgalib:
> 
> %%%
> # portmaster -adf
> ...
> gmake[2]: Leaving directory 
> '/usr/ports/work/usr/ports/graphics/svgalib/work/svgalib-1.4.3/doc'
> 
> Now run 'make demoprogs' to make the test and demo programs in demos/ 
> and threedkit/.
> gmake[1]: Leaving directory 
> '/usr/ports/work/usr/ports/graphics/svgalib/work/svgalib-1.4.3'
> cd 
> /usr/ports/work/usr/ports/graphics/svgalib/work/svgalib-1.4.3/include/linux 
> &&  install  -m 0644 keyboard.h kd.h 
> /usr/ports/work/usr/ports/graphics/svgalib/work/stage/usr/local/include/linux
> ====> Compressing man pages (compress-man)
> 
> ===>>> Creating a backup package for old version svgalib-1.4.3_7
> Creating package for svgalib-1.4.3_7
> pkg-static: file '/usr/local/bin/dumpreg' is missing
> pkg-static: package creation failed
> 
> ===>>> Package creation failed for svgalib-1.4.3_7!
> 
> ===>>> Ignore this error  [i]
> ===>>> Abort update       [a]
> ===>>> Retry              [r]
> 
> ===>>> How would you like to proceed? [i]
> %%%
> 
> 
> But if I do it manually it works:
> 
> %%%
> root:~ # cd /usr/ports/graphics/svgalib/
> root:/usr/ports/graphics/svgalib # make clean ; make all ; make install
> ...
> ===>  Installing for svgalib-1.4.3_7
> ...
> ===>  Checking if svgalib is already installed
> ...
> ===>   Registering installation for svgalib-1.4.3_7
> ...
> Installing svgalib-1.4.3_7...
> ...
> ===>   NOTICE:
> The svgalib port currently does not have a maintainer. As a result, it is
> more likely to have unresolved issues, not be up-to-date, or even be 
> removed in
> the future. To volunteer to maintain this port, please create an issue at:
> 
> https://bugs.freebsd.org/bugzilla
> 
> More information about port maintainership is available at:
> 
> https://docs.freebsd.org/en/articles/contributing/#ports-contributing
> 
> root@mater:/usr/ports/graphics/svgalib #
> %%%
> 
> 
> What am I doing wrong?
> 
> -andyf

I'm not at all familiar with portmaster (I habitally use portupgrade),
but your problem happenes at "Creating a backup Creating a backup
package for old version svgalib-1.4.3_7" phase.

You would have deleted (regardless intentionally or accidentally) the
pointed file (/usr/local/bin/dumpreg).

Why direct `make clean ; make all ; make install` worked fine is that
the process not at all containes backup phase.

 *For upgrading, usually it should be
    `make clean && make all && make deinstall && make reinstall \
     && make clean`
  to be sure each phase finishes successfully and no unneeded remnants
  remains (except configuration files). (A bit paranoid.)


Looking into commit log at cgit [1], the problematic file is already
there at the first commit and unchanged afterwards. So the file should
be there when you installed (or previously updated).

Another possiblity would be you changed LOCALBASE when you installed
(or updated) previouly but portmaster doesn't recorded the fact
properly. (i.e., the port was installed under /opt/, but portmaster
looks for /usr/local due to mis-recorded LOCALBASE.)
But this case you SHOULD know and notice what happened clearly.


[1] https://cgit.freebsd.org/ports/log/graphics/svgalib/pkg-plist

-- 
Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>