{"thread":{"id":"14340","subject":"uninstalling Git","startedAt":"2008-07-08T04:57:20Z","lastAt":"2008-07-08T06:28:33Z","messageCount":3,"participants":["Christian Jaeger","Eric Hanchrow","Matthieu Moy"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"82550","messageId":"4872F3B0.6050406@jaeger.mine.nu","threadId":"14340","inReplyTo":null,"subject":"uninstalling Git","fromName":"Christian Jaeger","fromEmail":"christian@jaeger.mine.nu","sentAt":"2008-07-08T04:57:20Z","receivedAt":"2008-07-08T04:57:20Z","isPatch":false,"sender":{"key":"christian@jaeger.mine.nu","avatar":null},"body":"Hello,\n\nThere are two situations where I'm missing a way to uninstall Git:\n\n- accidental install with prefix=/usr instead of prefix=/usr/local which \nI usually choose\n- removing cruft from older gits, like tools and their man/info pages \nwhich don't exist anymore in newer Git releases\n\nI wonder why there's no \"uninstall\" make target. Ok, maybe some people \nwould argue that installing and uninstalling software through make has \nnever been the best way, but usually I don't have problems with software \nproviding \"make uninstall\", and I'm left with no solution for the above \nonce I choose to use \"make install\" for Git.\n\n[\nWell, there's the \"checkinstall\" tool, but for some reason using \ncheckinstall (version 1.6.1(-7) from Debian lenny) leads to some strange \nproblems:\n\nat first I always got (with a fresh tree):\n\n...\nif test -r /usr/share/info/dir; then \\\n      install-info --info-dir=/usr/share/info git.info ;\\\n      install-info --info-dir=/usr/share/info gitman.info ;\\\n    else \\\n      echo \"No directory found in /usr/share/info\" >&2 ; \\\n    fi\n\nNo `START-INFO-DIR-ENTRY' and no `This file documents'.\ninstall-info(git.info): unable to determine description for `dir' entry \n- giving up\n\nNo `START-INFO-DIR-ENTRY' and no `This file documents'.\ninstall-info(gitman.info): unable to determine description for `dir' \nentry - giving up\nmake[1]: *** [install-info] Error 1\nmake[1]: Leaving directory `/usr/src/GIT/T/git.1/Documentation'\nmake: *** [install-info] Error 2\n\n\nand now I'm consistently getting (each time with a fresh tree):\n\nasciidoc -b docbook -d book user-manual.txt\nFAILED: unexpected error:\n------------------------------------------------------------\nTraceback (most recent call last):\n  File \"/usr/bin/asciidoc\", line 4014, in asciidoc\n    config.load_all(CONF_DIR)\n  File \"/usr/bin/asciidoc\", line 3637, in load_all\n    for f in os.listdir(filters):\nOSError: [Errno 2] No such file or directory: '/etc/asciidoc/filters'\n...\n\n\nand now, again with a fresh tree but without -j2:\n\n# checkinstall make prefix=/usr install install-doc install-info\n...\nasciidoc -b docbook -d manpage -f asciidoc.conf \\\n         -agit_version=1.5.6.GIT -o git-add.xml+ git-add.txt\nFAILED: unexpected error:\n------------------------------------------------------------\nTraceback (most recent call last):\n  File \"/usr/bin/asciidoc\", line 4014, in asciidoc\n    config.load_all(CONF_DIR)\n  File \"/usr/bin/asciidoc\", line 3637, in load_all\n    for f in os.listdir(filters):\nOSError: [Errno 2] No such file or directory: '/etc/asciidoc/filters'\n------------------------------------------------------------\nmake[1]: *** [git-add.xml] Error 1\nmake[1]: Leaving directory `/usr/src/GIT/T/git.1/Documentation'\nmake: *** [install-doc] Error 2\n\n****  Installation failed. Aborting package creation.\n\nCleaning up...OK\n\nBye.\n\n\nwhere /etc/asciidoc/filters clearly is a non-empty directory. It seems \nto behave non-deterministically. So my guess is that checkinstall is \nusing LD_PRELOAD tricks or some such and just doesn't work for the task \nhere, at least not without fixing something.\n]\n\nSo,\n- is there any (good?) reason there is no uninstall target? Should I \nlook into creating one?\n- do you have better or working alternative suggestions?\n\nActually I'd be happy if there are more elegant solutions than make \nuninstall, since there is the race/hen-and-egg problem of having to run \n\"make uninstall\" from the tree before checking out the new version, and \nchecking out the new version of course needs git, meaning the \"right\" \napproach would be to keep the working dir of the last install for the \npurpose of uninstallation until after having built the new version. \nMaybe it's enough to just keep the toplevel Makefile, but that would be \nmaking assumptions. Maybe I should talk with the Debian people about how \nto build debs easily for such purposes (and not using the standard \nDebian packages -- I'd really like to just have an own single package \nwithout any applied patches etc.)?\n\nThanks,\nChristian.\n"},{"id":"82555","messageId":"87od59c58s.fsf@offby1.atm01.sea.blarg.net","threadId":"14340","inReplyTo":"4872F3B0.6050406@jaeger.mine.nu","subject":"Re: uninstalling Git","fromName":"Eric Hanchrow","fromEmail":"offby1@blarg.net","sentAt":"2008-07-08T05:30:27Z","receivedAt":"2008-07-08T05:30:27Z","isPatch":false,"sender":{"key":"eric.hanchrow@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3145?v=4"},"body":">>>>> \"Christian\" == Christian Jaeger <christian@jaeger.mine.nu> writes:\n\n    Christian> I wonder why there's no \"uninstall\" make target.  \n\nThis is a problem with lots of packages, not just git.  Here are two\nthings I do:\n            \n* When I remember, I use \"gnu stow\" to manage installations; doing so\n  makes uninstallation easy.\n\n* Failing that, I run\n\n        find /usr -printf '%T@ ' -ls | sort -n | cut -d\\  -f 2-\n\n  and assume that all the installed files have the same last-modified\n  timestamps -- once you've found one of them in that pipeline's output,\n  you've found them all, since they'll all be adjacent.\n\n-- \nAsking the Iraqi people to assume Saddam's debts\nis rather like telling a man who has been shot in the head\nthat he has to pay for the bullet.\n        -- James Surowiecki\n"},{"id":"82560","messageId":"vpqtzf0vqi6.fsf@bauges.imag.fr","threadId":"14340","inReplyTo":"87od59c58s.fsf@offby1.atm01.sea.blarg.net","subject":"Re: uninstalling Git","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2008-07-08T06:28:33Z","receivedAt":"2008-07-08T06:28:33Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"Eric Hanchrow <offby1@blarg.net> writes:\n\n> * Failing that, I run\n>\n>         find /usr -printf '%T@ ' -ls | sort -n | cut -d\\  -f 2-\n>\n\nI usualy do\n\ntouch /tmp/dumb.txt\nmake install\nfind /usr -newer /tmp/dumb.txt\n\nfor that.\n\n-- \nMatthieu\n"}]}