pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/pkgtools/url2pkg/files



Module Name:    pkgsrc
Committed By:   rillig
Date:           Tue Aug 15 21:20:03 UTC 2023

Modified Files:
        pkgsrc/pkgtools/url2pkg/files: url2pkg.py url2pkg_test.py

Log Message:
url2pkg: clean and extract after adjusting the package

The first 'bmake extract' is done only to look at the files from the
package, to determine the dependencies.  In that stage, the package
cannot be built successfully.  To make the whole workflow less
surprising, install the auto-detected dependencies before leaving the
rest of the work to the human package maintainer.  This means that
running url2pkg produces more output and may take significantly more
time, but that time would be spent anyway later, so it's a net win.

Suggested by gdt@.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 pkgsrc/pkgtools/url2pkg/files/url2pkg.py
cvs rdiff -u -r1.45 -r1.46 pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/pkgtools/url2pkg/files/url2pkg.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.49 pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.50
--- pkgsrc/pkgtools/url2pkg/files/url2pkg.py:1.49       Sun Aug 13 21:19:02 2023
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg.py    Tue Aug 15 21:20:03 2023
@@ -1,5 +1,5 @@
 #! @PYTHONBIN@
-# $NetBSD: url2pkg.py,v 1.49 2023/08/13 21:19:02 rillig Exp $
+# $NetBSD: url2pkg.py,v 1.50 2023/08/15 21:20:03 rillig Exp $
 
 # Copyright (c) 2019 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1295,6 +1295,8 @@ def main(argv: List[str], g: Globals):
 
     initial_lines = Generator(url).generate_package(g)
     Adjuster(g, url, initial_lines).adjust()
+    g.bmake('clean')
+    g.bmake('extract')
 
     g.out.write('\n')
     g.out.write('Remember to run pkglint when you\'re done.\n')

Index: pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py
diff -u pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.45 pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.46
--- pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py:1.45  Sun Aug 13 21:19:02 2023
+++ pkgsrc/pkgtools/url2pkg/files/url2pkg_test.py       Tue Aug 15 21:20:03 2023
@@ -1,4 +1,4 @@
-# $NetBSD: url2pkg_test.py,v 1.45 2023/08/13 21:19:02 rillig Exp $
+# $NetBSD: url2pkg_test.py,v 1.46 2023/08/15 21:20:03 rillig Exp $
 
 # URLs for manual testing:
 #
@@ -1649,6 +1649,8 @@ def test_main__valid_URL():
     assert g.err.written() == [
         f'url2pkg: running bmake (\'clean\', \'distinfo\', \'extract\') in \'{g.pkgdir}\'',
         'url2pkg: Adjusting the Makefile',
+        f'url2pkg: running bmake (\'clean\',) in \'{g.pkgdir}\'',
+        f'url2pkg: running bmake (\'extract\',) in \'{g.pkgdir}\'',
     ]
 
     g.verbose = False



Home | Main Index | Thread Index | Old Index