[sysadmin/neon-tooling] nci: correct the way the adt patch is applied in resolute

Carlos De Maine <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 006530581b7f969d043d66508d62e849e773abc1 by Carlos De Maine.
Committed on 26/07/2026 at 08:53.
Pushed by carlosdem into branch 'master'.

correct the way the adt patch is applied in resolute

M  +7    -4    nci/adt.rb

https://invent.kde.org/sysadmin/neon-tooling/-/commit/006530581b7f969d043d66508d62e849e773abc1

diff --git a/nci/adt.rb b/nci/adt.rb
index 7cf5d5c4..a819ed17 100755
--- a/nci/adt.rb
+++ b/nci/adt.rb
@@ -84,11 +84,14 @@ Dir.chdir('/') do
                verbose: true)
   FileUtils.chmod(0o0755, '/usr/sbin/mktemp')
   if File.exist?('/usr/bin/autopkgtest') # noble
-    system("patch -p0 < #{__dir__}/adt-helpers/adt-run.diff" || raise
-    binary = 'adt-run'
+    # Applies with a bit of offset.
+    system('patch',
+           '/usr/bin/autopkgtest',
+           "#{__dir__}/adt-helpers/adt-run.diff") || raise
   else # resolute
-    system("patch -p0 < #{__dir__}/adt-helpers/adt-run-resolute.diff") || raise
-    binary = 'adt-run'
+    system('patch',
+           '/usr/bin/autopkgtest',
+           "#{__dir__}/adt-helpers/adt-run-resolute.diff") || raise
   end
 
   # Override ctest to inject an argument forcing the timeout per test at 5m.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.