Bug 24330 - UMC-Debhelper bricht mit Exitcode != 0 ab
UMC-Debhelper bricht mit Exitcode != 0 ab
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 3.0
Other Linux
: P5 normal (vote)
: UCS 3.0 - RC
Assigned To: Alexander Kläser
Philipp Hahn
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-11-02 17:49 CET by Sönke Schwardt-Krummrich
Modified: 2011-12-13 15:50 CET (History)
0 users

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 Sönke Schwardt-Krummrich univentionstaff 2011-11-02 17:49:54 CET
management/univention-management-console/dev/dh-umc-module-install ist ein neuer Debhelper, der u.a. die Funktion umc_frontend_new_hash() aus 
base/univention-lib/shell/umc.sh aufruft. 
Sofern die UMC-Pakete kein eigenes postinst-Skript mitbringen, werden die Debhelper-Skripte in einem automatisch generierten Postinst-Skript mit "sh -e" gestartet. Dadurch ist das Update anfällig für Nonzero-Exitcodes.

umc_frontend_new_hash() muss so geändert werden, dass kein Nonzero-Exitcode zurückgegeben wird.
Comment 1 Alexander Kläser univentionstaff 2011-11-02 17:52:32 CET
Ist gefixt:

 univention-lib (1.0.37-1) unstable; urgency=low
 . 
   * shell/umc.sh: added more checks for umc_frontend_new_hash to avoid exit
     codes != 0 (Bug #24330)
Comment 2 Philipp Hahn univentionstaff 2011-11-21 12:06:26 CET
svn28661 war zu gut gemeint: Das anlegen der Links gehört NICHT in die Schleife, da die alten Links für das Erstellen des neuen Links irrelevant sind.

# /usr/share/univention-management-console-frontend
# ls -l
drwxr-xr-x 4 root root 4096 18. Nov 22:14 css
lrwxrwxrwx 1 root root    3 21. Nov 08:48 css_$20112111084825$ -> css
-rw-r--r-- 1 root root 3516 21. Nov 08:48 debug.html
drwxr-xr-x 4 root root 4096 18. Nov 22:14 images
-rw-r--r-- 1 root root 3484 21. Nov 08:48 index.html
drwxr-xr-x 6 root root 4096 18. Nov 22:14 js
lrwxrwxrwx 1 root root    2 21. Nov 08:48 js_$20112111084825$ -> js
drwxr-xr-x 2 root root 4096 17. Nov 13:47 system-info
drwxr-xr-x 2 root root 4096 18. Nov 22:14 _tmp$20111811110335$
# rm css_\$20112111084825\$ js_\$20112111084825\$
# umc_frontend_new_hash 
# ls -l
insgesamt 28
drwxr-xr-x 4 root root 4096 18. Nov 22:14 css
-rw-r--r-- 1 root root 3516 21. Nov 08:52 debug.html
drwxr-xr-x 4 root root 4096 18. Nov 22:14 images
-rw-r--r-- 1 root root 3484 21. Nov 08:52 index.html
drwxr-xr-x 6 root root 4096 18. Nov 22:14 js
drwxr-xr-x 2 root root 4096 17. Nov 13:47 system-info
drwxr-xr-x 2 root root 4096 18. Nov 22:14 _tmp$20111811110335$

Was spricht gegen:
rm -f "/usr/share/univention-management-console-frontend/${idir}_\$"*\$ || true
ln -s "$idir" "/usr/share/univention-management-console-frontend/${idir}_\$${timestamp}\$"
Comment 3 Alexander Kläser univentionstaff 2011-11-21 15:38:48 CET
(In reply to comment #2)
> svn28661 war zu gut gemeint: Das anlegen der Links gehört NICHT in die
> Schleife, da die alten Links für das Erstellen des neuen Links irrelevant sind.
> ...
> Was spricht gegen:
> rm -f "/usr/share/univention-management-console-frontend/${idir}_\$"*\$ || true
> ln -s "$idir"
> "/usr/share/univention-management-console-frontend/${idir}_\$${timestamp}\$"

Stimmt natürlich, Danke für den Hinweis, das habe ich angepasst:


 univention-lib (1.0.40-1) unstable; urgency=low
 .
   * shell/umc.sh: fixed loop in umc_frontend_new_hash (Bug #24330)
Comment 4 Philipp Hahn univentionstaff 2011-11-21 15:57:49 CET
FAIL: svn29427
> + rm -f "/usr/share/univention-management-console-frontend/${idir}_\$*\$" || true

Auch hier hast du es zu gut gemeint: Den * nicht quoten → rm -f ".../${idir}_"\$*\$ || true

OK: Changelog nicht notwendig, da neue Funktion für UMC2
Comment 5 Alexander Kläser univentionstaff 2011-11-21 17:42:12 CET
(In reply to comment #4)
> FAIL: svn29427
> > + rm -f "/usr/share/univention-management-console-frontend/${idir}_\$*\$" || true
> 
> Auch hier hast du es zu gut gemeint: Den * nicht quoten → rm -f
> ".../${idir}_"\$*\$ || true
> 
> OK: Changelog nicht notwendig, da neue Funktion für UMC2

Welche Fehler sich in 10 Zeilen Code sammeln können :) . Danke für den Hinweis und wurde gefixt.


 univention-lib (1.0.41-1) unstable; urgency=low
 .
   * shell/umc.sh: fixed qutoing (Bug #24330)
Comment 6 Philipp Hahn univentionstaff 2011-11-22 18:15:06 CET
(In reply to comment #4)
> FAIL: svn29427

OK: wurde in svn29438 korrigiert und funktioniert jetzt.

OK: univention-lib_1.0.41-1.56.201111221753
Comment 7 Sönke Schwardt-Krummrich univentionstaff 2011-12-13 15:50:22 CET
UCS 3.0-0 wurde veröffentlicht. Sollte der hier beschriebene Bug mit einer
neueren Version von UCS erneut auftreten, so sollte dieser Bug dupliziert
werden: "Clone This Bug"