Bug 39368 - New files from App Center server need to update local ones
New files from App Center server need to update local ones
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: App Center
UCS 4.1
Other Linux
: P1 normal (vote)
: UCS 4.1-1-errata
Assigned To: Felix Botner
Dirk Wiesenthal
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-18 17:20 CEST by Dirk Wiesenthal
Modified: 2016-05-04 18:10 CEST (History)
2 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dirk Wiesenthal univentionstaff 2015-09-18 17:20:32 CEST
univention-app update downloads new files from the server. When new files replace existing ones, one has to be careful to update the files not only in the cache dir, but also were these files are used.

The join script for example needs to be installed at /usr/lib/univention-install if the corresponding app is currently installed.
Comment 1 Dirk Wiesenthal univentionstaff 2016-03-22 11:39:50 CET
We can only update join scripts for released apps when this bug is fixed
Comment 2 Felix Botner univentionstaff 2016-04-27 18:17:37 CEST
univention-appcenter r68970

univention-appcenter.yaml
Comment 3 Dirk Wiesenthal univentionstaff 2016-05-03 14:53:16 CEST
REOPEN: unjoin scripts are installed while the App is installed.

You would need to copy the script in case it is uninstalled. But only if it was not run successfully. This is the case when the unjoin script still exists or the unjoin script is brand new.

Maybe _update_local_files is not the right place, although it looked like it at first. Maybe one needs to do it when actually downloading / extracting the file. This would also have the benefit that not every script is written (at least tested with md5sum) when a README for a App not installed changed.
Comment 4 Dirk Wiesenthal univentionstaff 2016-05-03 14:55:21 CEST
(In reply to Dirk Wiesenthal from comment #3)
> or the unjoin script is brand new.

I guess it is okay to just skip this case. You cannot really find out whether the App was installed... (I guess you could by parsing logfiles...)
Comment 5 Felix Botner univentionstaff 2016-05-03 17:22:28 CEST
(In reply to Dirk Wiesenthal from comment #3)
> REOPEN: unjoin scripts are installed while the App is installed.
> 
> You would need to copy the script in case it is uninstalled. But only if it
> was not run successfully. This is the case when the unjoin script still
> exists or the unjoin script is brand new.
> 
> Maybe _update_local_files is not the right place, although it looked like it
> at first. Maybe one needs to do it when actually downloading / extracting
> the file. This would also have the benefit that not every script is written
> (at least tested with md5sum) when a README for a App not installed changed.

* uinst changes are now ignored
* _update_local_files now checks if the file has been download 
  (self._files_downloaded) before checking for changes between cache and 
  destination
Comment 6 Dirk Wiesenthal univentionstaff 2016-05-04 10:50:28 CEST
Changeset: OK
YAML: OK
Comment 7 Janek Walkenhorst univentionstaff 2016-05-04 18:10:35 CEST
<http://errata.software-univention.de/ucs/4.1/168.html>