You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'll try to be concise. I am new to computers, python and Linux so I am sorry if this is a dumb question. I am trying to write an update script to update packages from multiple package mangers (not because I need to, the GUI is fine, I'm just practicing/learning bash scripting). I want the option to list available updates, which I have and works fine. The cinnamon-spice-updater has the --list-simple option but you have to select a spice-type. I know I could just write the four bash commands to list the available updates but I was wondering why there isn't an option to do that? In the code for cinnamon-spice-updater I changed choices = ["applet", "desklet", "extension", "theme"]
to choices = ["applet", "desklet", "extension", "theme", "all"]
and I changed
def list_simple(self, spice_type):
if spice_type is None:
return
self.updater.refresh_cache_for_type(spice_type)
updates = self.updater.get_updates_of_type(spice_type)
for update in updates:
print(update.uuid)
to
def list_simple(self, spice_type):
if spice_type is None:
return
elif spice_type == "all":
self.updater.refresh_all_caches()
updates = self.updater.get_updates()
else:
self.updater.refresh_cache_for_type(spice_type)
updates = self.updater.get_updates_of_type(spice_type)
for update in updates:
print(update.uuid)
I have no idea if there is a better way to do that. Will doing that break stuff? Is there a better way I should do it? I looked into the code and I found that the updater.get_updates() method uses a loop and for each individual spice-type and and concatenates the updates together. Why can't you get there updates all at once? Again, sorry if this is a dumb question, I'm just learning and there isn't many forum post about this already (that I could find). Is it because each type has its own repository on GitHub? Thanks for reading :)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'll try to be concise. I am new to computers, python and Linux so I am sorry if this is a dumb question. I am trying to write an update script to update packages from multiple package mangers (not because I need to, the GUI is fine, I'm just practicing/learning bash scripting). I want the option to list available updates, which I have and works fine. The cinnamon-spice-updater has the --list-simple option but you have to select a spice-type. I know I could just write the four bash commands to list the available updates but I was wondering why there isn't an option to do that? In the code for cinnamon-spice-updater I changed
choices = ["applet", "desklet", "extension", "theme"]
to
choices = ["applet", "desklet", "extension", "theme", "all"]
and I changed
to
I have no idea if there is a better way to do that. Will doing that break stuff? Is there a better way I should do it? I looked into the code and I found that the
updater.get_updates()
method uses a loop and for each individual spice-type and and concatenates the updates together. Why can't you get there updates all at once? Again, sorry if this is a dumb question, I'm just learning and there isn't many forum post about this already (that I could find). Is it because each type has its own repository on GitHub? Thanks for reading :)Beta Was this translation helpful? Give feedback.
All reactions