[packages/adapter: 184/631] - fix odd behaviour if Name/Version undefined

glen glen at pld-linux.org
Mon Sep 12 19:49:53 CEST 2016


commit 5e02834399ecf06a518517ea0c6da5bb1f85d0e1
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Mon Sep 5 10:30:31 2005 +0000

    - fix odd behaviour if Name/Version undefined
    
    Changed files:
        adapter.awk -> 1.176

 adapter.awk | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/adapter.awk b/adapter.awk
index f3dfc59..fae4814 100644
--- a/adapter.awk
+++ b/adapter.awk
@@ -532,9 +532,13 @@ preamble == 1 {
 		$2 = s url[n+1]
 
 		filename = url[n]
-		url[n] = fixedsub(name, "%{name}", url[n])
+		if (name) {
+			url[n] = fixedsub(name, "%{name}", url[n])
+		}
 		if (field ~ /source/) {
-			url[n] = fixedsub(version, "%{version}", url[n])
+			if (version) {
+				url[n] = fixedsub(version, "%{version}", url[n])
+			}
 			if (_beta) {
 				url[n] = fixedsub(_beta, "%{_beta}", url[n])
 			}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/adapter.git/commitdiff/6ca0126d4d0c8c79feb7db10b0a0fade0f3b8885



More information about the pld-cvs-commit mailing list