|Version 28 (modified by maphew, 12 months ago)|
- OSGeo4W command line Installer/Updater/Remover
- Installs osgeo4w\bin\apt.exe and dev-apt.py which can be launched from the OSGeo4W shell.
- Source code at http://trac.osgeo.org/osgeo4w/browser/trunk/apt
- Package: http://download.osgeo.org/osgeo4w/release/apt
- Maintained by MattWilkie
Current package version is v0.0-8. It can be found under Commandline Utilities in the setup.exe installer.
First time use, from within OSGeo4W shell:
apt setup apt install shell
apt update (fetch up-to-date setup.ini) apt install gdal (install package "gdal") apt new (show possible upgrades) apt list (show installed packages) apt available (show installation candidates) apt remove xxx (uninstall package xxx)
Other apt pages
- AptCommands - quick reference of apt parameters
- AptDevelopment - the ideas and theories which drive apt developmeant and notes on the development environment
- AptFromScratch - install osgeo4w on a completely virgin system without an installed python or o4w shell.
Changes for v0.0-8:
- r1192 - close ticket #281, by ignoring the leading dot slash in filenames (./foo.bat --> foo.bat) when searching for matches in the installed files manifest
- r1190 - #289: apt to allow trailing characters after package version number. It should allow names like xxx-3.1.1-3-devel in addition to the usual xxx-3.1.1-3
- r1188 - close #53. All commands should now exit gracefully with msg if incomplete.
- r1185 - close #285, new function to list files belonging to package X. Only works for installed packages.
- r1183 - apt now runs etc/preremove batch file for package before uninstalling. Ticket #271, please test.
- r1182 - finally realised the simplest way to deal with leftover .tmpl files is to not remove their name from the install manifest :) Closes #224.
Changes for v0.0-7:
- Apt is now packaged as a compiled apt.exe as well as source apt-dev.py. The .exe should allow replacing of itself (and other osgeo4w packages like python) in place. This comes at the cost of a larger package, up to 2.5mb from 8kb.
- a handful of small usability improvements
Changes for v0.0-3:
- Start Menu and Desktop link creation is no longer hardcoded and believed amenable to non-english locales (thanks to Luke Pinner)
- shares mirror and cache information with osgeo-setup.exe, so packages should only be downloaded once regardless which program is used.
Changes for v0.0-2:
- much better package removal (though still misses .tmpl files in ./bin and start menu shortcuts, #109)
- new command "apt available" shows packages which could be installed (previously one had to know the name already, #111)
- download percentage counter no longer reports >100% recieved
Apt.py and setup.exe use the same install database and procedures (though not code). One can switch between them at will depending on the needs of the moment. I would of course expect problems were both to run at the same time.
Configure setup.exe's cache directory to C:\Osgeo4W\var\cache\setup to avoid duplicating downloads. (no longer needed post v0.0-3)
I've been using apt.py without significant issues for several years, nevertheless I still consider this alpha software. This is my first real software development project and I've no formal training. It works as well as it does because the original author, Jan Nieuwenhuizen, knew what he was doing when he wrote cyg-apt for cygwin.
The biggest functional problem is that uninstall is not yet comprehensive. There is little error trapping and not enough feedback on commands. For example "apt remove" just silently exits back to the shell prompt when it should respond with a usage message ("apt remove [package_name]"), at the least. (#53). The biggest code problem is that apt is still largely procedural and needs to be refactored into proper functions, classes etc. to allow for easier future improvement.
Feedback is welcome, especially on programming advice! Please use the o4w trac for logging bugs.
- apt intolerant of filename missing package version number
- apt misses menu and desktop link variables in postinstall
- apt remove or upgrade fails on read-only files
- apt doesn't run preremove batch files
- apt unicode error
- apt on virgin install from setup.exe complains environment not set
- apt fails upgrading or removing python package
- apt unicode error between r1131 and r1148
- apt doesn't install dependencies first
- apt does not always save the last used mirror
Recently closed tickets
- `etc/postinstall/qgis-common.bat` doesn't run properly
- apt upgrade error "ValueError: list.remove(x): x not in list"
- pkg-apt: "apt [command]" with no parameters does not return an error or message
- apt leaves behind 'o4w_env.bat.tmpl'
- apt: udate tarfile + bzip2 libraries
- apt fails to download setup.ini
These fine people have made this program better than I could have managed on my own:
Jeremy Palmer, Land Information New Zealand (dependencies 1st, menu name); Luke Pinner, Australia Department of the Environment, Water, Heritage and the Arts (windows special folders); Jan Nieuwenhuizen (original cyg-apt author).