The principle of package updates?
Published: July 18, 2018 - 2:19 PM
Good morning,
I've recently started using WAPT Community version 1.5.1.26 and I have a question that's been bothering me. I don't quite understand how the software package updates work.
When I import a package from the WAPT store https://store.wapt.fr/ Using the "Import from Internet" button, I receive this package in my private repository. So far, so good. But if there's a new version of the software on their official website, the package won't update automatically.
Will importing the package from the WAPT store update the packages in my private repository? If so, are we dependent on the person who manages the package on the store? If not, do we have to wait for a new version on the store before re-importing it to our private repository?
Another question related to package updates
I noticed that the OwnCloud version on the store is outdated. So I created the package and added an `update_package()` function that will update the source code if it's not already up-to-date within the package. For those using ownCloud, here's the function that retrieves the latest version of the software from the official website https://owncloud.org/download/ :
This works fine in PyScripter. Right-clicking on `update-package-source` and selecting "Run" updates the software in the folder and the version in the `control` file. Then you just need to run `build-upload`, and that's it. The problem is that you can't do this directly from the console. Perhaps I haven't figured out how; correct me if I'm wrong.
For a somewhat "ugly" alternative, I could include the package update at the beginning of the install() function after checking if the version on the internet is higher than that of my package; I haven't tried it yet, but it doesn't seem very suitable.
Thank you for your feedback
I've recently started using WAPT Community version 1.5.1.26 and I have a question that's been bothering me. I don't quite understand how the software package updates work.
When I import a package from the WAPT store https://store.wapt.fr/ Using the "Import from Internet" button, I receive this package in my private repository. So far, so good. But if there's a new version of the software on their official website, the package won't update automatically.
Will importing the package from the WAPT store update the packages in my private repository? If so, are we dependent on the person who manages the package on the store? If not, do we have to wait for a new version on the store before re-importing it to our private repository?
Another question related to package updates
I noticed that the OwnCloud version on the store is outdated. So I created the package and added an `update_package()` function that will update the source code if it's not already up-to-date within the package. For those using ownCloud, here's the function that retrieves the latest version of the software from the official website https://owncloud.org/download/ :
Code: Select all
from setuphelpers import *
import glob
import re
def update_package():
htmlSource = wgets("https://owncloud.org/download/").splitlines()
filename = ''
realVersion = ''
for line in htmlSource:
match = re.search("https://download.owncloud.com/desktop/stable/ownCloud-.*-setup\.exe", line)
if match:
realVersion = line[line.find("ownCloud-")+9:line.find("-setup.exe")]
print("Last version : ", realVersion)
filename = 'ownCloud-%s-setup.exe' % realVersion
print("File name : ", filename)
exe = glob.glob('*.exe')
for fn in exe:
if fn != filename :
print 'remove' + fn
remove_file(fn)
if not isfile(filename):
print('Download' + filename)
wget('https://download.owncloud.com/desktop/stable/ownCloud-%s-setup.exe' % (realVersion), filename)
print ('Write ' + realVersion + '-0 in WAPT\\control')
from waptpackage import PackageEntry
pe = PackageEntry()
pe.load_control_from_wapt(os.getcwd())
pe.version = realVersion +'-0'
pe.save_control_to_wapt(os.getcwd())
print('The update is complete, you can now test and then launch a build upload.')
if __name__ == '__main__':
update_package()For a somewhat "ugly" alternative, I could include the package update at the beginning of the install() function after checking if the version on the internet is higher than that of my package; I haven't tried it yet, but it doesn't seem very suitable.
Thank you for your feedback