Cannot be uninstalled without installing Apache2

Bug #1076489 reported by Uqbar
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php5 (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I need to remove all HTTP related stuff.
Among these I've found the package php5-cgi.
If I ask to purge it, I am asked to install apache2. And the other way around as well.
It should be possible to purge php5-cgi without the need to install apache2.

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: php5-cgi 5.4.6-1ubuntu1
ProcVersionSignature: Ubuntu 3.5.0-18.18-lowlatency 3.5.7
Uname: Linux 3.5.0-18-lowlatency x86_64
ApportVersion: 2.6.1-0ubuntu6
Architecture: amd64
Date: Thu Nov 8 19:06:43 2012
InstallationDate: Installed on 2012-07-09 (121 days ago)
InstallationMedia: Kubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120424)
MarkForUpload: True
SourcePackage: php5
UpgradeStatus: Upgraded to quantal on 2012-10-19 (20 days ago)

Revision history for this message
Uqbar (uqbar) wrote :
Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

You are correct that this is a strange requirement, but I suspect that if this is happening to you then this is more likely due to a dependency requirement caused by some other package, rather than an issue with removing php5-cgi itself.

I've just tried purging php5-cgi on a test system, and it did not require me to install apache2.

I suspect that this is not a bug in Ubuntu, but instead being caused on your system by some other package whose dependencies can be fulfilled by installing apache2. In this case, you may find the Debug::pkgProblemResolver and/or Debug::pkgDepCache::AutoInstall debug options to apt helpful, and you may be able to get help quicker by following the community support options at http://www.ubuntu.com/support/community

Marking Incomplete as I cannot reproduce this issue. If you can provide exact steps to reproduce the problem and the exact output that you are getting (including the output of the debug options above), then please comment this and set the status back to New.

Changed in php5 (Ubuntu):
status: New → Incomplete
Revision history for this message
Ondřej Surý (ondrej) wrote :

Just also uninstall php5 package, so it doesn't pull libapache2-mod-php5 as default dependency.

Changed in php5 (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Uqbar (uqbar) wrote :

PHP5 can be used without any web related stuff.
So there is no need to pull web stuff when PHP5 is installed.
On the other side, php5-cgi does need web stuff as CGI a web technology.
Your suggestion proved to be good, though.

Changed in php5 (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Uqbar (uqbar) wrote :

I moved the status to confirmed for the considerations in the above comment #4.

Revision history for this message
Robie Basak (racb) wrote :

I don't see any issue with the current php5 dependency structure, so you need to explain what you mean in detail. Please could you explain exactly what the problem is, and how you think the dependency structure should be changed?

Changed in php5 (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Uqbar (uqbar) wrote :

I'm sorry I cannot say which dependencies I'd like to have: I have no idea.
All I can tell you is that among php5 dependencies I see:

----
libapache2-mod-php5 (>= 5.4.6-1ubuntu1) | libapache2-mod-php5filter (>= 5.4.6-1ubuntu1) | php5-cgi (>= 5.4.6-1ubuntu1) | php5-fpm (>= 5.4.6-1ubuntu1),
----
If I'm not wrong, it says that I need ad least one of them in order to have PHP5.
All of these dependencies seem to imply a web server and two imply specifically Apache2.
Which seems to be wrong in my humble opinion: I am supposed I can use PHP5 with no webserver at all.

Revision history for this message
Ondřej Surý (ondrej) wrote :

You seem to mix PHP 5 (as in the interpreter) and php5 meta-package.

It would be nice to at least read the description of the packages you are reporting bugs to:

--cut here--
Description: server-side, HTML-embedded scripting language (metapackage)
 This package is a metapackage that, when installed, guarantees that you
 have at least one of the four server-side versions of the PHP5 interpreter
 installed. Removing this package won't remove PHP5 from your system, however
 it may remove other packages that depend on this one.
--cut here--

There is no bug here, if you want to use php5 without web server feel free to remove php5 meta-package and install php5-cli package.

Revision history for this message
Uqbar (uqbar) wrote :

You are very likely right.
I tried to test a web application which needed a number of php5 stuff to be pulled.
Once I decided the tests were over, I tried to uninstall those packages.
The end situation was the one I described.

php5-cgi says:
Description-en: server-side, HTML-embedded scripting language (CGI binary)
 This package provides the /usr/lib/cgi-bin/php5 CGI interpreter built
 for use in Apache 2 with mod_actions, or any other CGI httpd that
 supports a similar mechanism. Note that MOST Apache users probably
 want the libapache2-mod-php5 package.
 The following extensions are built in: bcmath bz2 calendar Core ctype date
 dba dom ereg exif fileinfo filter ftp gettext hash iconv json libxml
 mbstring mhash openssl pcntl pcre Phar posix Reflection session shmop
 SimpleXML soap sockets SPL standard sysvmsg sysvsem sysvshm tokenizer wddx
 xml xmlreader xmlwriter zip zlib.

apache2 says:
Description-en: Apache HTTP Server metapackage
 The Apache Software Foundation's goal is to build a secure, efficient and
 extensible HTTP server as standards-compliant open source software. The
 result has long been the number one web server on the Internet.
 .
 It features support for HTTPS, virtual hosting, CGI, SSI, IPv6, easy
 scripting and database integration, request/response filtering, many
 flexible authentication schemes, and more.

I don't really understand from the descriptions how they are mutually exclusive, as seen in my 1st post.
Moreover, if one of them requires php5, that package should get expunged along with them, whichever I ask to uninstall.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for php5 (Ubuntu) because there has been no activity for 60 days.]

Changed in php5 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.