-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed with new error #40
Comments
Annotation: apt remove apache doesn't work either. It's because it installs as a service, so you can't delete open files (eg. httpd.exe) and apt will quit with error. Do we follow the right uninstall way? Do we use preremove-batch files? But Apache has not a preremove. Could we use informaton from get_menu_entries()? Should we warn explicitly with the apache-package? How do we know, that a package installs a service? |
I'd consider that a package bug - it should have a preremove and take care of what it installed. |
Still it's a packaging bug - setup will not remove the service, just the files on reboot. OSGeo4W bugs are filed on OSGeo4W's trac. |
Thank you, I found it.
|
It's for cleaner uninstall. Apt uses I consider failing to creating menu links when setup.exe does a bug, even though the package itself has problems. |
You correctly identified the troublesome line in the postinstall/apache.bat, but didn't completely catch the nature of the mistake. The preceeding lines are quoting the arguments, not \path\to\httpd.exe. Note the space after .exe in first line:
...though really not quoting the path as well means the commands will fail on a path with spaces (so, two mistakes). Did you create a packaging ticket on Osgeo4w trac? Hmm, we have an omission in |
Apt does install apache menu links if the command shell is running in elevated mode. Same for uninstall. There is also something broken in To defend against malformed batch files in postinstall, or anywhere else for that matter, I think apt will need to record the manifest etc. as it goes, and not just all at the end. |
I agree with logging, it is possible through subprocess. But I never tried. And also we can look at the return code, if it's not Null, we shouldn't rename to x.done, may be it can be fixed by the user! We also should give a hint to call remove and try again or something like that. try:
# 'install' and 'source keys have compound values, atomize them
d['zip_path'],d['zip_size'],d['md5'] = d['install'].split()
except KeyError as e:
d['zip_path'],d['zip_size'],d['md5'] = ('', '', '')
if debug:
print "\n*** Warning: '%s' is missing %s entry in setup.ini. This might cause problems.\n" % (p, e)
except Exception as e:
print "unknown error parsing package", d
print "*** %s" % e.message
d['zip_path'],d['zip_size'],d['md5'] = ('', '', '') |
I'm marking this closed. The problem which started this ticket has been resolved, in that apt copes the best it can with installing Apache even though the package itself is broken, and exits gracefully. It also now emits an warning when encountering difficulties parsing archive paths, as per the example above. With the current structure I don't want to just refuse to rename batch files as It is problematic that the failures and warnings issued by batch files are intermingled with Apt's own messages. A way forward might be to force batch messages to a separate console and/or log file This would be tracked as a feature enhancement. More gracefully handling not being in an elevated shell is something I'd like to see someday; that would be a new feature too. ;-) |
My last commit on amr66/apt now allows to download tinyows and dependencies, but it fails with apache. I got a message from shlex called by get_menu_links(). I didn't try much further, but it seems to be a link in apache.bat.done that causes an exception on link = shlex.split(line)[1]. Error is "Value Error: No closing quatation". Line from bat is:
xxmklink "%OSGEO4W_STARTMENU%\Apache\OSGEO4W-Apache-Monitor.lnk" %OSGEO4W_ROOT%\Apache\bin\ApacheMonitor.exe"
Is this a " which is missing in front of %OSGEO4W_ROOT%?
PS:
I just tried to install with setup exe: It works, even the start menu entries are there,
so by the way: why do we do this: parsing a batch file that has already finished it's work? What intention is behind get_menu_entries?
The text was updated successfully, but these errors were encountered: