* Remove `prebuilts.conf' file, it's not like anybody was using it.
* Add /nix/var/nix/manifests directory.
This commit is contained in:
		
							parent
							
								
									e3b051aeeb
								
							
						
					
					
						commit
						77970f8daf
					
				
					 3 changed files with 5 additions and 19 deletions
				
			
		| 
						 | 
					@ -29,6 +29,7 @@ init-state:
 | 
				
			||||||
	rm -f $(DESTDIR)$(localstatedir)/nix/gcroots/profiles
 | 
						rm -f $(DESTDIR)$(localstatedir)/nix/gcroots/profiles
 | 
				
			||||||
	ln -s $(localstatedir)/nix/profiles $(DESTDIR)$(localstatedir)/nix/gcroots/profiles
 | 
						ln -s $(localstatedir)/nix/profiles $(DESTDIR)$(localstatedir)/nix/gcroots/profiles
 | 
				
			||||||
	$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(prefix)/store
 | 
						$(INSTALL) $(INIT_FLAGS) -d $(DESTDIR)$(prefix)/store
 | 
				
			||||||
 | 
						$(INSTALL) $(INIT_FLAGS) $(GROUP_WRITABLE) -d $(DESTDIR)$(localstatedir)/nix/manifests
 | 
				
			||||||
#	$(bindir)/nix-store --init
 | 
					#	$(bindir)/nix-store --init
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
init-state:
 | 
					init-state:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -12,8 +12,6 @@ install-exec-local: readmanifest.pm
 | 
				
			||||||
	$(INSTALL) -d $(DESTDIR)$(libexecdir)/nix
 | 
						$(INSTALL) -d $(DESTDIR)$(libexecdir)/nix
 | 
				
			||||||
	$(INSTALL_DATA) readmanifest.pm $(DESTDIR)$(libexecdir)/nix 
 | 
						$(INSTALL_DATA) readmanifest.pm $(DESTDIR)$(libexecdir)/nix 
 | 
				
			||||||
	$(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix
 | 
						$(INSTALL) -d $(DESTDIR)$(sysconfdir)/nix
 | 
				
			||||||
# !!! don't overwrite local modifications
 | 
					 | 
				
			||||||
	$(INSTALL_DATA) prebuilts.conf $(DESTDIR)$(sysconfdir)/nix/prebuilts.conf
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
include ../substitute.mk
 | 
					include ../substitute.mk
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -21,5 +19,5 @@ EXTRA_DIST = nix-collect-garbage.in \
 | 
				
			||||||
  nix-pull.in nix-push.in nix-profile.sh.in \
 | 
					  nix-pull.in nix-push.in nix-profile.sh.in \
 | 
				
			||||||
  nix-prefetch-url.in nix-install-package.in \
 | 
					  nix-prefetch-url.in nix-install-package.in \
 | 
				
			||||||
  nix-channel.in \
 | 
					  nix-channel.in \
 | 
				
			||||||
  prebuilts.conf readmanifest.pm.in \
 | 
					  readmanifest.pm.in \
 | 
				
			||||||
  nix-build.in
 | 
					  nix-build.in
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,7 +10,6 @@ do { $tmpdir = tmpnam(); }
 | 
				
			||||||
until mkdir $tmpdir, 0777;
 | 
					until mkdir $tmpdir, 0777;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my $manifest = "$tmpdir/manifest";
 | 
					my $manifest = "$tmpdir/manifest";
 | 
				
			||||||
my $confFile = "@sysconfdir@/nix/prebuilts.conf";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
#END { unlink $manifest; rmdir $tmpdir; }
 | 
					#END { unlink $manifest; rmdir $tmpdir; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,22 +32,10 @@ sub processURL {
 | 
				
			||||||
    readManifest $manifest, \%storePaths2urls, \%urls2hashes, \%successors;
 | 
					    readManifest $manifest, \%storePaths2urls, \%urls2hashes, \%successors;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if (scalar @ARGV > 0) {
 | 
					 | 
				
			||||||
while (@ARGV) {
 | 
					while (@ARGV) {
 | 
				
			||||||
    my $url = shift @ARGV;
 | 
					    my $url = shift @ARGV;
 | 
				
			||||||
    processURL $url;
 | 
					    processURL $url;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
} else {
 | 
					 | 
				
			||||||
    open CONFFILE, "<$confFile";
 | 
					 | 
				
			||||||
    while (<CONFFILE>) {
 | 
					 | 
				
			||||||
        chomp;
 | 
					 | 
				
			||||||
        if (/^\s*(\S+)\s*(\#.*)?$/) {
 | 
					 | 
				
			||||||
            my $url = $1;
 | 
					 | 
				
			||||||
	    processURL $url;
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
    close CONFFILE;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
my $size = scalar (keys %storePaths2urls);
 | 
					my $size = scalar (keys %storePaths2urls);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue