getsolus / ypkg

Modern, declarative, structured build format
https://getsol.us
GNU General Public License v3.0
22 stars 11 forks source link

support updating package.ymls that use git sources #14

Closed yacn closed 2 years ago

yacn commented 4 years ago

changes

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 $ 
algent-al commented 2 years ago

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 commented 2 years ago

Nah argparse is part of the standard library. LGTM