public inbox for [email protected]  
help / color / mirror / Atom feed
From: Jonathan S. Katz <[email protected]>
To: Devrim Gündüz <[email protected]>
To: pgsql-www <[email protected]>
Subject: Re: Patch for yum.js
Date: Mon, 2 Jun 2025 14:11:24 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

On 6/2/25 12:59 PM, Devrim Gündüz wrote:
> 
> Hi,
> 
> Attached is a patch for yum.js which is supposed to do the following:
> 
> * Remove mention of Oracle Linux. We don't test and/or support it.
> * Remove RHEL 7 specific code.
> 
> I am not a js expert, so wanted to get a review before committing it.
> 
> Thanks!

Here's an untested modification of the patch; a couple of changes:

1. It seems like "get_installer" now should always return "dnf" (we may 
need to check how it's being called, which I didn't do, since now this 
function doesn't have any logic).

2. For "uses_systemd" I used a shorthand given we're just checking to 
see if the platform starts with "EL-". This also will guarantee it 
returns true or false.

I'm unsure if this captures the intent what you want, but wanted to 
propose it.

Thanks,

Jonathan

diff --git a/templates/downloads/js/yum.js b/templates/downloads/js/yum.js
index ddcff2f..f2388c7 100644
--- a/templates/downloads/js/yum.js
+++ b/templates/downloads/js/yum.js
@@ -7,10 +7,7 @@ function sortNumeric(a,b) {
 
 function get_platform_name(plat, ver) {
     if (plat == 'EL') {
-        if (parseFloat(ver) <= 7)
-	    return "Red Hat Enterprise, CentOS, Scientific or Oracle";
-        else
-	    return "Red Hat Enterprise, Rocky, AlmaLinux or Oracle";
+	    return "Red Hat Enterprise, Rocky, or AlmaLinux";
     }
     else if (plat == 'F')
 	return "Fedora";
@@ -26,14 +23,7 @@ function get_rpm_prefix(plat) {
 }
 
 function get_installer(plat) {
-    if (plat.startsWith('F-'))
-	return 'dnf';
-    else if (plat.startsWith('EL-')) {
-	var a = plat.split('-');
-	if (a[1] >= 8)
-	    return 'dnf';
-    }
-    return 'yum';
+    return 'dnf';
 }
 
 function disable_module_on(plat) {
@@ -46,12 +36,7 @@ function disable_module_on(plat) {
 }
 
 function uses_systemd(plat) {
-    if (plat.startsWith('EL-')) {
-	var a = plat.split('-');
-	if (a[1] < 7)
-	    return false;
-    }
-    return true;
+    return plat.startsWith('EL-');
 }
 
 function get_platform_text(p) {


Attachments:

  [text/plain] pgweb-download-js-v2.patch (1.2K, ../[email protected]/2-pgweb-download-js-v2.patch)
  download | inline diff:
diff --git a/templates/downloads/js/yum.js b/templates/downloads/js/yum.js
index ddcff2f..f2388c7 100644
--- a/templates/downloads/js/yum.js
+++ b/templates/downloads/js/yum.js
@@ -7,10 +7,7 @@ function sortNumeric(a,b) {
 
 function get_platform_name(plat, ver) {
     if (plat == 'EL') {
-        if (parseFloat(ver) <= 7)
-	    return "Red Hat Enterprise, CentOS, Scientific or Oracle";
-        else
-	    return "Red Hat Enterprise, Rocky, AlmaLinux or Oracle";
+	    return "Red Hat Enterprise, Rocky, or AlmaLinux";
     }
     else if (plat == 'F')
 	return "Fedora";
@@ -26,14 +23,7 @@ function get_rpm_prefix(plat) {
 }
 
 function get_installer(plat) {
-    if (plat.startsWith('F-'))
-	return 'dnf';
-    else if (plat.startsWith('EL-')) {
-	var a = plat.split('-');
-	if (a[1] >= 8)
-	    return 'dnf';
-    }
-    return 'yum';
+    return 'dnf';
 }
 
 function disable_module_on(plat) {
@@ -46,12 +36,7 @@ function disable_module_on(plat) {
 }
 
 function uses_systemd(plat) {
-    if (plat.startsWith('EL-')) {
-	var a = plat.split('-');
-	if (a[1] < 7)
-	    return false;
-    }
-    return true;
+    return plat.startsWith('EL-');
 }
 
 function get_platform_text(p) {


  [application/pgp-signature] OpenPGP_signature.asc (840B, ../[email protected]/3-OpenPGP_signature.asc)
  download

view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected]
  Subject: Re: Patch for yum.js
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox