Recent comments posted to this site:
cp
command follows symlinks by default (I thought it didn't).
I have an issue with direct mode: I have tons of symlinks that points to the git-annex store, while in direct mode. After investigation, I found that these files don't seem to be part of the repository. I can check with:
$ git -c core.bare=false status --porcelain tr.html
?? Documentation/Mozilla/developer.mozilla.org/tr.html
$ ls -l tr.html
lrwxrwxrwx 1 mildred mildred 205 10 juin 16:22 tr.html -> ../../../.git/annex/objects/gF/z1/SHA256E-s31895--c873982bd742ba8db6e026afee26b7ab2f75f54f587304d8c2d877db3900c0f6.html/SHA256E-s31895--c873982bd742ba8db6e026afee26b7ab2f75f54f587304d8c2d877db3900c0f6.html
The link is valid, and is probably pointing to a unused file in the annex store. How to add these files back?
If I was in indirect mode, I could simply use git add tr.html
(and not git annex add
). This would stage to the git staging area the symlink, and all would be well.
I found that in direct mode, the same was true. The command is:
git -c core.bare=false add tr.html
The file is added to the repository, and the link is converted to the target file. The question now is why? There is no hook on the add command. Could it be the annex assistant? If that didn't worked, my question would have been: how to checkout a file in direct mode?
@Daniel, I suggest you either follow the instuctions above, or if you don't want to follow the instructions, follow the error messages. :P In this case, the instructions say to do:
PATH=$HOME/bin:$PATH cabal install c2hs --bindir=$HOME/bin
Which is exactly to work around the problem that we can see in your transcript: Installing executable(s) in /root/.cabal/bin
Also, to reiterate the top of the page: If you are not comfortable tracking down and dealing with library build problems, installing git-annex with cabal is probably not the right choice for you!
lyriondesktop:/home/zilti/tmp # cabal install c2hs
Resolving dependencies...
Configuring c2hs-0.17.2...
Building c2hs-0.17.2...
Preprocessing executable 'c2hs' for c2hs-0.17.2...
[ 1 of 26] Compiling Data.DLists ( src/Data/DLists.hs, dist/build/c2hs/c2hs-tmp/Data/DLists.o )
[ 2 of 26] Compiling Control.StateTrans ( src/Control/StateTrans.hs, dist/build/c2hs/c2hs-tmp/Control/StateTrans.o )
src/Control/StateTrans.hs:77:1: Warning:
Module `Prelude' does not export `catch'
[ 3 of 26] Compiling Data.Errors ( src/Data/Errors.hs, dist/build/c2hs/c2hs-tmp/Data/Errors.o )
[ 4 of 26] Compiling Data.Attributes ( src/Data/Attributes.hs, dist/build/c2hs/c2hs-tmp/Data/Attributes.o )
[ 5 of 26] Compiling Text.Lexers ( src/Text/Lexers.hs, dist/build/c2hs/c2hs-tmp/Text/Lexers.o )
[ 6 of 26] Compiling Control.StateBase ( src/Control/StateBase.hs, dist/build/c2hs/c2hs-tmp/Control/StateBase.o )
[ 7 of 26] Compiling Data.NameSpaces ( src/Data/NameSpaces.hs, dist/build/c2hs/c2hs-tmp/Data/NameSpaces.o )
[ 8 of 26] Compiling C2HS.C.Attrs ( src/C2HS/C/Attrs.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Attrs.o )
[ 9 of 26] Compiling C2HS.C.Builtin ( src/C2HS/C/Builtin.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Builtin.o )
[10 of 26] Compiling Paths_c2hs ( dist/build/autogen/Paths_c2hs.hs, dist/build/c2hs/c2hs-tmp/Paths_c2hs.o )
[11 of 26] Compiling C2HS.Config ( src/C2HS/Config.hs, dist/build/c2hs/c2hs-tmp/C2HS/Config.o )
[12 of 26] Compiling C2HS.Switches ( src/C2HS/Switches.hs, dist/build/c2hs/c2hs-tmp/C2HS/Switches.o )
[13 of 26] Compiling C2HS.Version ( src/C2HS/Version.hs, dist/build/c2hs/c2hs-tmp/C2HS/Version.o )
[14 of 26] Compiling System.CIO ( src/System/CIO.hs, dist/build/c2hs/c2hs-tmp/System/CIO.o )
[15 of 26] Compiling Control.State ( src/Control/State.hs, dist/build/c2hs/c2hs-tmp/Control/State.o )
[16 of 26] Compiling C2HS.State ( src/C2HS/State.hs, dist/build/c2hs/c2hs-tmp/C2HS/State.o )
[17 of 26] Compiling C2HS.CHS.Lexer ( src/C2HS/CHS/Lexer.hs, dist/build/c2hs/c2hs-tmp/C2HS/CHS/Lexer.o )
src/C2HS/CHS/Lexer.hs:612:16: Warning:
Defined but not used: `lexeme'
[18 of 26] Compiling C2HS.CHS ( src/C2HS/CHS.hs, dist/build/c2hs/c2hs-tmp/C2HS/CHS.o )
[19 of 26] Compiling C2HS.Gen.Header ( src/C2HS/Gen/Header.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Header.o )
[20 of 26] Compiling C2HS.C.Trav ( src/C2HS/C/Trav.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Trav.o )
[21 of 26] Compiling C2HS.C.Names ( src/C2HS/C/Names.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Names.o )
[22 of 26] Compiling C2HS.C ( src/C2HS/C.hs, dist/build/c2hs/c2hs-tmp/C2HS/C.o )
[23 of 26] Compiling C2HS.Gen.Monad ( src/C2HS/Gen/Monad.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Monad.o )
src/C2HS/Gen/Monad.hs:227:10: Warning:
Orphan instance: instance Read Ident
[24 of 26] Compiling C2HS.C.Info ( src/C2HS/C/Info.hs, dist/build/c2hs/c2hs-tmp/C2HS/C/Info.o )
[25 of 26] Compiling C2HS.Gen.Bind ( src/C2HS/Gen/Bind.hs, dist/build/c2hs/c2hs-tmp/C2HS/Gen/Bind.o )
src/C2HS/Gen/Bind.hs:971:43: Warning:
In the use of `posColumn' (imported from Language.C.Data.Position):
Deprecated: "column number information is inaccurate in presence of macros - do not rely on it."
src/C2HS/Gen/Bind.hs:789:10: Warning:
Orphan instance: instance Num CInteger
[26 of 26] Compiling Main ( src/Main.hs, dist/build/c2hs/c2hs-tmp/Main.o )
Linking dist/build/c2hs/c2hs ...
Installing executable(s) in /root/.cabal/bin
Installed c2hs-0.17.2
lyriondesktop:/home/zilti/tmp # cabal install git-annex
Resolving dependencies...
Configuring gnuidn-0.2.1...
cabal: The program c2hs is required but it could not be found.
Failed to install gnuidn-0.2.1
cabal: Error: some packages failed to install:
git-annex-5.20140709 depends on gnuidn-0.2.1 which failed to install.
gnuidn-0.2.1 failed during the configure step. The exception was:
ExitFailure 1
network-protocol-xmpp-0.4.6 depends on gnuidn-0.2.1 which failed to install.
https://hackage.haskell.org/package/safe
A library wrapping Prelude/Data.List functions that can throw exceptions, such as head and !!. Each unsafe function has up to four variants, e.g. with tail:
tail :: [a] -> [a], raises an error on tail []. tailMay :: [a] -> Maybe [a], turns errors into Nothing. tailDef :: [a] -> [a] -> [a], takes a default to return on errors. tailNote :: String -> [a] -> [a], takes an extra argument which supplements the error message. tailSafe :: [a] -> [a], returns some sensible default if possible, [] in the case of tail.
Good idea, Sazius!
I've made importfeed store the metadata, as long as annex.genmetadata is set in .git/config.
itemdescription
is something I can include in the template for the filename, but the descriptions can be really long... doesn't seem very elegant to have that in the file name. Could the description for example be included as metadata of the item?
I kinda wish people would post questions to the forum, and not clutter up this page..
Anyway, there have been past bugs in the direct mode code that caused some files to not be checked out in direct mode, but stay as symlinks pointing at the content. That can be fixed by running
git annex fsck
. But, I am not aware of any problem that can leave a git-annex symlink that is not checked into git at all. Perhaps you copied the symlink from another location?