cabal unpack --pristine
Without --pristine, cabal will update the package's cabal file if a newer one is available in hackage. But that can break applying patches. Especially since the new version from hackage can apparently have dos line endings, while the version from the tarball doesn't.
This commit is contained in:
		
					parent
					
						
							
								9dbd2ff6c2
							
						
					
				
			
			
				commit
				
					
						33d6057ca3
					
				
			
		
					 2 changed files with 4 additions and 4 deletions
				
			
		| 
						 | 
					@ -32,9 +32,9 @@ patched () {
 | 
				
			||||||
		ver="$(grep " $pkg " ../cabal.config | cut -d= -f 3 | sed 's/,$//')"
 | 
							ver="$(grep " $pkg " ../cabal.config | cut -d= -f 3 | sed 's/,$//')"
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	if [ -z "$ver" ]; then
 | 
						if [ -z "$ver" ]; then
 | 
				
			||||||
		cabal unpack $pkg
 | 
							cabal unpack --pristine $pkg
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		cabal unpack $pkg-$ver
 | 
							cabal unpack --pristine $pkg-$ver
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	cd $pkg*
 | 
						cd $pkg*
 | 
				
			||||||
	git init
 | 
						git init
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -28,9 +28,9 @@ patched () {
 | 
				
			||||||
                ver="$(grep " $pkg " ../cabal.config | cut -d= -f 3 | sed 's/,$//')"
 | 
					                ver="$(grep " $pkg " ../cabal.config | cut -d= -f 3 | sed 's/,$//')"
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
        if [ -z "$ver" ]; then
 | 
					        if [ -z "$ver" ]; then
 | 
				
			||||||
                cabal unpack $pkg
 | 
					                cabal unpack --pristine $pkg
 | 
				
			||||||
        else
 | 
					        else
 | 
				
			||||||
                cabal unpack $pkg-$ver
 | 
					                cabal unpack --pristine $pkg-$ver
 | 
				
			||||||
        fi
 | 
					        fi
 | 
				
			||||||
	cd $pkg*
 | 
						cd $pkg*
 | 
				
			||||||
	git init
 | 
						git init
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue