Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support updating package.ymls that use git sources #14

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

yacn
Copy link
Contributor

@yacn yacn commented May 23, 2020

changes

  • Updates yupdate to support updating package.ymls that are using git sources as the url.
  • Adds --yml argument so that the if block at the top of the main function is used.

testing

testing showing yupdate checks for package.yml existence and that the file must have the extension .yml

isaac@xps13 ~/packaging/hub $ ../../git/etc/ypkg/yupdate 2.14.2 "git|https://github.com/github/hub.git" --yml does-not-exist.yml
Specified file does not exist
isaac@xps13 ~/packaging/hub $ cp package.{yml,yaml}
isaac@xps13 ~/packaging/hub $ ../../git/etc/ypkg/yupdate 2.14.2 "git|https://github.com/github/hub.git" --yml package.yaml 
package.yaml does not look like a valid package.yml file

testing on a repo that uses a git source:

isaac@xps13 ~/packaging/hub $ pwd
/home/isaac/packaging/hub
isaac@xps13 ~/packaging/hub $ g diff package.yml
isaac@xps13 ~/packaging/hub $ ../../git/etc/ypkg/yupdate 2.14.2 "git|https://github.com/github/hub.git"
isaac@xps13 ~/packaging/hub $ g diff package.yml 
diff --git a/package.yml b/package.yml
index d50ac56..0ae385e 100644
--- a/package.yml
+++ b/package.yml
@@ -1,8 +1,8 @@
 name       : hub
-version    : 2.10.0
-release    : 10
+version    : 2.14.2
+release    : 11
 source     :
-    - git|https://github.com/github/hub.git : v2.10.0
+    - git|https://github.com/github/hub.git : v2.14.2
 license    : MIT
 component  : system.utils
 summary    : A command line tool that wraps git in order to extend it with extra features and commands that make working with GitHub easier
isaac@xps13 ~/packaging/hub $ 

testing on a standard package.yml (note no version update so checksum remains the same)

isaac@xps13 ~/packaging/Zoom $ pwd
/home/isaac/packaging/Zoom
isaac@xps13 ~/packaging/Zoom $ g diff package.yml
isaac@xps13 ~/packaging/Zoom $ ../../git/etc/ypkg/yupdate 5.0.408598.0517 "https://zoom.us/client/latest/zoom_amd64.deb"
--2020-05-23 15:34:32--  https://zoom.us/client/latest/zoom_amd64.deb
Resolving zoom.us... 52.202.62.196
Connecting to zoom.us|52.202.62.196|:443... connected.
HTTP request sent, awaiting response... 302 
Location: https://d11yldzmag5yn.cloudfront.net/prod/5.0.408598.0517/zoom_amd64.deb?_x_zm_rtaid=VT4hlVtDTPC98ECTzgwvTg.1590273272881.07c760c538552eaa662bddf2cb510c5b&_x_zm_rhtaid=149 [following]
--2020-05-23 15:34:32--  https://d11yldzmag5yn.cloudfront.net/prod/5.0.408598.0517/zoom_amd64.deb?_x_zm_rtaid=VT4hlVtDTPC98ECTzgwvTg.1590273272881.07c760c538552eaa662bddf2cb510c5b&_x_zm_rhtaid=149
Resolving d11yldzmag5yn.cloudfront.net... 13.227.77.210, 13.227.77.169, 13.227.77.20, ...
Connecting to d11yldzmag5yn.cloudfront.net|13.227.77.210|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 41595972 (40M) [binary/octet-stream]
Saving to: ‘zoom_amd64.deb’

zoom_amd64.deb                                 100%[==================================================================================================>]  39.67M  10.2MB/s    in 3.8s    

2020-05-23 15:34:36 (10.4 MB/s) - ‘zoom_amd64.deb’ saved [41595972/41595972]

isaac@xps13 ~/packaging/Zoom $ g diff package.yml
diff --git a/package.yml b/package.yml
index 5e00ffe..ade17a9 100644
--- a/package.yml
+++ b/package.yml
@@ -1,6 +1,6 @@
 name       : zoom
 version    : 5.0.408598.0517
-release    : 1
+release    : 2
 source     :
     - https://zoom.us/client/latest/zoom_amd64.deb : 65e63f756a78fabd3d848f2ce16d47c492fb12fd917f79e60cb2025b4d1e2089
 license    : see https://zoom.us
isaac@xps13 ~/packaging/Zoom $ 

@DataDrake DataDrake added this to Backlog in Packaging Jan 9, 2022
@algent-al
Copy link
Member

I may be wrong but I guess that python-argparse need to be enabled and reintroduced in the repo if this patch gets merged.

@joebonrichie
Copy link
Contributor

Nah argparse is part of the standard library. LGTM

@joebonrichie joebonrichie merged commit 7b2d904 into getsolus:master Jul 14, 2022
Packaging automation moved this from Backlog to Completed Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Packaging
Completed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants