mirror of
https://github.com/NixOS/nix.git
synced 2025-11-26 04:00:59 +01:00
This commit is contained in:
parent
00f39f88f7
commit
e3034da88b
8 changed files with 22 additions and 418 deletions
|
|
@ -277,6 +277,7 @@ AC_CONFIG_FILES([Makefile
|
||||||
src/libutil/Makefile
|
src/libutil/Makefile
|
||||||
src/libstore/Makefile
|
src/libstore/Makefile
|
||||||
src/libmain/Makefile
|
src/libmain/Makefile
|
||||||
|
src/libext3cow/Makefile
|
||||||
src/nix-store/Makefile
|
src/nix-store/Makefile
|
||||||
src/nix-state/Makefile
|
src/nix-state/Makefile
|
||||||
src/nix-hash/Makefile
|
src/nix-hash/Makefile
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ bin_SCRIPTS = nix-collect-garbage \
|
||||||
nix-pack-closure nix-unpack-closure \
|
nix-pack-closure nix-unpack-closure \
|
||||||
nix-copy-closure
|
nix-copy-closure
|
||||||
|
|
||||||
noinst_SCRIPTS = nix-profile.sh generate-patches.pl find-runtime-roots.pl nix-statecommit.sh nix-readrevisions.sh nix-restorerevision.sh
|
noinst_SCRIPTS = nix-profile.sh generate-patches.pl find-runtime-roots.pl nix-readrevisions.sh nix-restorerevision.sh
|
||||||
|
|
||||||
nix-pull nix-push: readmanifest.pm readconfig.pm download-using-manifests.pl
|
nix-pull nix-push: readmanifest.pm readconfig.pm download-using-manifests.pl
|
||||||
|
|
||||||
|
|
@ -17,7 +17,6 @@ install-exec-local: readmanifest.pm download-using-manifests.pl find-runtime-roo
|
||||||
$(INSTALL_PROGRAM) download-using-manifests.pl $(DESTDIR)$(libexecdir)/nix
|
$(INSTALL_PROGRAM) download-using-manifests.pl $(DESTDIR)$(libexecdir)/nix
|
||||||
$(INSTALL_PROGRAM) find-runtime-roots.pl $(DESTDIR)$(libexecdir)/nix
|
$(INSTALL_PROGRAM) find-runtime-roots.pl $(DESTDIR)$(libexecdir)/nix
|
||||||
$(INSTALL_PROGRAM) generate-patches.pl $(DESTDIR)$(libexecdir)/nix
|
$(INSTALL_PROGRAM) generate-patches.pl $(DESTDIR)$(libexecdir)/nix
|
||||||
$(INSTALL_PROGRAM) nix-statecommit.sh $(DESTDIR)$(libexecdir)/nix
|
|
||||||
$(INSTALL_PROGRAM) nix-readrevisions.sh $(DESTDIR)$(libexecdir)/nix
|
$(INSTALL_PROGRAM) nix-readrevisions.sh $(DESTDIR)$(libexecdir)/nix
|
||||||
$(INSTALL_PROGRAM) nix-restorerevision.sh $(DESTDIR)$(libexecdir)/nix
|
$(INSTALL_PROGRAM) nix-restorerevision.sh $(DESTDIR)$(libexecdir)/nix
|
||||||
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix
|
$(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix
|
||||||
|
|
@ -36,6 +35,5 @@ EXTRA_DIST = nix-collect-garbage.in \
|
||||||
nix-pack-closure.in nix-unpack-closure.in \
|
nix-pack-closure.in nix-unpack-closure.in \
|
||||||
nix-copy-closure.in \
|
nix-copy-closure.in \
|
||||||
find-runtime-roots.pl.in \
|
find-runtime-roots.pl.in \
|
||||||
nix-statecommit.sh.in \
|
|
||||||
nix-readrevisions.sh.in \
|
nix-readrevisions.sh.in \
|
||||||
nix-restorerevision.sh.in
|
nix-restorerevision.sh.in
|
||||||
|
|
|
||||||
|
|
@ -1,203 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# we cant do a -e since ... svn can fail ??? TODO...
|
|
||||||
|
|
||||||
#check if there are enough arguments, if not, exit with an error
|
|
||||||
|
|
||||||
debug=""; #set to "" for no debugging, set to "echo " to debug the commands
|
|
||||||
|
|
||||||
if [ "$#" != 6 ] && [ "$#" != 7 ] ; then
|
|
||||||
echo "Incorrect number of arguments"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$deletesvn" != "" ] && [ "$deletesvn" != "1" ]; then
|
|
||||||
echo "The last argument (DELETE svn folders) must be either empty (recommended) or 1"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
svnbin=$1
|
|
||||||
subversionedpaths=( $2 ) #arrays
|
|
||||||
subversionedpathsCommitBools=( $3 )
|
|
||||||
nonversionedpaths=( $4 )
|
|
||||||
checkout=$5
|
|
||||||
statepath=$6
|
|
||||||
deletesvn=$7 #this flag can be set to 1 to DELETE all .svn folders and NOT commit
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$debug" != "" ] ; then
|
|
||||||
echo svnbin: $svnbin
|
|
||||||
echo subversionedpaths: ${subversionedpaths[@]}
|
|
||||||
echo subversionedpathsCommitBools: ${subversionedpathsCommitBools[@]}
|
|
||||||
echo nonversionedpaths: ${nonversionedpaths[@]}
|
|
||||||
echo checkouts: $checkout
|
|
||||||
echo statepath: $statepath
|
|
||||||
echo deletesvn: $deletesvn
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO: we need a solution for symlinks, svn doesnt support them
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
function subversionSingleStateDir {
|
|
||||||
|
|
||||||
excludelist=( "." ".." ".svn" );
|
|
||||||
|
|
||||||
checkForSVNDelete $1; #check for deleted files/folders (TODO does this also need to be here ???)
|
|
||||||
|
|
||||||
cd $1;
|
|
||||||
#echo cd $1;
|
|
||||||
|
|
||||||
empty=$(ls)
|
|
||||||
|
|
||||||
if [ "$empty" = "" ] ; then
|
|
||||||
allsubitems=(); #no subfiles / dirs
|
|
||||||
else
|
|
||||||
allsubitems=( $(echo *) $(echo .*) ) #there are subfiles / dirs,also adds hidden items
|
|
||||||
fi
|
|
||||||
|
|
||||||
for subitem in ${allsubitems[@]}
|
|
||||||
do
|
|
||||||
if [ "$subitem" = ".svn" ]; then
|
|
||||||
allsubitems=( $($svnbin -N stat | sed -n '/^?/p' | sed 's/? //' | tr -d "\12") ) #there are subfiles, and theyre already versioned
|
|
||||||
|
|
||||||
if [ "$deletesvn" = "1" ]; then
|
|
||||||
rm -rf .svn/
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#echo "Allsubitems ${allsubitems[@]}"
|
|
||||||
|
|
||||||
subitems=();
|
|
||||||
for subitem in ${allsubitems[@]} #add all, were going to exlucde explicity stated direct versioned-subdirs or explicity stated nonversioned-subdirs
|
|
||||||
do #this is only to prevent some warnings, ultimately we would like svn add to have a option 'exclude dirs'
|
|
||||||
|
|
||||||
exclude=0;
|
|
||||||
|
|
||||||
for excl in ${excludelist[@]} #check if the subitem is in the list of excluded dirs
|
|
||||||
do
|
|
||||||
if [ "$excl" = "$subitem" ]; then
|
|
||||||
exclude=1;
|
|
||||||
#echo "exclude $excl"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
subitem="$(pwd)/$subitem"; #create the full path
|
|
||||||
|
|
||||||
if test -d $subitem; then #the subitem (file or a dir) may be a dir, so we add a / to the end
|
|
||||||
subitem="$subitem/";
|
|
||||||
fi
|
|
||||||
|
|
||||||
for svnp in ${subversionedpaths[@]} #check if the subitem is in the list of subverioned paths
|
|
||||||
do
|
|
||||||
if [ "$svnp" = "$subitem" ]; then
|
|
||||||
exclude=1;
|
|
||||||
#echo "exclude versioned $svnp"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
for nonvp in ${nonversionedpaths[@]} #check if the subitem is in the list of dirs that aren't supposed to be versioned
|
|
||||||
do
|
|
||||||
if [ "$nonvp" = "$subitem" ]; then
|
|
||||||
exclude=1;
|
|
||||||
#echo "exclude nonversioned $svnp"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $exclude = 0 ]; then #Exclude the subitem if nessecary
|
|
||||||
subitems[${#subitems[*]}]=$subitem
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo Adding subitems ${subitems[@]}
|
|
||||||
|
|
||||||
for item in ${subitems[@]}
|
|
||||||
do
|
|
||||||
if test -d $item; then #add or go recursive subitems
|
|
||||||
if [ "$deletesvn" != "1" ]; then
|
|
||||||
$debug $svnbin -N add $item #NON recursively add the dir
|
|
||||||
fi
|
|
||||||
subversionSingleStateDir $item
|
|
||||||
else
|
|
||||||
if [ "$deletesvn" != "1" ]; then
|
|
||||||
$debug $svnbin add $item
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Takes a dir or file, checks for deleted files / folders and svn delete's them
|
|
||||||
#
|
|
||||||
|
|
||||||
function checkForSVNDelete {
|
|
||||||
|
|
||||||
#echo checking for deleted items: $1;
|
|
||||||
allsubitems=( $($svnbin -N stat $1 | sed -n '/^!/p' | sed 's/! //' | tr -d "\12") ) #select all deleted files
|
|
||||||
#echo "All deleted subitems ${allsubitems[@]}"
|
|
||||||
|
|
||||||
for subitem in ${allsubitems[@]} #then svn delete them
|
|
||||||
do
|
|
||||||
$debug $svnbin delete $subitem
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
if ! test -d "${statepath}/.svn/"; then #if the root dir exists but is not yet an svn dir: checkout repos, if it doenst exits (is removed or something) than we dont do anything
|
|
||||||
if [ "$deletesvn" != "1" ]; then #TODO !!!!!!!!!!!!!!! we shouldnt checkout !!!!!!!!!!!!!!!!!
|
|
||||||
$debug $checkout;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
i=0
|
|
||||||
for path in ${subversionedpaths[@]}
|
|
||||||
do
|
|
||||||
|
|
||||||
checkForSVNDelete $path; #check if path or file is deleted
|
|
||||||
|
|
||||||
if test -d $path; then #if the dir doesnt exist, than we dont hav to do anything
|
|
||||||
cd $path;
|
|
||||||
|
|
||||||
if [ "${subversionedpathsCommitBools[$i]}" = "true" ]; then #Check if we need to commit this folder
|
|
||||||
echo "Entering $path"
|
|
||||||
|
|
||||||
if ! test -d "${path}/.svn/"; then #Dir: Also add yourself if nessecary
|
|
||||||
if [ "$deletesvn" != "1" ]; then
|
|
||||||
$debug $svnbin -N add $path
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
subversionSingleStateDir $path;
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd - &> /dev/null;
|
|
||||||
let "i+=1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -f $path; then #if its a file, see if it needs to be added
|
|
||||||
|
|
||||||
if [ "${subversionedpathsCommitBools[$i]}" = "true" ]; then #Check if we need to commit this file
|
|
||||||
|
|
||||||
alreadyversioned=$(svn -N stat $path )
|
|
||||||
if [ "$alreadyversioned" != "" ]; then
|
|
||||||
echo "Subversioning $path"
|
|
||||||
$debug $svnbin add $path
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
cd $statepath #now that everything is added we go back to the 'root' path and commit
|
|
||||||
if [ "$deletesvn" != "1" ]; then
|
|
||||||
$debug $svnbin -m "" commit;
|
|
||||||
$debug $svnbin up "" commit; #do a svn up to update the local revision number ... (the contents stays the same)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -1,207 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
# we cant do a -e since ... svn can fail ??? TODO...
|
|
||||||
|
|
||||||
#check if there are enough arguments, if not, exit with an error
|
|
||||||
|
|
||||||
debug=""; #set to "" for no debugging, set to "echo " to debug the commands
|
|
||||||
|
|
||||||
if [ "$#" != 6 ] && [ "$#" != 7 ] ; then
|
|
||||||
echo "Incorrect number of arguments"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$deletesvn" != "" ] && [ "$deletesvn" != "1" ]; then
|
|
||||||
echo "The last argument (DELETE svn folders) must be either empty (recommended) or 1"
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
svnbin=$1
|
|
||||||
subversionedpaths=( $2 ) #arrays
|
|
||||||
subversionedpathsCommitBools=( $3 )
|
|
||||||
nonversionedpaths=( $4 )
|
|
||||||
checkout=$5
|
|
||||||
statepath=$6
|
|
||||||
deletesvn=$7 #this flag can be set to 1 to DELETE all .svn folders and NOT commit
|
|
||||||
|
|
||||||
|
|
||||||
if [ "$debug" != "" ] ; then
|
|
||||||
echo svnbin: $svnbin
|
|
||||||
echo subversionedpaths: ${subversionedpaths[@]}
|
|
||||||
echo subversionedpathsCommitBools: ${subversionedpathsCommitBools[@]}
|
|
||||||
echo nonversionedpaths: ${nonversionedpaths[@]}
|
|
||||||
echo checkouts: $checkout
|
|
||||||
echo statepath: $statepath
|
|
||||||
echo deletesvn: $deletesvn
|
|
||||||
fi
|
|
||||||
|
|
||||||
# TODO: we need a solution for symlinks, svn doesnt support them
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
function subversionSingleStateDir {
|
|
||||||
|
|
||||||
excludelist=( "." ".." ".svn" );
|
|
||||||
|
|
||||||
checkForSVNDelete $1; #check for deleted files/folders (TODO does this also need to be here ???)
|
|
||||||
|
|
||||||
cd $1;
|
|
||||||
#echo cd $1;
|
|
||||||
|
|
||||||
empty=$(ls)
|
|
||||||
|
|
||||||
if [ "$empty" = "" ] ; then
|
|
||||||
allsubitems=(); #no subfiles / dirs
|
|
||||||
else
|
|
||||||
allsubitems=( $(echo *) $(echo .*) ) #there are subfiles / dirs,also adds hidden items
|
|
||||||
fi
|
|
||||||
|
|
||||||
for subitem in ${allsubitems[@]}
|
|
||||||
do
|
|
||||||
if [ "$subitem" = ".svn" ]; then
|
|
||||||
allsubitems=( $($svnbin -N stat | sed -n '/^?/p' | sed 's/? //' | tr -d "\12") ) #there are subfiles, and theyre already versioned
|
|
||||||
|
|
||||||
if [ "$deletesvn" = "1" ]; then
|
|
||||||
rm -rf .svn/
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
#echo "Allsubitems ${allsubitems[@]}"
|
|
||||||
|
|
||||||
subitems=();
|
|
||||||
for subitem in ${allsubitems[@]} #add all, were going to exlucde explicity stated direct versioned-subdirs or explicity stated nonversioned-subdirs
|
|
||||||
do #this is only to prevent some warnings, ultimately we would like svn add to have a option 'exclude dirs'
|
|
||||||
|
|
||||||
exclude=0;
|
|
||||||
|
|
||||||
for excl in ${excludelist[@]} #check if the subitem is in the list of excluded dirs
|
|
||||||
do
|
|
||||||
if [ "$excl" = "$subitem" ]; then
|
|
||||||
exclude=1;
|
|
||||||
#echo "exclude $excl"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
subitem="$(pwd)/$subitem"; #create the full path
|
|
||||||
|
|
||||||
if test -d $subitem; then #the subitem (file or a dir) may be a dir, so we add a / to the end
|
|
||||||
subitem="$subitem/";
|
|
||||||
fi
|
|
||||||
|
|
||||||
for svnp in ${subversionedpaths[@]} #check if the subitem is in the list of subverioned paths
|
|
||||||
do
|
|
||||||
if [ "$svnp" = "$subitem" ]; then
|
|
||||||
exclude=1;
|
|
||||||
#echo "exclude versioned $svnp"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
for nonvp in ${nonversionedpaths[@]} #check if the subitem is in the list of dirs that aren't supposed to be versioned
|
|
||||||
do
|
|
||||||
if [ "$nonvp" = "$subitem" ]; then
|
|
||||||
exclude=1;
|
|
||||||
#echo "exclude nonversioned $svnp"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $exclude = 0 ]; then #Exclude the subitem if nessecary
|
|
||||||
subitems[${#subitems[*]}]=$subitem
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo Adding subitems ${subitems[@]}
|
|
||||||
|
|
||||||
for item in ${subitems[@]}
|
|
||||||
do
|
|
||||||
if test -d $item; then #add or go recursive subitems
|
|
||||||
if [ "$deletesvn" != "1" ]; then
|
|
||||||
$debug $svnbin -N add $item #NON recursively add the dir
|
|
||||||
fi
|
|
||||||
subversionSingleStateDir $item
|
|
||||||
else
|
|
||||||
if [ "$deletesvn" != "1" ]; then
|
|
||||||
$debug $svnbin add $item
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Takes a dir or file, checks for deleted files / folders and svn delete's them
|
|
||||||
#
|
|
||||||
|
|
||||||
function checkForSVNDelete {
|
|
||||||
|
|
||||||
#echo checking for deleted items: $1;
|
|
||||||
allsubitems=( $($svnbin -N stat $1 | sed -n '/^!/p' | sed 's/! //' | tr -d "\12") ) #select all deleted files
|
|
||||||
#echo "All deleted subitems ${allsubitems[@]}"
|
|
||||||
|
|
||||||
for subitem in ${allsubitems[@]} #then svn delete them
|
|
||||||
do
|
|
||||||
$debug $svnbin delete $subitem
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
if ! test -d "${statepath}/.svn/"; then #if the root dir exists but is not yet an svn dir: checkout repos, if it doenst exits (is removed or something) than we dont do anything
|
|
||||||
if [ "$deletesvn" != "1" ]; then #TODO !!!!!!!!!!!!!!! we shouldnt checkout !!!!!!!!!!!!!!!!!
|
|
||||||
$debug $checkout;
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
i=0
|
|
||||||
for path in ${subversionedpaths[@]}
|
|
||||||
do
|
|
||||||
|
|
||||||
checkForSVNDelete $path; #check if path or file is deleted
|
|
||||||
|
|
||||||
if test -d $path; then #if the dir doesnt exist, than we dont hav to do anything
|
|
||||||
cd $path;
|
|
||||||
|
|
||||||
if [ "${subversionedpathsCommitBools[$i]}" = "true" ]; then #Check if we need to commit this folder
|
|
||||||
echo "Entering $path"
|
|
||||||
|
|
||||||
if ! test -d "${path}/.svn/"; then #Dir: Also add yourself if nessecary
|
|
||||||
if [ "$deletesvn" != "1" ]; then
|
|
||||||
$debug $svnbin -N add $path
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
subversionSingleStateDir $path;
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd - &> /dev/null;
|
|
||||||
let "i+=1"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -f $path; then #if its a file, see if it needs to be added
|
|
||||||
|
|
||||||
if [ "${subversionedpathsCommitBools[$i]}" = "true" ]; then #Check if we need to commit this file
|
|
||||||
|
|
||||||
alreadyversioned=$(svn -N stat $path )
|
|
||||||
if [ "$alreadyversioned" != "" ]; then
|
|
||||||
echo "Subversioning $path"
|
|
||||||
$debug $svnbin add $path
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
done
|
|
||||||
|
|
||||||
cd $statepath #now that everything is added we go back to the 'root' path and commit
|
|
||||||
if [ "$deletesvn" != "1" ]; then
|
|
||||||
|
|
||||||
#TODO this could be done transactional...
|
|
||||||
|
|
||||||
$debug $svnbin up "" commit; #do a svn up to get the new changes
|
|
||||||
$debug $svnbin -m "" commit;
|
|
||||||
$debug $svnbin up "" commit; #do a svn up to update the local revision number ... (the contents stays the same)
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
SUBDIRS = bin2c boost libutil libstore libmain nix-store nix-hash \
|
SUBDIRS = bin2c boost libutil libext3cow libstore libmain nix-store nix-hash \
|
||||||
libexpr nix-instantiate nix-env nix-worker nix-setuid-helper \
|
libexpr nix-instantiate nix-env nix-worker nix-setuid-helper \
|
||||||
nix-log2xml bsdiff-4.3 nix-state
|
nix-log2xml bsdiff-4.3 nix-state
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ pkginclude_HEADERS = \
|
||||||
worker-protocol.hh store-state.hh
|
worker-protocol.hh store-state.hh
|
||||||
|
|
||||||
libstore_la_LIBADD = ../libutil/libutil.la \
|
libstore_la_LIBADD = ../libutil/libutil.la \
|
||||||
|
../libext3cow/libext3cow.la \
|
||||||
../boost/format/libformat.la
|
../boost/format/libformat.la
|
||||||
|
|
||||||
BUILT_SOURCES = derivations-ast.cc derivations-ast.hh
|
BUILT_SOURCES = derivations-ast.cc derivations-ast.hh
|
||||||
|
|
@ -17,7 +18,7 @@ BUILT_SOURCES = derivations-ast.cc derivations-ast.hh
|
||||||
EXTRA_DIST = derivations-ast.def derivations-ast.cc
|
EXTRA_DIST = derivations-ast.def derivations-ast.cc
|
||||||
|
|
||||||
AM_CXXFLAGS = -Wall \
|
AM_CXXFLAGS = -Wall \
|
||||||
-I$(srcdir)/.. ${bdb_include} ${aterm_include} -I$(srcdir)/../libutil -I$(srcdir)/../nix-state
|
-I$(srcdir)/.. ${bdb_include} ${aterm_include} -I$(srcdir)/../libutil -I$(srcdir)/../nix-state -I$(srcdir)/../libext3cow
|
||||||
|
|
||||||
derivations-ast.cc derivations-ast.hh: ../aterm-helper.pl derivations-ast.def
|
derivations-ast.cc derivations-ast.hh: ../aterm-helper.pl derivations-ast.def
|
||||||
$(perl) $(srcdir)/../aterm-helper.pl derivations-ast.hh derivations-ast.cc < $(srcdir)/derivations-ast.def
|
$(perl) $(srcdir)/../aterm-helper.pl derivations-ast.hh derivations-ast.cc < $(srcdir)/derivations-ast.def
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,7 @@
|
||||||
#include "local-store.hh"
|
#include "local-store.hh"
|
||||||
#include "misc.hh"
|
#include "misc.hh"
|
||||||
#include "archive.hh"
|
#include "archive.hh"
|
||||||
|
#include "snapshot.hh"
|
||||||
|
|
||||||
namespace nix {
|
namespace nix {
|
||||||
|
|
||||||
|
|
@ -29,9 +30,12 @@ void updatedStateDerivation(Path storePath)
|
||||||
|
|
||||||
void createStateDirs(const DerivationStateOutputDirs & stateOutputDirs, const DerivationStateOutputs & stateOutputs)
|
void createStateDirs(const DerivationStateOutputDirs & stateOutputDirs, const DerivationStateOutputs & stateOutputs)
|
||||||
{
|
{
|
||||||
|
|
||||||
Path statePath = stateOutputs.find("state")->second.statepath;
|
Path statePath = stateOutputs.find("state")->second.statepath;
|
||||||
string stateDir = statePath;
|
string stateDir = statePath;
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
string svnbin = nixSVNPath + "/svn";
|
string svnbin = nixSVNPath + "/svn";
|
||||||
string svnadminbin = nixSVNPath + "/svnadmin";
|
string svnadminbin = nixSVNPath + "/svnadmin";
|
||||||
|
|
||||||
|
|
@ -89,6 +93,8 @@ void createStateDirs(const DerivationStateOutputDirs & stateOutputDirs, const De
|
||||||
//Initialize the counters for the statePaths that have an interval to 0
|
//Initialize the counters for the statePaths that have an interval to 0
|
||||||
vector<int> empty;
|
vector<int> empty;
|
||||||
store->setStatePathsInterval(intervalPaths, empty, true);
|
store->setStatePathsInterval(intervalPaths, empty, true);
|
||||||
|
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
void commitStatePathTxn(const Transaction & txn, const Path & statePath)
|
void commitStatePathTxn(const Transaction & txn, const Path & statePath)
|
||||||
|
|
@ -223,6 +229,13 @@ void updateRevisionsRecursivelyTxn(const Transaction & txn, const Path & statePa
|
||||||
|
|
||||||
int readRevisionNumber(Path statePath)
|
int readRevisionNumber(Path statePath)
|
||||||
{
|
{
|
||||||
|
string s = "/media/ext3cow/cca/";
|
||||||
|
const char* ss = s.c_str();
|
||||||
|
unsigned int i = take_snapshot(ss);
|
||||||
|
printMsg(lvlError, format("SS: '%1%'") % i);
|
||||||
|
|
||||||
|
////////
|
||||||
|
/*
|
||||||
string svnbin = nixSVNPath + "/svn";
|
string svnbin = nixSVNPath + "/svn";
|
||||||
RevisionNumbers revisions;
|
RevisionNumbers revisions;
|
||||||
|
|
||||||
|
|
@ -243,8 +256,9 @@ int readRevisionNumber(Path statePath)
|
||||||
if(!succeed)
|
if(!succeed)
|
||||||
throw Error(format("Cannot read revision number of path '%1%'") % repos);
|
throw Error(format("Cannot read revision number of path '%1%'") % repos);
|
||||||
|
|
||||||
return revision;
|
return revision;
|
||||||
|
*/
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -551,7 +551,7 @@ void run(Strings args)
|
||||||
|
|
||||||
//updateRevisionNumbers("/nix/state/xf582zrz6xl677llr07rvskgsi3dli1d-hellohardcodedstateworld-dep1-1.0-test");
|
//updateRevisionNumbers("/nix/state/xf582zrz6xl677llr07rvskgsi3dli1d-hellohardcodedstateworld-dep1-1.0-test");
|
||||||
//return;
|
//return;
|
||||||
|
|
||||||
/* test */
|
/* test */
|
||||||
|
|
||||||
for (Strings::iterator i = args.begin(); i != args.end(); ) {
|
for (Strings::iterator i = args.begin(); i != args.end(); ) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue