]> git.scottworley.com Git - pinch/commitdiff
Move pin_channel() into ChannelSearchPath.pin()
authorScott Worley <scottworley@scottworley.com>
Mon, 15 Jun 2020 19:30:15 +0000 (12:30 -0700)
committerScott Worley <scottworley@scottworley.com>
Thu, 18 Jun 2020 06:15:29 +0000 (23:15 -0700)
pinch.py

index ea380a3a332137e2b70fbcb507603c800687ebdb..78c6d52a325d70fc6b3d0aa065a744708f93fa95 100644 (file)
--- a/pinch.py
+++ b/pinch.py
@@ -163,7 +163,11 @@ class ChannelSearchPath(TarrableSearchPath):
             self.old_git_revision = self.git_revision
             del self.git_revision
 
-        pin_channel(v, self)
+        fetch(v, self)
+        parse_channel(v, self)
+        fetch_resources(v, self)
+        ensure_git_rev_available(v, self)
+        check_channel_contents(v, self)
         return ChannelPin(
             release_name=self.release_name,
             tarball_url=self.table['nixexprs.tar.xz'].absolute_url,
@@ -561,14 +565,6 @@ def check_channel_contents(
     v.ok()
 
 
-def pin_channel(v: Verification, channel: TarrableSearchPath) -> None:
-    fetch(v, channel)
-    parse_channel(v, channel)
-    fetch_resources(v, channel)
-    ensure_git_rev_available(v, channel)
-    check_channel_contents(v, channel)
-
-
 def git_revision_name(v: Verification, channel: TarrableSearchPath) -> str:
     v.status('Getting commit date')
     process = subprocess.run(['git',