Bug 202595 - assumption about PHP installed from existence of php.conf in /etc and /usr/local/etc
Summary: assumption about PHP installed from existence of php.conf in /etc and /usr/lo...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alex Dupre
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-23 14:12 UTC by bugzilla@logicalsolutns.com
Modified: 2018-05-31 03:13 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bugzilla@logicalsolutns.com 2015-08-23 14:12:53 UTC
pkg version (relatively) recently began showing ">" for ports that were updated with portupgrade

For example:
[root@kahlua]:[~]# pkg version -v | grep -v =
gettext-0.19.5.1                   >   succeeds index (index has 0.19.4)
gettext-runtime-0.19.5.1           >   succeeds index (index has 0.19.4)
gettext-tools-0.19.5.1             >   succeeds index (index has 0.19.4)
linux_base-c6-6.6_6                >   succeeds index (index has 6.6_5)

after numerous unsuccessful attempts to get pkg to update it's index - with no errors ever being reported, I attempted to rebuild the index with make -C /usr/ports index resulted in syntax errors in the script.

Generating INDEX-8 - please wait../usr/local/bin/php-config: not found
"/usr/ports/Mk/bsd.php.mk", line 156: Malformed conditional (${PHP_VER} == 53)
"/usr/ports/Mk/bsd.php.mk", line 317: Malformed conditional (${PHP_VER} == 55 || ${PHP_VER} == 56)
Error expanding embedded variable.
===> archivers/pear-File_Archive failed
*** Error code 1
1 error


I tracked this error down to the existence of EMPTY  /usr/local/etc/php.conf & /usr/local/etc/php.ini files with corresponding symlinks in /etc

Removing those empty files, and rebuilding the index resolved the errant report from pkg version

****

In my opinion, the mere existence of empty php.conf or .ini files should NOT imply php is installed on the system and should not trigger php scripts to be run or tested.

(e.g. In my case I want those empty files to exist and be attribute locked - even if they are empty and even when php is not installed.)

It's also a bit disappointing that NO ERRORS were being generated for "pkg update" or "pkg update -f". Everything just seemed to be happy - except pkg version was showing "newer ports than indexed" as installed - and newer port releases were not triggering "<" (needs updated) - note: portupgrade was updating ports even though "pkg version" didn't show them as outdated.
Comment 1 Mathieu Arnold freebsd_committer freebsd_triage 2015-08-23 22:03:45 UTC
Do note that FreeBSD 8 is not supported.
Comment 2 bugzilla@logicalsolutns.com 2015-08-23 22:48:06 UTC
(In reply to Mathieu Arnold from comment #1)

And presumably this is not a version-specific issue.
Comment 3 bugzilla@logicalsolutns.com 2015-08-25 15:02:41 UTC
To clarify:

a) I realize FreeBSD 8 is no longer supported
b) I realize that the "supersedes" message is very likely due to the master INDEX no longer being updated on the public repositories

This bug report is because the "make -C /usr/ports index" command fails when php.conf exists.
Removing the empty php.conf file and symlink allowed a successful manual rebuild of the INDEX file.

I suspect this issue is not specifically related to version FBSD 8.x, although it manifested itself because I needed to initiate a manual rebuild of the INDEX.
Comment 4 John Marino freebsd_committer freebsd_triage 2016-08-18 23:05:29 UTC
This seems to be a report on Mk/Uses/php.mk, so assign to ale@ (who is free to reassign if the assumption is wrong, but It seems right to me)
Comment 5 Walter Schwarzenfeld 2018-01-13 22:33:46 UTC
Maintainer feedback?